File path: /emf-2.4.1/src/org/eclipse/emf/ecore/impl/EClassImpl.java | File path: /emf-2.4.1/src/org/eclipse/emf/ecore/impl/EOperationImpl.java | |||
Method name: int delegateIndexOf(Object)
|
Method name: int delegateIndexOf(Object)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | int index = 0;↵ | 1 | int index = 0;↵ | |
2 | for (EGenericType eGenericType : getEGenericSuperTypes())↵ | 2 | for (EGenericType eGenericType : getEGenericExceptions())↵ | |
3 | {↵ | 3 | {↵ | |
4 | if (object == unwrap(eGenericType))↵ | 4 | if (object == unwrap(eGenericType))↵ | |
5 | {↵ | 5 | {↵ | |
6 | return index;↵ | 6 | return index;↵ | |
7 | }↵ | 7 | }↵ | |
8 | ++index;↵ | 8 | ++index;↵ | |
9 | }↵ | 9 | }↵ | |
10 | return -1; | 10 |
| |
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 | 12 |
Number of mapped statements | 6 |
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) | 0.8 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | int index = 0; | 1 | int index = 0; | |||||||||||||||||
2 | for (EGenericType eGenericType : getEGenericSuperTypes()) |
| 2 | for (EGenericType eGenericType : getEGenericExceptions()) | ||||||||||||||||
3 | if (object == unwrap(eGenericType)) |
| 3 | if (object == unwrap(eGenericType)) | ||||||||||||||||
4 | return index; | 4 | return index; | |||||||||||||||||
5 | ++index; | 5 | ++index; | |||||||||||||||||
6 | return -1; | 6 | return -1; |
Row | Violation |
---|---|
1 | Expression unwrap(eGenericType) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression unwrap(eGenericType) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Type org.eclipse.emf.ecore.EClass of variable unwrap(eGenericType) does not match with type org.eclipse.emf.ecore.EClassifier of variable unwrap(eGenericType) |
4 | Expression unwrap(eGenericType) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression unwrap(eGenericType) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Type org.eclipse.emf.ecore.EClass of variable unwrap(eGenericType) does not match with type org.eclipse.emf.ecore.EClassifier of variable unwrap(eGenericType) |