File path: /emf-2.4.1/src/org/eclipse/emf/mapping/impl/MappingRootImpl.java | File path: /emf-2.4.1/src/org/eclipse/emf/mapping/impl/MappingRootImpl.java | |||
Method name: void register(Mapping)
|
Method name: void deregister(Mapping)
|
|||
Number of AST nodes: 8 | Number of AST nodes: 8 | |||
1 | for (Object input : mapping.getInputs())↵ | 1 | for (Object input : mapping.getInputs())↵ | |
2 | {↵ | 2 | {↵ | |
3 | MappedObjectState mappedObjectState = getMappedObjectState(input);↵ | 3 | MappedObjectState mappedObjectState = getMappedObjectState(input);↵ | |
4 | if (mappedObjectState != null)↵ | 4 | if (mappedObjectState != null)↵ | |
5 | {↵ | 5 | {↵ | |
6 | mappedObjectState.getMappings().add(mapping);↵ | 6 | mappedObjectState.getMappings().remove(mapping);↵ | |
7 | }↵ | 7 | }↵ | |
8 | }↵ | 8 | }↵ | |
9 | for (Object output : mapping.getOutputs())↵ | 9 | for (Object output : mapping.getOutputs())↵ | |
10 | {↵ | 10 | {↵ | |
11 | MappedObjectState mappedObjectState = getMappedObjectState(output);↵ | 11 | MappedObjectState mappedObjectState = getMappedObjectState(output);↵ | |
12 | if (mappedObjectState != null)↵ | 12 | if (mappedObjectState != null)↵ | |
13 | {↵ | 13 | {↵ | |
14 | mappedObjectState.getMappings().add(mapping);↵ | 14 | mappedObjectState.getMappings().remove(mapping);↵ | |
15 | }↵ | 15 | }↵ | |
16 | } | 16 |
| |
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.5 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 23 |
Number of mapped statements | 8 |
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) | 24.1 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | for (Object input : mapping.getInputs()) | 1 | for (Object input : mapping.getInputs()) | |||||||||||||
2 | MappedObjectState mappedObjectState = getMappedObjectState(input); | 2 | MappedObjectState mappedObjectState = getMappedObjectState(input); | |||||||||||||
3 | if (mappedObjectState != null) | 3 | if (mappedObjectState != null) | |||||||||||||
4 | mappedObjectState.getMappings().add(mapping); |
| 4 | mappedObjectState.getMappings().remove(mapping); | ||||||||||||
5 | for (Object output : mapping.getOutputs()) | 5 | for (Object output : mapping.getOutputs()) | |||||||||||||
6 | MappedObjectState mappedObjectState = getMappedObjectState(output); | 6 | MappedObjectState mappedObjectState = getMappedObjectState(output); | |||||||||||||
7 | if (mappedObjectState != null) | 7 | if (mappedObjectState != null) | |||||||||||||
8 | mappedObjectState.getMappings().add(mapping); |
| 8 | mappedObjectState.getMappings().remove(mapping); |
Row | Violation |
---|---|
1 | Expression mappedObjectState.getMappings().add(mapping) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression mappedObjectState.getMappings().remove(mapping) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression mappedObjectState.getMappings().add(mapping) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression mappedObjectState.getMappings().remove(mapping) cannot be parameterized, because it has dependencies to/from statements that will be extracted |