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 setAffiliation(EStructuralFeature, EStructuralFeature)
|
Method name: void setGroup(EStructuralFeature, EStructuralFeature)
|
|||
Number of AST nodes: 7 | Number of AST nodes: 7 | |||
1 | if (affiliation == null)↵ | 1 | if (group == null)↵ | |
2 | {↵ | 2 | {↵ | |
3 | EAnnotation eAnnotation = getAnnotation(eStructuralFeature, false);↵ | 3 | EAnnotation eAnnotation = getAnnotation(eStructuralFeature, false);↵ | |
4 | if (eAnnotation != null)↵ | 4 | if (eAnnotation != null)↵ | |
5 | {↵ | 5 | {↵ | |
6 | eAnnotation.getDetails().remove("affiliation");↵ | 6 | eAnnotation.getDetails().remove("group");↵ | |
7 | }↵ | 7 | }↵ | |
8 | }↵ | 8 | }↵ | |
9 | else↵ | 9 | else↵ | |
10 | {↵ | 10 | {↵ | |
11 | EAnnotation eAnnotation = getAnnotation(eStructuralFeature, true);↵ | 11 | EAnnotation eAnnotation = getAnnotation(eStructuralFeature, true);↵ | |
12 | eAnnotation.getDetails().put↵ | 12 | eAnnotation.getDetails().put↵ | |
13 | ("affiliation", getQualifiedName(getNamespace(eStructuralFeature.getEContainingClass().getEPackage()), affiliation));↵ | 13 | ("group", getQualifiedName(getNamespace(eStructuralFeature.getEContainingClass().getEPackage()), group));↵ | |
14 | }↵ | 14 | }↵ | |
15 | getExtendedMetaData(eStructuralFeature).setAffiliation(affiliation); | 15 | getExtendedMetaData(eStructuralFeature).setGroup(group); | |
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.2 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 21 |
Number of mapped statements | 7 |
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) | 3.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (affiliation == null) |
| 1 | if (group == null) | |||||||||||||||||
2 | EAnnotation eAnnotation = getAnnotation(eStructuralFeature, false); | 2 | EAnnotation eAnnotation = getAnnotation(eStructuralFeature, false); | ||||||||||||||||||
3 | if (eAnnotation != null) | 3 | if (eAnnotation != null) | ||||||||||||||||||
4 | eAnnotation.getDetails().remove("affiliation"); |
| 4 | eAnnotation.getDetails().remove("group"); | |||||||||||||||||
else | else | ||||||||||||||||||||
5 | EAnnotation eAnnotation = getAnnotation(eStructuralFeature, true); | 5 | EAnnotation eAnnotation = getAnnotation(eStructuralFeature, true); | ||||||||||||||||||
6 | eAnnotation.getDetails().put("affiliation", getQualifiedName(getNamespace(eStructuralFeature.getEContainingClass().getEPackage()), affiliation)); |
| 6 | eAnnotation.getDetails().put("group", getQualifiedName(getNamespace(eStructuralFeature.getEContainingClass().getEPackage()), group)); | |||||||||||||||||
7 | getExtendedMetaData(eStructuralFeature).setAffiliation(affiliation); |
| 7 | getExtendedMetaData(eStructuralFeature).setGroup(group); |
Row | Violation |
---|---|
1 | Expression getExtendedMetaData(eStructuralFeature).setAffiliation(affiliation) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression getExtendedMetaData(eStructuralFeature).setGroup(group) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression getExtendedMetaData(eStructuralFeature).setAffiliation(affiliation) is a void method call, and thus it cannot be parameterized |
4 | Expression getExtendedMetaData(eStructuralFeature).setGroup(group) is a void method call, and thus it cannot be parameterized |