File path: /emf-2.4.1/src/org/eclipse/emf/ecore/xmi/impl/XMLLoadImpl.java | File path: /emf-2.4.1/src/org/eclipse/emf/ecore/xmi/impl/XMLLoadImpl.java | |||
Method name: String getURI(int)
|
Method name: String getLocalName(int)
|
|||
Number of AST nodes: 7 | Number of AST nodes: 7 | |||
1 | Node node = attributes.item(index);↵ | 1 | Node node = attributes.item(index);↵ | |
2 | if (node != null)↵ | 2 | if (node != null)↵ | |
3 | {↵ | 3 | {↵ | |
4 | String namespaceURI = node.getNamespaceURI();↵ | 4 | String prefix = node.getPrefix();↵ | |
5 | if (ExtendedMetaData.XMLNS_URI.equals(namespaceURI))↵ | 5 | if (ExtendedMetaData.XMLNS_PREFIX.equals(prefix))↵ | |
6 | {↵ | 6 | {↵ | |
7 | return "";↵ | 7 | return "";↵ | |
8 | }↵ | 8 | }↵ | |
9 | return namespaceURI;↵ | 9 | return node.getLocalName();↵ | |
10 | }↵ | 10 | }↵ | |
11 | return null; | 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.2 |
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) | 1.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | Node node = attributes.item(index); | 1 | Node node = attributes.item(index); | ||||||||||||||||
2 | if (node != null) | 2 | if (node != null) | ||||||||||||||||
3 | String namespaceURI = node.getNamespaceURI(); |
| 3 | String prefix = node.getPrefix(); | |||||||||||||||
4 | if (ExtendedMetaData.XMLNS_URI.equals(namespaceURI)) |
| 4 | if (ExtendedMetaData.XMLNS_PREFIX.equals(prefix)) | |||||||||||||||
5 | return ""; | 5 | return ""; | ||||||||||||||||
6 | return namespaceURI; |
| 6 | return node.getLocalName(); | |||||||||||||||
7 | return null; | 7 | return null; |
Row | Violation |
---|---|
1 | Expression node.getNamespaceURI() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression node.getPrefix() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression namespaceURI cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression node.getLocalName() cannot be parameterized, because it has dependencies to/from statements that will be extracted |