File path: /emf-2.4.1/src/org/eclipse/emf/ecore/presentation/EcoreModelWizard.java | File path: /emf-2.4.1/src/org/eclipse/emf/mapping/ecore2ecore/presentation/Ecore2EcoreModelWizard.java | |||
Method name: Collection
|
Method name: Collection
|
|||
Number of AST nodes: 9 | Number of AST nodes: 9 | |||
1 | if (initialObjectNames == null)↵ | 1 | if (initialObjectNames == null)↵ | |
2 | {↵ | 2 | {↵ | |
3 | initialObjectNames = new ArrayList<String>();↵ | 3 | initialObjectNames = new ArrayList<String>();↵ | |
4 | for (EClassifier eClassifier : ecorePackage.getEClassifiers())↵ | 4 | for (EClassifier eClassifier : ecore2EcorePackage.getEClassifiers())↵ | |
5 | {↵ | 5 | {↵ | |
6 | if (eClassifier instanceof EClass)↵ | 6 | if (eClassifier instanceof EClass)↵ | |
7 | {↵ | 7 | {↵ | |
8 | EClass eClass = (EClass)eClassifier;↵ | 8 | EClass eClass = (EClass)eClassifier;↵ | |
9 | if (!eClass.isAbstract())↵ | 9 | if (!eClass.isAbstract())↵ | |
10 | {↵ | 10 | {↵ | |
11 | initialObjectNames.add(eClass.getName());↵ | 11 | initialObjectNames.add(eClass.getName());↵ | |
12 | }↵ | 12 | }↵ | |
13 | }↵ | 13 | }↵ | |
14 | }↵ | 14 | }↵ | |
15 | Collections.sort(initialObjectNames, CommonPlugin.INSTANCE.getComparator());↵ | 15 | Collections.sort(initialObjectNames, CommonPlugin.INSTANCE.getComparator());↵ | |
16 | }↵ | 16 | }↵ | |
17 | return initialObjectNames; | 17 |
| |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.3 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 19 |
Number of mapped statements | 9 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 1.6 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (initialObjectNames == null) | 1 | if (initialObjectNames == null) | |||||||||||||||
2 | initialObjectNames = new ArrayList<String>(); | 2 | initialObjectNames = new ArrayList<String>(); | |||||||||||||||
3 | for (EClassifier eClassifier : ecorePackage.getEClassifiers()) |
| 3 | for (EClassifier eClassifier : ecore2EcorePackage.getEClassifiers()) | ||||||||||||||
4 | if (eClassifier instanceof EClass) | 4 | if (eClassifier instanceof EClass) | |||||||||||||||
5 | EClass eClass = (EClass)eClassifier; | 5 | EClass eClass = (EClass)eClassifier; | |||||||||||||||
6 | if (!eClass.isAbstract()) | 6 | if (!eClass.isAbstract()) | |||||||||||||||
7 | initialObjectNames.add(eClass.getName()); | 7 | initialObjectNames.add(eClass.getName()); | |||||||||||||||
8 | Collections.sort(initialObjectNames, CommonPlugin.INSTANCE.getComparator()); | 8 | Collections.sort(initialObjectNames, CommonPlugin.INSTANCE.getComparator()); | |||||||||||||||
9 | return initialObjectNames; | 9 | return initialObjectNames; |
Row | Violation |
---|---|
1 | Type org.eclipse.emf.ecore.EcorePackage of variable ecorePackage does not match with type org.eclipse.emf.mapping.ecore2ecore.Ecore2EcorePackage of variable ecore2EcorePackage |