NotificationChain notifications = createNotificationChain(listSize);
// Copy to a list and allocate positions.
//
BasicEList<Object> list = new BasicEList<Object>(collection);
Object [] objects = list.data();
positions = new int [listSize];
int count = 0;
NotificationChain notifications = createNotificationChain(listSize);
// Copy to a list and allocate positions.
//
BasicEList<Object> list = new BasicEList<Object>(collection);
Object[] objects = list.data();
positions = new int [listSize];
int count = 0;
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: 5
|
|
Number of AST nodes: 5
|
|
1 | NotificationChain notifications = createNotificationChain(listSize);↵ | | 1 | NotificationChain notifications = createNotificationChain(listSize);↵
|
|
2 | // Copy to a list and allocate positions.↵ | | 2 | // Copy to a list and allocate positions.↵
|
3 | //↵ | | 3 | //↵
|
4 | BasicEList<Object> list = new BasicEList<Object>(collection);↵ | | 4 | BasicEList<Object> list = new BasicEList<Object>(collection);↵
|
5 | Object [] objects = list.data();↵ | | 5 | Object[] objects = list.data();↵
|
6 | positions = new int [listSize];↵ | | 6 | positions = new int [listSize];↵
|
7 | int count = 0; | | 7 | int count = 0;
|
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) | 0.0 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 34 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 5 |
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) | 0.0 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
7 | NotificationChain notifications = createNotificationChain(listSize); | | 7 | NotificationChain notifications = createNotificationChain(listSize); |
8 | BasicEList<Object> list = new BasicEList<Object>(collection); | | 8 | BasicEList<Object> list = new BasicEList<Object>(collection); |
9 | Object[] objects = list.data(); | | 9 | Object[] objects = list.data(); |
10 | positions = new int[listSize]; | | 10 | positions = new int[listSize]; |
11 | int count = 0; | | 11 | int count = 0; |
Precondition Violations (2)
Row |
Violation |
1 | Type java.util.Collection<> of variable collection does not match with type java.util.Collection<> of variable collection |
2 | Clone fragment #1 returns variables objects, count, positions, list, notifications , while Clone fragment #2 returns variables objects, count, positions, list, notifications |