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: void setProcessingKind(EStructuralFeature, int)
|
Method name: void setContentKind(EClass, int)
|
|||
Number of AST nodes: 7 | Number of AST nodes: 7 | |||
1 | if (kind > 0 && kind < PROCESSING_KINDS.length)↵ | 1 | if (kind > 0 && kind < CONTENT_KINDS.length)↵ | |
2 | {↵ | 2 | {↵ | |
3 | EAnnotation eAnnotation = getAnnotation(eStructuralFeature, true);↵ | 3 | EAnnotation eAnnotation = getAnnotation(eClass, true);↵ | |
4 | eAnnotation.getDetails().put("processing", PROCESSING_KINDS[kind]);↵ | 4 | eAnnotation.getDetails().put("kind", CONTENT_KINDS[kind]);↵ | |
5 | }↵ | 5 | }↵ | |
6 | else↵ | 6 | else↵ | |
7 | {↵ | 7 | {↵ | |
8 | EAnnotation eAnnotation = getAnnotation(eStructuralFeature, false);↵ | 8 | EAnnotation eAnnotation = getAnnotation(eClass, false);↵ | |
9 | if (eAnnotation != null)↵ | 9 | if (eAnnotation != null)↵ | |
10 | {↵ | 10 | {↵ | |
11 | eAnnotation.getDetails().remove("processing");↵ | 11 | eAnnotation.getDetails().remove("kind");↵ | |
12 | }↵ | 12 | }↵ | |
13 | }↵ | 13 | }↵ | |
14 | getExtendedMetaData(eStructuralFeature).setProcessingKind(kind); | 14 | getExtendedMetaData(eClass).setContentKind(kind); | |
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 | 21 |
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.5 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (kind > 0 && kind < PROCESSING_KINDS.length) |
| 1 | if (kind > 0 && kind < CONTENT_KINDS.length) | ||||||||||||||
2 | EAnnotation eAnnotation = getAnnotation(eStructuralFeature, true); |
| 2 | EAnnotation eAnnotation = getAnnotation(eClass, true); | ||||||||||||||
3 | eAnnotation.getDetails().put("processing", PROCESSING_KINDS[kind]); |
| 3 | eAnnotation.getDetails().put("kind", CONTENT_KINDS[kind]); | ||||||||||||||
else | else | |||||||||||||||||
4 | EAnnotation eAnnotation = getAnnotation(eStructuralFeature, false); |
| 4 | EAnnotation eAnnotation = getAnnotation(eClass, false); | ||||||||||||||
5 | if (eAnnotation != null) | 5 | if (eAnnotation != null) | |||||||||||||||
6 | eAnnotation.getDetails().remove("processing"); |
| 6 | eAnnotation.getDetails().remove("kind"); | ||||||||||||||
| 7 | getExtendedMetaData(eClass).setContentKind(kind); | ||||||||||||||||
7 | getExtendedMetaData(eStructuralFeature).setProcessingKind(kind); | |
Row | Violation |
---|---|
1 | Type org.eclipse.emf.ecore.EStructuralFeature of variable eStructuralFeature does not match with type org.eclipse.emf.ecore.EClass of variable eClass |
2 | Type org.eclipse.emf.ecore.EStructuralFeature of variable eStructuralFeature does not match with type org.eclipse.emf.ecore.EClass of variable eClass |