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/notify/impl/NotifyingListImpl.java | |||
Method name: boolean addAllUnique(int, Collection extends E>)
|
Method name: boolean addAllUnique(int, Object[], int, int)
|
|||
Number of AST nodes: 9 | Number of AST nodes: 9 | |||
1 | doAddAllUnique(index, collection);↵ | 1 | doAddAllUnique(index, objects, start, end);↵ | |
2 | if (hasInverse())↵ | 2 | if (hasInverse())↵ | |
3 | {↵ | 3 | {↵ | |
4 | NotificationChain notifications = createNotificationChain(collectionSize);↵ | 4 | NotificationChain notifications = createNotificationChain(collectionSize);↵ | |
5 | int lastIndex = index + collectionSize;↵ | 5 | int lastIndex = index + collectionSize;↵ | |
6 | for (int i = index; i < lastIndex; ++i)↵ | 6 | for (int i = index; i < lastIndex; ++i)↵ | |
7 | { ↵ | 7 | { ↵ | |
8 | @SuppressWarnings("unchecked") E object = (E)data[i];↵ | 8 | @SuppressWarnings("unchecked") E object = (E)data[i];↵ | |
9 | notifications = inverseAdd(object, notifications);↵ | 9 | notifications = inverseAdd(object, notifications);↵ | |
10 | }↵ | 10 | }↵ | |
11 | if (notifications != null) notifications.dispatch();↵ | 11 | if (notifications != null) notifications.dispatch();↵ | |
12 | } | 12 |
| |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.9 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 58 |
Number of mapped statements | 9 |
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.3 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
20 | doAddAllUnique(index, collection); |
| 28 | doAddAllUnique(index, objects, start, end); | ||||||||||
21 | if (hasInverse()) | 29 | if (hasInverse()) | |||||||||||
22 | NotificationChain notifications = createNotificationChain(collectionSize); | 30 | NotificationChain notifications = createNotificationChain(collectionSize); | |||||||||||
23 | int lastIndex = index + collectionSize; | 31 | int lastIndex = index + collectionSize; | |||||||||||
24 | for (int i = index; i < lastIndex; ++i) | 32 | for (int i = index; i < lastIndex; ++i) | |||||||||||
25 | @SuppressWarnings("unchecked") E object = (E)data[i]; | 33 | @SuppressWarnings("unchecked") E object = (E)data[i]; | |||||||||||
26 | notifications = inverseAdd(object, notifications); | 34 | notifications = inverseAdd(object, notifications); | |||||||||||
27 | if (notifications != null) | 35 | if (notifications != null) | |||||||||||
28 | notifications.dispatch(); | 36 | notifications.dispatch(); |
Row | Violation |
---|