File path: /emf-2.4.1/src/org/eclipse/emf/mapping/presentation/SimpleMappedObjectViewer.java | File path: /emf-2.4.1/src/org/eclipse/emf/mapping/presentation/SimpleMappedObjectViewer.java | |||
Method name: void updateActions()
|
Method name: void updateActions()
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | if (isReady)↵ | 1 | if (isReady)↵ | |
2 | {↵ | 2 | {↵ | |
3 | if (nextMapped == null)↵ | 3 | if (nextUnmapped == null)↵ | |
4 | {↵ | 4 | {↵ | |
5 | nextMapped = child;↵ | 5 | nextUnmapped = child;↵ | |
6 | if (nextUnmapped != null)↵ | 6 | if (nextMapped != null)↵ | |
7 | {↵ | 7 | {↵ | |
8 | break LOOP;↵ | 8 | break LOOP;↵ | |
9 | }↵ | 9 | }↵ | |
10 | }↵ | 10 | }↵ | |
11 | }↵ | 11 | }↵ | |
12 | else↵ | 12 | else↵ | |
13 | {↵ | 13 | {↵ | |
14 | previousMapped = child;↵ | 14 | previousUnmapped = child;↵ | |
15 | } | 15 |
| |
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 in the same method |
Number of node comparisons | 16 |
Number of mapped statements | 6 |
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 | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
25 | if (isReady) | 19 | if (isReady) | |||||||||||
26 | if (nextMapped == null) |
| 20 | if (nextUnmapped == null) | ||||||||||
27 | nextMapped = child; |
| 21 | nextUnmapped = child; | ||||||||||
28 | if (nextUnmapped != null) |
| 22 | if (nextMapped != null) | ||||||||||
29 | break LOOP; |
| 23 | break LOOP; | ||||||||||
else | else | |||||||||||||
30 | previousMapped = child; |
| 24 | previousUnmapped = child; |
Row | Violation |
---|---|
1 | Statement break LOOP; without innermost loop |
2 | Statement break LOOP; without innermost loop |
3 | Clone fragment #1 returns variables nextMapped, previousMapped , while Clone fragment #2 returns variables nextUnmapped, previousUnmapped |