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/DefaultDOMHandlerImpl.java | |||
Method name: String getNamespaceURI(String)
|
Method name: EStructuralFeature getEStructuralFeature(Node)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | String namespaceURI = namespaceSupport.getURI(prefix);↵ | 1 | EStructuralFeature feature = nodeToFeature.get(node);↵ | |
2 | if (namespaceURI == null)↵ | 2 | if (feature == null)↵ | |
3 | {↵ | 3 | {↵ | |
4 | namespaceURI = prefixesToURIs.get(prefix);↵ | 4 | feature = nodeToFeature.get(node.getParentNode());↵ | |
5 | }↵ | 5 | ↵ | |
6 | }↵ | |||
6 | return namespaceURI; | 7 | return feature; | |
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 | 8 |
Number of mapped statements | 1 |
Number of unmapped statements in the first code fragment | 3 |
Number of unmapped statements in the second code fragment | 3 |
Time elapsed for statement mapping (ms) | 0.3 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | String namespaceURI = namespaceSupport.getURI(prefix); | | ||||||||||||||||
| 13 | EStructuralFeature feature = nodeToFeature.get(node); | ||||||||||||||||
2 | if (namespaceURI == null) |
| 14 | if (feature == null) | ||||||||||||||
3 | namespaceURI = prefixesToURIs.get(prefix); |
| | |||||||||||||||
|
| 15 | feature = nodeToFeature.get(node.getParentNode()); | |||||||||||||||
4 | return namespaceURI; |
| | |||||||||||||||
|
| 16 | return feature; |
Row | Violation |
---|---|
1 | Type java.lang.String of variable namespaceURI does not match with type org.eclipse.emf.ecore.EStructuralFeature of variable feature |
2 | Unmatched statement namespaceURI=prefixesToURIs.get(prefix); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
3 | Unmatched statement feature=nodeToFeature.get(node.getParentNode()); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
4 | Unmatched return namespaceURI; |
5 | Unmatched return feature; |