File path: /emf-2.4.1/src/org/eclipse/emf/edit/provider/ItemProviderAdapter.java | File path: /emf-2.4.1/src/org/eclipse/emf/edit/provider/ItemProviderAdapter.java | |||
Method name: EStructuralFeature getSetFeature(Object, Object)
|
Method name: EReference getChildReference(Object, Object)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 3 | |||
1 | for (EStructuralFeature eStructuralFeature : getSetFeatures(object))↵ | 1 | for (EReference eReference : getChildrenReferences(object))↵ | |
2 | {↵ | 2 | {↵ | |
3 | // If this object is compatible with this reference...↵ | |||
4 | //↵ | |||
3 | if (isValidValue(object, value, eStructuralFeature))↵ | 5 | if (isValidValue(object, child, eReference))↵ | |
4 | {↵ | 6 | ↵ | |
7 | {↵ | |||
5 | return eStructuralFeature;↵ | 8 | return eReference;↵ | |
6 | }↵ | 9 | ↵ | |
7 | }↵ | 10 | }↵ | |
8 | return null; | 11 | } | |
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 | 5 |
Number of mapped statements | 1 |
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) | 0.4 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2 | if (isValidValue(object, value, eStructuralFeature)) |
| 3 | if (isValidValue(object, child, eReference)) | |||||||||||||||||
3 | return eStructuralFeature; |
| | ||||||||||||||||||
|
| 4 | return eReference; |
Row | Violation |
---|---|
1 | Type org.eclipse.emf.ecore.EStructuralFeature of variable eStructuralFeature does not match with type org.eclipse.emf.ecore.EReference of variable eReference |
2 | Unmatched return eStructuralFeature; |
3 | Unmatched return eReference; |