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, EDataType)
|
Method name: void populateNameInfo(NameInfo, EClass)
|
|||
Number of AST nodes: 10 | Number of AST nodes: 10 | |||
1 | String name = getName(eDataType);↵ | 1 | String name = getName(c);↵ | |
2 | nameInfo.setLocalPart(name);↵ | 2 | nameInfo.setLocalPart(name);↵ | |
3 | if (xmlMap != null)↵ | 3 | if (xmlMap != null)↵ | |
4 | {↵ | 4 | {↵ | |
5 | XMLResource.XMLInfo clsInfo = xmlMap.getInfo(eDataType);↵ | 5 | XMLResource.XMLInfo clsInfo = xmlMap.getInfo(c);↵ | |
6 | if (clsInfo != null)↵ | 6 | if (clsInfo != null)↵ | |
7 | {↵ | 7 | {↵ | |
8 | String targetNamespace = clsInfo.getTargetNamespace();↵ | 8 | String targetNamespace = clsInfo.getTargetNamespace();↵ | |
9 | nameInfo.setNamespaceURI(targetNamespace);↵ | 9 | nameInfo.setNamespaceURI(targetNamespace);↵ | |
10 | nameInfo.setQualifiedName(getQName(targetNamespace, name));↵ | 10 | nameInfo.setQualifiedName(getQName(targetNamespace, name));↵ | |
11 | return;↵ | 11 | return;↵ | |
12 | }↵ | 12 | }↵ | |
13 | }↵ | 13 | }↵ | |
14 | getQName(nameInfo, eDataType.getEPackage(), name); | 14 | getQName(nameInfo, c.getEPackage(), name); | |
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 | 38 |
Number of mapped statements | 10 |
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) | 23.2 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | String name = getName(eDataType); |
| 1 | String name = getName(c); | ||||||||||||||
2 | nameInfo.setLocalPart(name); | 2 | nameInfo.setLocalPart(name); | |||||||||||||||
3 | if (xmlMap != null) | 3 | if (xmlMap != null) | |||||||||||||||
4 | XMLResource.XMLInfo clsInfo = xmlMap.getInfo(eDataType); |
| 4 | XMLResource.XMLInfo clsInfo = xmlMap.getInfo(c); | ||||||||||||||
5 | if (clsInfo != null) | 5 | if (clsInfo != null) | |||||||||||||||
6 | String targetNamespace = clsInfo.getTargetNamespace(); | 6 | String targetNamespace = clsInfo.getTargetNamespace(); | |||||||||||||||
7 | nameInfo.setNamespaceURI(targetNamespace); | 7 | nameInfo.setNamespaceURI(targetNamespace); | |||||||||||||||
8 | nameInfo.setQualifiedName(getQName(targetNamespace, name)); | 8 | nameInfo.setQualifiedName(getQName(targetNamespace, name)); | |||||||||||||||
9 | return; | 9 | return; | |||||||||||||||
10 | getQName(nameInfo, eDataType.getEPackage(), name); |
| 10 | getQName(nameInfo, c.getEPackage(), name); |
Row | Violation |
---|---|
1 | Type org.eclipse.emf.ecore.EDataType of variable eDataType does not match with type org.eclipse.emf.ecore.EClass of variable c |
2 | Type org.eclipse.emf.ecore.EDataType of variable eDataType does not match with type org.eclipse.emf.ecore.EClass of variable c |
3 | Type org.eclipse.emf.ecore.EDataType of variable eDataType does not match with type org.eclipse.emf.ecore.EClass of variable c |