File path: /emf-2.4.1/src/org/eclipse/emf/ecore/xmi/impl/XMLSaveImpl.java | File path: /emf-2.4.1/src/org/eclipse/emf/ecore/xmi/impl/XMLSaveImpl.java | |||
Method name: EStructuralFeature getSubstitutionGroup(EStructuralFeature, EClassifier)
|
Method name: EStructuralFeature getRoot(EClassifier)
|
|||
Number of AST nodes: 11 | Number of AST nodes: 11 | |||
1 | if (elementHandler == null)↵ | 1 | if (elementHandler == null)↵ | |
2 | {↵ | 2 | {↵ | |
3 | return null;↵ | 3 | return null;↵ | |
4 | }↵ | 4 | }↵ | |
5 | else↵ | 5 | else↵ | |
6 | {↵ | 6 | {↵ | |
7 | featureClassifierPair.eStructuralFeature = eStructuralFeature;↵ | 7 | featureClassifierPair.eStructuralFeature = NULL_FEATURE;↵ | |
8 | featureClassifierPair.eClassifier = eClassifier;↵ | 8 | featureClassifierPair.eClassifier = eClassifier;↵ | |
9 | EStructuralFeature result = substitutionGroupMap.get(featureClassifierPair);↵ | 9 | EStructuralFeature result = substitutionGroupMap.get(featureClassifierPair);↵ | |
10 | if (result == NULL_FEATURE)↵ | 10 | if (result == NULL_FEATURE)↵ | |
11 | {↵ | 11 | {↵ | |
12 | result = null;↵ | 12 | result = null;↵ | |
13 | }↵ | 13 | }↵ | |
14 | else↵ | 14 | else↵ | |
15 | {↵ | 15 | {↵ | |
16 | result = elementHandler.getSubstitutionGroup(extendedMetaData, eStructuralFeature, eClassifier);↵ | 16 | result = elementHandler.getRoot(extendedMetaData, eClassifier);↵ | |
17 | substitutionGroupMap.put(featureClassifierPair, result == null ? NULL_FEATURE : result);↵ | 17 | substitutionGroupMap.put(featureClassifierPair, result == null ? NULL_FEATURE : result);↵ | |
18 | featureClassifierPair = new FeatureClassifierPair();↵ | 18 | featureClassifierPair = new FeatureClassifierPair();↵ | |
19 | }↵ | 19 | }↵ | |
20 | return result;↵ | 20 | return result;↵ | |
21 | } | 21 |
| |
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 | 61 |
Number of mapped statements | 11 |
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.4 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (elementHandler == null) | 1 | if (elementHandler == null) | ||||||||||||||||||
2 | return null; | 2 | return null; | ||||||||||||||||||
else | else | ||||||||||||||||||||
3 | featureClassifierPair.eStructuralFeature = eStructuralFeature; |
| 3 | featureClassifierPair.eStructuralFeature = NULL_FEATURE; | |||||||||||||||||
4 | featureClassifierPair.eClassifier = eClassifier; | 4 | featureClassifierPair.eClassifier = eClassifier; | ||||||||||||||||||
5 | EStructuralFeature result = substitutionGroupMap.get(featureClassifierPair); | 5 | EStructuralFeature result = substitutionGroupMap.get(featureClassifierPair); | ||||||||||||||||||
6 | if (result == NULL_FEATURE) | 6 | if (result == NULL_FEATURE) | ||||||||||||||||||
7 | result = null; | 7 | result = null; | ||||||||||||||||||
else | else | ||||||||||||||||||||
8 | result = elementHandler.getSubstitutionGroup(extendedMetaData, eStructuralFeature, eClassifier); |
| 8 | result = elementHandler.getRoot(extendedMetaData, eClassifier); | |||||||||||||||||
9 | substitutionGroupMap.put(featureClassifierPair, result == null ? NULL_FEATURE : result); | 9 | substitutionGroupMap.put(featureClassifierPair, result == null ? NULL_FEATURE : result); | ||||||||||||||||||
10 | featureClassifierPair = new FeatureClassifierPair(); | 10 | featureClassifierPair = new FeatureClassifierPair(); | ||||||||||||||||||
11 | return result; | 11 | return result; |
Row | Violation |
---|---|
1 | Expression elementHandler.getSubstitutionGroup(extendedMetaData,eStructuralFeature,eClassifier) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression elementHandler.getRoot(extendedMetaData,eClassifier) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression elementHandler.getSubstitutionGroup(extendedMetaData,eStructuralFeature,eClassifier) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression elementHandler.getRoot(extendedMetaData,eClassifier) cannot be parameterized, because it has dependencies to/from statements that will be extracted |