File path: /emf-2.4.1/src/org/eclipse/emf/ecore/xmi/impl/EMOFExtendedMetaData.java | File path: /emf-2.4.1/src/org/eclipse/emf/ecore/xmi/impl/XMLHelperImpl.java | |||
Method name: String getName(EStructuralFeature)
|
Method name: String getName(ENamedElement)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 5 | |||
1 | XMLResource.XMLInfo info = xmlMap.getInfo(eStructuralFeature);↵ | 1 | XMLResource.XMLInfo info = xmlMap.getInfo(obj);↵ | |
2 | if (info != null)↵ | 2 | if (info != null)↵ | |
3 | {↵ | 3 | ↵ | |
4 | {↵ | |||
4 | String name = info.getName();↵ | 5 | String result = info.getName();↵ | |
5 | if (name != null)↵ | 6 | if (result != null)↵ | |
6 | {↵ | 7 | {↵ | |
7 | return info.getName();↵ | 8 | return result;↵ | |
8 | }↵ | 9 | ↵ | |
9 | }↵ | 10 | }↵ | |
10 | return super.getName(eStructuralFeature); | 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.1 |
Clones location | Clones are in different classes |
Number of node comparisons | 10 |
Number of mapped statements | 5 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 14.5 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | XMLResource.XMLInfo info = xmlMap.getInfo(eStructuralFeature); |
| 4 | XMLResource.XMLInfo info = xmlMap.getInfo(obj); | ||||||||||||||
2 | if (info != null) | 5 | if (info != null) | |||||||||||||||
3 | String name = info.getName(); |
| 6 | String result = info.getName(); | ||||||||||||||
4 | if (name != null) |
| 7 | if (result != null) | ||||||||||||||
5 | return info.getName(); |
| 8 | return result; | ||||||||||||||
6 | return super.getName(eStructuralFeature); |
| |
Row | Violation |
---|---|
1 | Type org.eclipse.emf.ecore.EStructuralFeature of variable eStructuralFeature does not match with type org.eclipse.emf.ecore.ENamedElement of variable obj |
2 | Expression info.getName() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression result cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Unmatched return super.getName(eStructuralFeature); |