File path: /emf-2.4.1/src/org/eclipse/emf/common/util/DelegatingEList.java | File path: /emf-2.4.1/src/org/eclipse/emf/common/util/DelegatingEList.java | |||
Method name: boolean retainAll(Collection>)
|
Method name: boolean removeAll(Collection>)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | boolean modified = false;↵ | 1 | boolean modified = false;↵ | |
2 | for (ListIterator<?> i = listIterator(); i.hasNext(); )↵ | 2 | for (ListIterator<?> i = listIterator(); i.hasNext(); )↵ | |
3 | {↵ | 3 | {↵ | |
4 | if (!collection.contains(i.next()))↵ | 4 | if (collection.contains(i.next()))↵ | |
5 | {↵ | 5 | {↵ | |
6 | i.remove();↵ | 6 | i.remove();↵ | |
7 | modified = true;↵ | 7 | modified = true;↵ | |
8 | }↵ | 8 | }↵ | |
9 | }↵ | 9 | }↵ | |
10 | return modified; | 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.2 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 14 |
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) | 2098.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | boolean modified = false; | 1 | boolean modified = false; | |||||||||||||
2 | for (ListIterator<?> i = listIterator(); i.hasNext(); ) |
| 2 | for (ListIterator<?> i = listIterator(); i.hasNext(); ) | ||||||||||||
3 | if (!collection.contains(i.next())) |
| 3 | if (collection.contains(i.next())) | ||||||||||||
4 | i.remove(); |
| 4 | i.remove(); | ||||||||||||
5 | modified = true; | 5 | modified = true; | |||||||||||||
6 | return modified; | 6 | return modified; |
Row | Violation |
---|---|
1 | Type java.util.ListIterator<> of variable i does not match with type java.util.ListIterator<> of variable i |
2 | Expression !collection.contains(i.next()) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression collection.contains(i.next()) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Type java.util.ListIterator<> of variable i does not match with type java.util.ListIterator<> of variable i |