list = resultList;
objects = resultList.data();
listSize = count;
if (count > positions.length)
{
int [] oldPositions = positions;
positions = new int [count];
System.arraycopy(oldPositions, 0, positions, 0, count);
}
list = resultList;
objects = resultList.data();
listSize = count;
if (count > positions.length)
{
int [] oldPositions = positions;
positions = new int [count];
System.arraycopy(oldPositions, 0, positions, 0, count);
}
Clone fragments detected by clone detection tool
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: 7
|
|
Number of AST nodes: 7
|
|
1 | list = resultList;↵ | | 1 | list = resultList;↵
|
2 | objects = resultList.data();↵ | | 2 | objects = resultList.data();↵
|
3 | listSize = count;↵ | | 3 | listSize = count;↵
|
4 | ↵ | | 4 | ↵
|
5 | if (count > positions.length)↵ | | 5 | if (count > positions.length)↵
|
6 | {↵ | | 6 | {↵
|
7 | int [] oldPositions = positions;↵ | | 7 | int [] oldPositions = positions;↵
|
8 | positions = new int [count];↵ | | 8 | positions = new int [count];↵
|
9 | System.arraycopy(oldPositions, 0, positions, 0, count);↵ | | 9 | System.arraycopy(oldPositions, 0, positions, 0, count);↵
|
10 | } | | 10 | }
|
See real code fragment |
|
See real code fragment |
Summary
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) | 1.8 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 76 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 7 |
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) | 1.6 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
45 | list = resultList; | | 45 | list = resultList; |
46 | objects = resultList.data(); | | 46 | objects = resultList.data(); |
47 | listSize = count; | | 47 | listSize = count; |
48 | if (count > positions.length) | | 48 | if (count > positions.length) |
49 | int[] oldPositions = positions; | | 49 | int[] oldPositions = positions; |
50 | positions = new int[count]; | | 50 | positions = new int[count]; |
51 | System.arraycopy(oldPositions, 0, positions, 0, count); | | 51 | System.arraycopy(oldPositions, 0, positions, 0, count); |
Precondition Violations (1)
Row |
Violation |
1 | Clone fragment #1 returns variables objects, positions, listSize, list , while Clone fragment #2 returns variables objects, positions, listSize, list |