File path: /emf-2.4.1/src/org/eclipse/emf/ecore/resource/impl/BinaryResourceImpl.java | File path: /emf-2.4.1/src/org/eclipse/emf/ecore/resource/impl/BinaryResourceImpl.java | |||
Method name: void loadEObjects(InternalEList
|
Method name: void loadFeatureMap(FeatureMap.Internal)
|
|||
Number of AST nodes: 7 | Number of AST nodes: 7 | |||
1 | for (int i = 0; i < existingSize; ++i)↵ | 1 | for (int i = 0; i < existingSize; ++i)↵ | |
2 | {↵ | 2 | {↵ | |
3 | int newPosition = indices[i];↵ | 3 | int newPosition = indices[i];↵ | |
4 | int oldPosition = size + i;↵ | 4 | int oldPosition = size + i;↵ | |
5 | if (newPosition != oldPosition)↵ | 5 | if (newPosition != oldPosition)↵ | |
6 | {↵ | 6 | {↵ | |
7 | internalEObjects.move(newPosition, oldPosition);↵ | 7 | featureMap.move(newPosition, oldPosition);↵ | |
8 | }↵ | 8 | }↵ | |
9 | }↵ | 9 | }↵ | |
10 | recycle(existingValues);↵ | 10 | recycle(existingValues);↵ | |
11 | recycle(indices); | 11 |
| |
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 declared in the same class |
Number of node comparisons | 19 |
Number of mapped statements | 6 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 1.6 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
31 | for (int i = 0; i < existingSize; ++i) | 30 | for (int i = 0; i < existingSize; ++i) | ||||||||||||
32 | int newPosition = indices[i]; | 31 | int newPosition = indices[i]; | ||||||||||||
33 | int oldPosition = size + i; | 32 | int oldPosition = size + i; | ||||||||||||
34 | if (newPosition != oldPosition) | 33 | if (newPosition != oldPosition) | ||||||||||||
|
| 34 | featureMap.move(newPosition, oldPosition); | ||||||||||||
35 | internalEObjects.move(newPosition, oldPosition); |
| | ||||||||||||
36 | recycle(existingValues); |
| 35 | recycle(existingValues); | |||||||||||
37 | recycle(indices); | 36 | recycle(indices); |
Row | Violation |
---|---|
1 | Unmatched statement featureMap.move(newPosition,oldPosition); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched statement internalEObjects.move(newPosition,oldPosition); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
3 | Type org.eclipse.emf.ecore.InternalEObject[] of variable existingValues does not match with type org.eclipse.emf.ecore.util.FeatureMap.Entry.Internal[] of variable existingValues |
4 | Clone fragment #1 returns variables newPosition, oldPosition , while Clone fragment #2 returns variables newPosition, oldPosition |