File path: /emf-2.4.1/src/org/eclipse/emf/common/notify/impl/DelegatingNotifyingListImpl.java | File path: /emf-2.4.1/src/org/eclipse/emf/common/notify/impl/NotifyingListImpl.java | |||
Method name: boolean removeAll(Collection>)
|
Method name: boolean removeAll(Collection>)
|
|||
Number of AST nodes: 14 | Number of AST nodes: 14 | |||
1 | E object = initialObject;↵ | 1 | E object = initialObject;↵ | |
2 | LOOP:↵ | 2 | LOOP:↵ | |
3 | for (int repeat = 0; repeat < 2; ++repeat)↵ | 3 | for (int repeat = 0; repeat < 2; ++repeat)↵ | |
4 | {↵ | 4 | {↵ | |
5 | for (int j = listSize; --j >= 0; )↵ | 5 | for (int j = listSize; --j >= 0; )↵ | |
6 | {↵ | 6 | {↵ | |
7 | if (equalObjects(object, objects[j]))↵ | 7 | if (equalObjects(object, objects[j]))↵ | |
8 | {↵ | 8 | {↵ | |
9 | if (count != j)↵ | 9 | if (count != j)↵ | |
10 | {↵ | 10 | {↵ | |
11 | Object x = objects[count];↵ | 11 | Object x = objects[count];↵ | |
12 | objects[count] = objects[j];↵ | 12 | objects[count] = objects[j];↵ | |
13 | objects[j] = x;↵ | 13 | objects[j] = x;↵ | |
14 | }↵ | 14 | }↵ | |
15 | positions[count++] = i.previousIndex();↵ | 15 | positions[count++] = i;↵ | |
16 | break LOOP;↵ | 16 | break LOOP;↵ | |
17 | }↵ | 17 | }↵ | |
18 | }↵ | 18 | }↵ | |
19 | object = resolve(object);↵ | 19 | object = resolve(object);↵ | |
20 | if (object == initialObject)↵ | 20 | if (object == initialObject)↵ | |
21 | {↵ | 21 | {↵ | |
22 | break;↵ | 22 | break;↵ | |
23 | }↵ | 23 | }↵ | |
24 | } | 24 |
| |
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.6 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 60 |
Number of mapped statements | 13 |
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) | 4.8 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
15 | E object = initialObject; | 15 | E object = initialObject; | |||||||||||
16 | for (int repeat = 0; repeat < 2; ++repeat) | 16 | for (int repeat = 0; repeat < 2; ++repeat) | |||||||||||
17 | for (int j = listSize; --j >= 0; ) | 17 | for (int j = listSize; --j >= 0; ) | |||||||||||
18 | if (equalObjects(object, objects[j])) | 18 | if (equalObjects(object, objects[j])) | |||||||||||
19 | if (count != j) | 19 | if (count != j) | |||||||||||
20 | Object x = objects[count]; | 20 | Object x = objects[count]; | |||||||||||
21 | objects[count] = objects[j]; | 21 | objects[count] = objects[j]; | |||||||||||
22 | objects[j] = x; | 22 | objects[j] = x; | |||||||||||
23 | positions[count++] = i.previousIndex(); |
| 23 | positions[count++] = i; | ||||||||||
24 | break LOOP; | 24 | break LOOP; | |||||||||||
25 | object = resolve(object); | 25 | object = resolve(object); | |||||||||||
26 | if (object == initialObject) | 26 | if (object == initialObject) | |||||||||||
27 | break; | 27 | break; |
Row | Violation |
---|---|
1 | Clone fragment #1 returns variables count, objects, positions , while Clone fragment #2 returns variables count, objects, positions |