File path: /emf-2.4.1/src/org/eclipse/emf/ecore/xmi/impl/XMLHelperImpl.java | File path: /emf-2.4.1/src/org/eclipse/emf/ecore/xmi/impl/XMLHelperImpl.java | |||
Method name: void populateNameInfo(NameInfo, EClass)
|
Method name: void populateNameInfo(NameInfo, EStructuralFeature)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 5 | |||
1 | XMLResource.XMLInfo clsInfo = xmlMap.getInfo(c);↵ | 1 | XMLResource.XMLInfo info = xmlMap.getInfo(feature);↵ | |
2 | if (clsInfo != null)↵ | 2 | if (info != null)↵ | |
3 | {↵ | 3 | {↵ | |
4 | String targetNamespace = clsInfo.getTargetNamespace();↵ | 4 | String targetNamespace = info.getTargetNamespace();↵ | |
5 | nameInfo.setNamespaceURI(targetNamespace);↵ | 5 | nameInfo.setNamespaceURI(targetNamespace);↵ | |
6 | nameInfo.setQualifiedName(getQName(targetNamespace, name));↵ | 6 | nameInfo.setQualifiedName(getQName(targetNamespace, name));↵ | |
7 | return;↵ | 7 | ↵ | |
8 | } | 8 |
| |
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 declared in the same class |
Number of node comparisons | 22 |
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) | 6.1 |
Clone type | Type 3 |
ID | Statement | ID | Statement | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4 | XMLResource.XMLInfo clsInfo = xmlMap.getInfo(c); |
| 18 | XMLResource.XMLInfo info = xmlMap.getInfo(feature); | |||||||||||||||||
5 | if (clsInfo != null) |
| 19 | if (info != null) | |||||||||||||||||
6 | String targetNamespace = clsInfo.getTargetNamespace(); |
| 20 | String targetNamespace = info.getTargetNamespace(); | |||||||||||||||||
7 | nameInfo.setNamespaceURI(targetNamespace); | 21 | nameInfo.setNamespaceURI(targetNamespace); | ||||||||||||||||||
8 | nameInfo.setQualifiedName(getQName(targetNamespace, name)); | 22 | nameInfo.setQualifiedName(getQName(targetNamespace, name)); | ||||||||||||||||||
9 | return; |
| |
Row | Violation |
---|---|
1 | Type org.eclipse.emf.ecore.EClass of variable c does not match with type org.eclipse.emf.ecore.EStructuralFeature of variable feature |
2 | Unmatched return; |