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: EStructuralFeature getSimpleFeature(EClass)
|
Method name: EAttribute getMixedFeature(EClass)
|
|||
Number of AST nodes: 3 | Number of AST nodes: 3 | |||
1 | EStructuralFeature eStructuralFeature = eClass.getEStructuralFeature(i);↵ | 1 | EAttribute eAttribute = eAllAttributes.get(i);↵ | |
2 | if (getFeatureKind(eStructuralFeature) == ExtendedMetaData.SIMPLE_FEATURE)↵ | 2 | if (getFeatureKind(eAttribute) == ExtendedMetaData.ELEMENT_WILDCARD_FEATURE)↵ | |
3 | {↵ | 3 | {↵ | |
4 | return eStructuralFeature;↵ | 4 | return eAttribute;↵ | |
5 | } | 5 | } | |
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 | 6 |
Number of mapped statements | 1 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 9.8 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3 | EStructuralFeature eStructuralFeature = eClass.getEStructuralFeature(i); |
| | ||||||||||||||||||
|
| 6 | EAttribute eAttribute = eAllAttributes.get(i); | ||||||||||||||||||
4 | if (getFeatureKind(eStructuralFeature) == ExtendedMetaData.SIMPLE_FEATURE) |
| 7 | if (getFeatureKind(eAttribute) == ExtendedMetaData.ELEMENT_WILDCARD_FEATURE) | |||||||||||||||||
5 | return eStructuralFeature; |
| | ||||||||||||||||||
|
| 8 | return eAttribute; |
Row | Violation |
---|---|
1 | Unmatched statement EStructuralFeature eStructuralFeature=eClass.getEStructuralFeature(i); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched statement EAttribute eAttribute=eAllAttributes.get(i); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
3 | Type org.eclipse.emf.ecore.EStructuralFeature of variable eStructuralFeature does not match with type org.eclipse.emf.ecore.EAttribute of variable eAttribute |
4 | Unmatched return eStructuralFeature; |
5 | Unmatched return eAttribute; |