File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/BasicExtendedMetaData.java | File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/BasicExtendedMetaData.java | |||
Method name: int basicGetContentKind(EClass)
|
Method name: int basicGetProcessingKind(EStructuralFeature)
|
|||
Number of AST nodes: 8 | Number of AST nodes: 8 | |||
1 | EAnnotation eAnnotation = getAnnotation(eClass, false);↵ | 1 | EAnnotation eAnnotation = getAnnotation(eStructuralFeature, false);↵ | |
2 | if (eAnnotation != null)↵ | 2 | if (eAnnotation != null)↵ | |
3 | {↵ | 3 | {↵ | |
4 | Object kind = eAnnotation.getDetails().get("kind");↵ | 4 | Object kind = eAnnotation.getDetails().get("processing");↵ | |
5 | if (kind != null)↵ | 5 | if (kind != null)↵ | |
6 | {↵ | 6 | {↵ | |
7 | for (int i = 1; i < CONTENT_KINDS.length; ++i)↵ | 7 | for (int i = 1; i < PROCESSING_KINDS.length; ++i)↵ | |
8 | {↵ | 8 | {↵ | |
9 | if (CONTENT_KINDS[i].equals(kind))↵ | 9 | if (PROCESSING_KINDS[i].equals(kind))↵ | |
10 | {↵ | 10 | {↵ | |
11 | return i;↵ | 11 | return i;↵ | |
12 | }↵ | 12 | }↵ | |
13 | }↵ | 13 | }↵ | |
14 | }↵ | 14 | }↵ | |
15 | }↵ | 15 | }↵ | |
16 | return 0; | 16 |
| |
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.4 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 14 |
Number of mapped statements | 8 |
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.2 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | EAnnotation eAnnotation = getAnnotation(eClass, false); |
| 1 | EAnnotation eAnnotation = getAnnotation(eStructuralFeature, false); | ||||||||||||||
2 | if (eAnnotation != null) | 2 | if (eAnnotation != null) | |||||||||||||||
3 | Object kind = eAnnotation.getDetails().get("kind"); |
| 3 | Object kind = eAnnotation.getDetails().get("processing"); | ||||||||||||||
4 | if (kind != null) | 4 | if (kind != null) | |||||||||||||||
5 | for (int i = 1; i < CONTENT_KINDS.length; ++i) |
| 5 | for (int i = 1; i < PROCESSING_KINDS.length; ++i) | ||||||||||||||
6 | if (CONTENT_KINDS[i].equals(kind)) |
| 6 | if (PROCESSING_KINDS[i].equals(kind)) | ||||||||||||||
7 | return i; | 7 | return i; | |||||||||||||||
8 | return 0; | 8 | return 0; |
Row | Violation |
---|---|
1 | Type org.eclipse.emf.ecore.EClass of variable eClass does not match with type org.eclipse.emf.ecore.EStructuralFeature of variable eStructuralFeature |