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 refreshMappedObjectStates(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 | ↵ | 3 | {↵ | |
4 | MappedObjectState mappedObjectState = getMappedObjectState(input);↵ | 4 | MappedObjectState mappedObjectState = getMappedObjectState(input);↵ | |
5 | if (mappedObjectState != null)↵ | 5 | if (mappedObjectState != null)↵ | |
6 | {↵ | 6 | ↵ | |
7 | ↵ | 7 | {↵ | |
8 | mappedObjectState.getMappings().add(mapping);↵ | 8 | mappedObjectState.getMappings().remove(mapping);↵ | |
9 | }↵ | 9 | ↵ | |
10 | ↵ | 10 | }↵ | |
11 | }↵ | 11 | }↵ | |
12 | for (Object output : mapping.getOutputs())↵ | 12 | for (Object output : mapping.getOutputs())↵ | |
13 | {↵ | 13 | ↵ | |
14 | ↵ | 14 | {↵ | |
15 | MappedObjectState mappedObjectState = getMappedObjectState(output);↵ | 15 | MappedObjectState mappedObjectState = getMappedObjectState(output);↵ | |
16 | if (mappedObjectState != null)↵ | 16 | if (mappedObjectState != null)↵ | |
17 | {↵ | 17 | {↵ | |
18 | mappedObjectState.getMappings().add(mapping);↵ | 18 | mappedObjectState.getMappings().remove(mapping);↵ | |
19 | }↵ | 19 | ↵ | |
20 | ↵ | 20 | }↵ | |
21 | } | 21 |
| |
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 | 29 |
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) | 64.8 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
14 | for (Object input : mapping.getInputs()) |
| 5 | for (Object output : mapping.getOutputs()) | |||||||||||||
15 | MappedObjectState mappedObjectState = getMappedObjectState(input); |
| 6 | MappedObjectState mappedObjectState = getMappedObjectState(output); | |||||||||||||
16 | if (mappedObjectState != null) | 7 | if (mappedObjectState != null) | ||||||||||||||
17 | mappedObjectState.getMappings().add(mapping); |
| 8 | mappedObjectState.getMappings().remove(mapping); | |||||||||||||
18 | for (Object output : mapping.getOutputs()) |
| 1 | for (Object input : mapping.getInputs()) | |||||||||||||
19 | MappedObjectState mappedObjectState = getMappedObjectState(output); |
| 2 | MappedObjectState mappedObjectState = getMappedObjectState(input); | |||||||||||||
20 | if (mappedObjectState != null) | 3 | if (mappedObjectState != null) | ||||||||||||||
21 | mappedObjectState.getMappings().add(mapping); |
| 4 | 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 |