File path: /emf-2.4.1/src/org/eclipse/emf/common/notify/impl/NotifyingListImpl.java | File path: /emf-2.4.1/src/org/eclipse/emf/common/util/BasicEList.java | |||
Method name: boolean removeAll(Collection>)
|
Method name: boolean removeAll(Collection>)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | for (int i = size; --i >= 0; )↵ | 1 | for (int i = size; --i >= 0; )↵ | |
2 | {↵ | 2 | ↵ | |
3 | ↵ | 3 | {↵ | |
4 | if (collection.contains(data[i]))↵ | 4 | if (collection.contains(data[i]))↵ | |
5 | {↵ | 5 | {↵ | |
6 | doRemove(i);↵ | 6 | remove(i);↵ | |
7 | result = true;↵ | 7 | modified = true;↵ | |
8 | }↵ | 8 | ↵ | |
9 | ↵ | 9 | }↵ | |
10 | } | 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.3 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 10 |
Number of mapped statements | 3 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 0.9 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
68 | for (int i = size; --i >= 0; ) | 2 | for (int i = size; --i >= 0; ) | ||||||||||||
69 | if (collection.contains(data[i])) |
| 3 | if (collection.contains(data[i])) | |||||||||||
|
| 4 | remove(i); | ||||||||||||
70 | doRemove(i); |
| | ||||||||||||
71 | result = true; |
| 5 | modified = true; |
Row | Violation |
---|---|
1 | Type java.util.Collection<> of variable collection does not match with type java.util.Collection<> of variable collection |
2 | Unmatched statement remove(i); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
3 | Unmatched statement doRemove(i); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
4 | Clone fragment #1 returns variables i, result , while Clone fragment #2 returns variables i, modified |