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: String getQName(EClass)
|
Method name: String getQName(EDataType)
|
|||
Number of AST nodes: 7 | Number of AST nodes: 7 | |||
1 | String name = getName(c);↵ | 1 | String name = getName(c);↵ | |
2 | if (xmlMap != null)↵ | 2 | if (xmlMap != null)↵ | |
3 | {↵ | 3 | {↵ | |
4 | XMLResource.XMLInfo clsInfo = xmlMap.getInfo(c);↵ | 4 | XMLResource.XMLInfo clsInfo = xmlMap.getInfo(c);↵ | |
5 | if (clsInfo != null)↵ | 5 | if (clsInfo != null)↵ | |
6 | {↵ | 6 | {↵ | |
7 | String targetNamespace = clsInfo.getTargetNamespace();↵ | 7 | String targetNamespace = clsInfo.getTargetNamespace();↵ | |
8 | return getQName(targetNamespace, name);↵ | 8 | return getQName(targetNamespace, name);↵ | |
9 | }↵ | 9 | }↵ | |
10 | }↵ | 10 | }↵ | |
11 | return getQName(c.getEPackage(), name); | 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 declared in the same class |
Number of node comparisons | 17 |
Number of mapped statements | 7 |
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) | 21.6 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | String name = getName(c); |
| 1 | String name = getName(c); | |||||||||||
2 | if (xmlMap != null) | 2 | if (xmlMap != null) | ||||||||||||
3 | XMLResource.XMLInfo clsInfo = xmlMap.getInfo(c); |
| 3 | XMLResource.XMLInfo clsInfo = xmlMap.getInfo(c); | |||||||||||
4 | if (clsInfo != null) | 4 | if (clsInfo != null) | ||||||||||||
5 | String targetNamespace = clsInfo.getTargetNamespace(); | 5 | String targetNamespace = clsInfo.getTargetNamespace(); | ||||||||||||
6 | return getQName(targetNamespace, name); | 6 | return getQName(targetNamespace, name); | ||||||||||||
7 | return getQName(c.getEPackage(), name); |
| 7 | return getQName(c.getEPackage(), name); |
Row | Violation |
---|---|
1 | Type org.eclipse.emf.ecore.EClass of variable c does not match with type org.eclipse.emf.ecore.EDataType of variable c |
2 | Type org.eclipse.emf.ecore.EClass of variable c does not match with type org.eclipse.emf.ecore.EDataType of variable c |
3 | Type org.eclipse.emf.ecore.EClass of variable c does not match with type org.eclipse.emf.ecore.EDataType of variable c |