File path: /emf-2.4.1/src/org/eclipse/emf/mapping/provider/MappingItemProvider.java | File path: /emf-2.4.1/src/org/eclipse/emf/mapping/provider/MappingItemProvider.java | |||
Method name: void register()
|
Method name: void deregister()
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | for (Object object : mappingCollection)↵ | 1 | for (Object object : mappingCollection)↵ | |
2 | {↵ | 2 | {↵ | |
3 | Mapping mapping = (Mapping)object;↵ | 3 | Mapping mapping = (Mapping)object;↵ | |
4 | for (TreeIterator<Mapping> mappings = mapping.treeIterator(); mappings.hasNext(); )↵ | 4 | for (TreeIterator<Mapping> mappings = mapping.treeIterator(); mappings.hasNext(); )↵ | |
5 | {↵ | 5 | {↵ | |
6 | Mapping childMapping = mappings.next();↵ | 6 | Mapping childMapping = mappings.next();↵ | |
7 | mappingRoot.register(childMapping);↵ | 7 | mappingRoot.deregister(childMapping);↵ | |
8 | }↵ | 8 | }↵ | |
9 | } | 9 |
| |
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.4 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 13 |
Number of mapped statements | 4 |
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) | 17.5 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2 | Mapping mapping = (Mapping)object; | 2 | Mapping mapping = (Mapping)object; | |||||||||||||||
3 | for (TreeIterator<Mapping> mappings = mapping.treeIterator(); mappings.hasNext(); ) |
| 3 | for (TreeIterator<Mapping> mappings = mapping.treeIterator(); mappings.hasNext(); ) | ||||||||||||||
4 | Mapping childMapping = mappings.next(); | 4 | Mapping childMapping = mappings.next(); | |||||||||||||||
5 | mappingRoot.register(childMapping); |
| 5 | mappingRoot.deregister(childMapping); |
Row | Violation |
---|---|
1 | Expression mappingRoot.register(childMapping) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression mappingRoot.deregister(childMapping) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression mappingRoot.register(childMapping) is a void method call, and thus it cannot be parameterized |
4 | Expression mappingRoot.deregister(childMapping) is a void method call, and thus it cannot be parameterized |
5 | Expression mappingRoot.register(childMapping) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression mappingRoot.deregister(childMapping) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Expression mappingRoot.register(childMapping) is a void method call, and thus it cannot be parameterized |
8 | Expression mappingRoot.deregister(childMapping) is a void method call, and thus it cannot be parameterized |