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 | LOOP:↵ | 1 | LOOP:↵ | |
2 | for (int repeat = 0; repeat < 2; ++repeat)↵ | 2 | for (int repeat = 0; repeat < 2; ++repeat)↵ | |
3 | {↵ | 3 | {↵ | |
4 | for (int j = listSize; --j >= 0; )↵ | 4 | for (int j = listSize; --j >= 0; )↵ | |
5 | {↵ | 5 | {↵ | |
6 | if (equalObjects(object, objects[j]))↵ | 6 | if (equalObjects(object, objects[j]))↵ | |
7 | {↵ | 7 | {↵ | |
8 | if (positions.length <= count)↵ | 8 | if (positions.length <= count)↵ | |
9 | {↵ | 9 | {↵ | |
10 | int [] oldPositions = positions;↵ | 10 | int [] oldPositions = positions;↵ | |
11 | positions = new int [2 * positions.length];↵ | 11 | positions = new int [2 * positions.length];↵ | |
12 | System.arraycopy(oldPositions, 0, positions, 0, count);↵ | 12 | System.arraycopy(oldPositions, 0, positions, 0, count);↵ | |
13 | }↵ | 13 | }↵ | |
14 | positions[count++] = i.previousIndex();↵ | 14 | positions[count++] = i;↵ | |
15 | resultList.add(objects[j]);↵ | 15 | resultList.add(objects[j]);↵ | |
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 | 66 |
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) | 5.7 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
32 | for (int repeat = 0; repeat < 2; ++repeat) | 32 | for (int repeat = 0; repeat < 2; ++repeat) | |||||||||||
33 | for (int j = listSize; --j >= 0; ) | 33 | for (int j = listSize; --j >= 0; ) | |||||||||||
34 | if (equalObjects(object, objects[j])) | 34 | if (equalObjects(object, objects[j])) | |||||||||||
35 | if (positions.length <= count) | 35 | if (positions.length <= count) | |||||||||||
36 | int[] oldPositions = positions; | 36 | int[] oldPositions = positions; | |||||||||||
37 | positions = new int[2 * positions.length]; | 37 | positions = new int[2 * positions.length]; | |||||||||||
38 | System.arraycopy(oldPositions, 0, positions, 0, count); | 38 | System.arraycopy(oldPositions, 0, positions, 0, count); | |||||||||||
39 | positions[count++] = i.previousIndex(); |
| 39 | positions[count++] = i; | ||||||||||
40 | resultList.add(objects[j]); | 40 | resultList.add(objects[j]); | |||||||||||
41 | break LOOP; | 41 | break LOOP; | |||||||||||
42 | object = resolve(object); | 42 | object = resolve(object); | |||||||||||
43 | if (object == initialObject) | 43 | if (object == initialObject) | |||||||||||
44 | break; | 44 | break; |
Row | Violation |
---|---|
1 | Clone fragment #1 returns variables count, positions , while Clone fragment #2 returns variables count, positions |