File path: /emf-2.4.1/src/org/eclipse/emf/ecore/impl/BasicEObjectImpl.java | File path: /emf-2.4.1/src/org/eclipse/emf/ecore/impl/BasicEObjectImpl.java | |||
Method name: void eOpenSet(EStructuralFeature, Object)
|
Method name: void eOpenUnset(EStructuralFeature)
|
|||
Number of AST nodes: 7 | Number of AST nodes: 7 | |||
1 | EStructuralFeature openFeature = ExtendedMetaData.INSTANCE.getAffiliation(eClass(), eFeature);↵ | 1 | EStructuralFeature openFeature = ExtendedMetaData.INSTANCE.getAffiliation(eClass(), eFeature);↵ | |
2 | if (openFeature != null)↵ | 2 | if (openFeature != null)↵ | |
3 | {↵ | 3 | {↵ | |
4 | if (!FeatureMapUtil.isFeatureMap(openFeature))↵ | 4 | if (!FeatureMapUtil.isFeatureMap(openFeature))↵ | |
5 | {↵ | 5 | {↵ | |
6 | openFeature = ExtendedMetaData.INSTANCE.getGroup(openFeature);↵ | 6 | openFeature = ExtendedMetaData.INSTANCE.getGroup(openFeature);↵ | |
7 | }↵ | 7 | }↵ | |
8 | FeatureMap featureMap = (FeatureMap)eGet(openFeature);↵ | 8 | FeatureMap featureMap = (FeatureMap)eGet(openFeature);↵ | |
9 | ((FeatureMap.Internal)featureMap).set(eFeature, newValue);↵ | 9 | ((FeatureMap.Internal)featureMap).unset(eFeature);↵ | |
10 | }↵ | 10 | }↵ | |
11 | else↵ | 11 | else↵ | |
12 | {↵ | 12 | {↵ | |
13 | throw new IllegalArgumentException("The feature '" + eFeature.getName() + "' is not a valid changeable feature");↵ | 13 | throw new IllegalArgumentException("The feature '" + eFeature.getName() + "' is not a valid changeable feature");↵ | |
14 | } | 14 |
| |
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) | 1.7 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | EStructuralFeature openFeature = ExtendedMetaData.INSTANCE.getAffiliation(eClass(), eFeature); | 1 | EStructuralFeature openFeature = ExtendedMetaData.INSTANCE.getAffiliation(eClass(), eFeature); | ||||||||||||||||||||||
2 | if (openFeature != null) | 2 | if (openFeature != null) | ||||||||||||||||||||||
3 | if (!FeatureMapUtil.isFeatureMap(openFeature)) | 3 | if (!FeatureMapUtil.isFeatureMap(openFeature)) | ||||||||||||||||||||||
4 | openFeature = ExtendedMetaData.INSTANCE.getGroup(openFeature); | 4 | openFeature = ExtendedMetaData.INSTANCE.getGroup(openFeature); | ||||||||||||||||||||||
5 | FeatureMap featureMap = (FeatureMap)eGet(openFeature); | 5 | FeatureMap featureMap = (FeatureMap)eGet(openFeature); | ||||||||||||||||||||||
6 | ((FeatureMap.Internal)featureMap).set(eFeature, newValue); |
| 6 | ((FeatureMap.Internal)featureMap).unset(eFeature); | |||||||||||||||||||||
else | else | ||||||||||||||||||||||||
7 | throw new IllegalArgumentException("The feature '" + eFeature.getName() + "' is not a valid changeable feature"); | 7 | throw new IllegalArgumentException("The feature '" + eFeature.getName() + "' is not a valid changeable feature"); |
Row | Violation |
---|---|
1 | Expression ((FeatureMap.Internal)featureMap).set(eFeature,newValue) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression ((FeatureMap.Internal)featureMap).unset(eFeature) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression ((FeatureMap.Internal)featureMap).set(eFeature,newValue) is a void method call, and thus it cannot be parameterized |
4 | Expression ((FeatureMap.Internal)featureMap).unset(eFeature) is a void method call, and thus it cannot be parameterized |
5 | Expression ((FeatureMap.Internal)featureMap).set(eFeature,newValue) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression ((FeatureMap.Internal)featureMap).unset(eFeature) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Expression ((FeatureMap.Internal)featureMap).set(eFeature,newValue) is a void method call, and thus it cannot be parameterized |
8 | Expression ((FeatureMap.Internal)featureMap).unset(eFeature) is a void method call, and thus it cannot be parameterized |