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: EClass delegateSet(int, EClass)
|
Method name: EClassifier delegateSet(int, EClassifier)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | EGenericType eGenericType = getEGenericSuperTypes().get(index);↵ | 1 | EGenericType eGenericType = getEGenericExceptions().get(index);↵ | |
2 | EClass result = unwrap(eGenericType);↵ | 2 | EClassifier result = unwrap(eGenericType);↵ | |
3 | // If this is just a proxy being resolved...↵ | 3 | // If this is just a proxy being resolved...↵ | |
4 | //↵ | 4 | //↵ | |
5 | if (resolveProxy(result) == eClass)↵ | 5 | if (resolveProxy(result) == eClassifier)↵ | |
6 | {↵ | 6 | {↵ | |
7 | // Force the raw type to be resolved so we don't resolve this endlessly.↵ | 7 | // Force the raw type to be resolved so we don't resolve this endlessly.↵ | |
8 | //↵ | 8 | //↵ | |
9 | eGenericType.getERawType();↵ | 9 | eGenericType.getERawType();↵ | |
10 | }↵ | 10 | }↵ | |
11 | else↵ | 11 | else↵ | |
12 | {↵ | 12 | {↵ | |
13 | // Update the classifier and hence the raw type as normal.↵ | 13 | // Update the classifier and hence the raw type as normal.↵ | |
14 | //↵ | 14 | //↵ | |
15 | eGenericType.setEClassifier(eClass);↵ | 15 | eGenericType.setEClassifier(eClassifier);↵ | |
16 | }↵ | 16 | }↵ | |
17 | return result; | 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 | 18 |
Number of mapped statements | 4 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 1.1 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | EGenericType eGenericType = getEGenericSuperTypes().get(index); |
| 1 | EGenericType eGenericType = getEGenericExceptions().get(index); | |||||||||||||||||||||||||
|
| 2 | EClassifier result = unwrap(eGenericType); | ||||||||||||||||||||||||||
2 | EClass result = unwrap(eGenericType); |
| | ||||||||||||||||||||||||||
3 | if (resolveProxy(result) == eClass) |
| 3 | if (resolveProxy(result) == eClassifier) | |||||||||||||||||||||||||
4 | eGenericType.getERawType(); | 4 | eGenericType.getERawType(); | ||||||||||||||||||||||||||
else | else | ||||||||||||||||||||||||||||
5 | eGenericType.setEClassifier(eClass); |
| 5 | eGenericType.setEClassifier(eClassifier); | |||||||||||||||||||||||||
|
| 6 | return result; | ||||||||||||||||||||||||||
6 | return result; |
| |
Row | Violation |
---|---|
1 | Unmatched statement EClassifier result=unwrap(eGenericType); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched statement EClass result=unwrap(eGenericType); 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.EClass of variable result does not match with type org.eclipse.emf.ecore.EClassifier of variable result |
4 | Type org.eclipse.emf.ecore.EClass of variable eClass does not match with type org.eclipse.emf.ecore.EClassifier of variable eClassifier |
5 | Type org.eclipse.emf.ecore.EClass of variable eClass does not match with type org.eclipse.emf.ecore.EClassifier of variable eClassifier |
6 | Type org.eclipse.emf.ecore.EClass of variable eClass does not match with type org.eclipse.emf.ecore.EClassifier of variable eClassifier |
7 | Unmatched return result; |
8 | Unmatched return result; |