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/DelegatingNotifyingListImpl.java | |||
Method name: boolean addAllUnique(int, Collection extends E>)
|
Method name: boolean addAllUnique(int, Object[], int, int)
|
|||
Number of AST nodes: 10 | Number of AST nodes: 10 | |||
1 | NotificationChain notifications = createNotificationChain(collectionSize);↵ | 1 | NotificationChain notifications = createNotificationChain(collectionSize);↵ | |
2 | int lastIndex = index + collectionSize;↵ | 2 | int lastIndex = index + collectionSize;↵ | |
3 | for (int i = index; i < lastIndex; ++i)↵ | 3 | for (int i = index; i < lastIndex; ++i)↵ | |
4 | { ↵ | 4 | { ↵ | |
5 | E value = delegateGet(i);↵ | 5 | E value = delegateGet(i);↵ | |
6 | notifications = inverseAdd(value, notifications);↵ | 6 | notifications = inverseAdd(value, notifications);↵ | |
7 | notifications = shadowAdd(value, notifications);↵ | 7 | notifications = shadowAdd(value, notifications);↵ | |
8 | }↵ | 8 | }↵ | |
9 | if (notifications == null)↵ | 9 | if (notifications == null)↵ | |
10 | {↵ | 10 | {↵ | |
11 | dispatchNotification(notification);↵ | 11 | dispatchNotification(notification);↵ | |
12 | }↵ | 12 | }↵ | |
13 | else↵ | 13 | else↵ | |
14 | {↵ | 14 | {↵ | |
15 | notifications.add(notification);↵ | 15 | notifications.add(notification);↵ | |
16 | notifications.dispatch();↵ | 16 | notifications.dispatch();↵ | |
17 | } | 17 |
| |
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.3 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 54 |
Number of mapped statements | 10 |
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) | 2.1 |
Clone type | Type 1 |
ID | Statement | ID | Statement | |
---|---|---|---|---|
9 | NotificationChain notifications = createNotificationChain(collectionSize); | 17 | NotificationChain notifications = createNotificationChain(collectionSize); | |
10 | int lastIndex = index + collectionSize; | 18 | int lastIndex = index + collectionSize; | |
11 | for (int i = index; i < lastIndex; ++i) | 19 | for (int i = index; i < lastIndex; ++i) | |
12 | E value = delegateGet(i); | 20 | E value = delegateGet(i); | |
13 | notifications = inverseAdd(value, notifications); | 21 | notifications = inverseAdd(value, notifications); | |
14 | notifications = shadowAdd(value, notifications); | 22 | notifications = shadowAdd(value, notifications); | |
15 | if (notifications == null) | 23 | if (notifications == null) | |
16 | dispatchNotification(notification); | 24 | dispatchNotification(notification); | |
else | else | |||
17 | notifications.add(notification); | 25 | notifications.add(notification); | |
18 | notifications.dispatch(); | 26 | notifications.dispatch(); |
Row | Violation |
---|