File path: /emf-2.4.1/src/org/eclipse/emf/mapping/presentation/MappingEditor.java | File path: /emf-2.4.1/src/org/eclipse/emf/mapping/presentation/MappingEditor.java | |||
Method name: Collection> getChildren(Object)
|
Method name: boolean hasChildren(Object)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | for (Iterator<Object> tree = new AdapterFactoryTreeIterator<Object>(getDecoratedAdapterFactory(), child, true); tree.hasNext(); )↵ | 1 | for (Iterator<Object> tree = new AdapterFactoryTreeIterator<Object>(getDecoratedAdapterFactory(), o, false); tree.hasNext(); )↵ | |
2 | {↵ | 2 | ↵ | |
3 | ↵ | 3 | {↵ | |
4 | Object descendant = tree.next();↵ | 4 | Object descendant = tree.next();↵ | |
5 | if (mappingDomain.getMappingRoot().getMappings(descendant).isEmpty() == exclude)↵ | 5 | if (mappingDomain.getMappingRoot().getMappings(descendant).isEmpty() == exclude)↵ | |
6 | {↵ | 6 | {↵ | |
7 | continue LOOP;↵ | 7 | ↵ | |
8 | ↵ | 8 | return true;↵ | |
9 | }↵ | 9 | }↵ | |
10 | } | 10 |
| |
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.6 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 10 |
Number of mapped statements | 3 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 9.2 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5 | for (Iterator<Object> tree = new AdapterFactoryTreeIterator<Object>(getDecoratedAdapterFactory(), child, true); tree.hasNext(); ) |
| 2 | for (Iterator<Object> tree = new AdapterFactoryTreeIterator<Object>(getDecoratedAdapterFactory(), o, false); tree.hasNext(); ) | |||||||||||||
6 | Object descendant = tree.next(); | 3 | Object descendant = tree.next(); | ||||||||||||||
7 | if (mappingDomain.getMappingRoot().getMappings(descendant).isEmpty() == exclude) | 4 | if (mappingDomain.getMappingRoot().getMappings(descendant).isEmpty() == exclude) | ||||||||||||||
|
| 5 | return true; | ||||||||||||||
8 | continue LOOP; |
| |
Row | Violation |
---|---|
1 | Unmatched return true; |
2 | Unmatched continue LOOP; |