File path: /columba-1.4-src/core/src/main/java/org/columba/core/base/ListTools.java | File path: /columba-1.4-src/core/src/main/java/org/columba/core/base/ListTools.java | |||
Method name: void intersect(List, List)
|
Method name: void substract(List, List)
|
|||
Number of AST nodes: 10 | Number of AST nodes: 10 | |||
1 | Collections.sort(a);↵ | 1 | Collections.sort(a);↵ | |
2 | Collections.sort(b);↵ | 2 | Collections.sort(b);↵ | |
3 | aIt = a.listIterator();↵ | 3 | aIt = a.listIterator();↵ | |
4 | bIt = b.listIterator();↵ | 4 | bIt = b.listIterator();↵ | |
5 | Comparable aVal;↵ | 5 | Comparable aVal;↵ | |
6 | Comparable bVal;↵ | 6 | Comparable bVal;↵ | |
7 | aVal = (Comparable) aIt.next();↵ | 7 | aVal = (Comparable) aIt.next();↵ | |
8 | bVal = (Comparable) bIt.next();↵ | 8 | bVal = (Comparable) bIt.next();↵ | |
9 | boolean loop = true;↵ | 9 | boolean loop = true;↵ | |
10 | int compareResult; | 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.0 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 101 |
Number of mapped statements | 10 |
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) | 0.0 |
Clone type | Type 1 |
ID | Statement | ID | Statement | |
---|---|---|---|---|
8 | Collections.sort(a); | 5 | Collections.sort(a); | |
9 | Collections.sort(b); | 6 | Collections.sort(b); | |
10 | aIt = a.listIterator(); | 7 | aIt = a.listIterator(); | |
11 | bIt = b.listIterator(); | 8 | bIt = b.listIterator(); | |
12 | Comparable aVal; | 9 | Comparable aVal; | |
13 | Comparable bVal; | 10 | Comparable bVal; | |
14 | aVal = (Comparable)aIt.next(); | 11 | aVal = (Comparable)aIt.next(); | |
15 | bVal = (Comparable)bIt.next(); | 12 | bVal = (Comparable)bIt.next(); | |
16 | boolean loop = true; | 13 | boolean loop = true; | |
17 | int compareResult; | 14 | int compareResult; |
Row | Violation |
---|---|
1 | Clone fragment #1 returns variables loop, aVal, bVal, compareResult, aIt, bIt , while Clone fragment #2 returns variables loop, aVal, bVal, compareResult, aIt, bIt |