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: void clear()
|
Method name: void clear()
|
|||
Number of AST nodes: 12 | Number of AST nodes: 12 | |||
1 | Notification notification =↵ | 1 | Notification notification =↵ | |
2 | (collectionSize == 1 ?↵ | 2 | (collectionSize == 1 ?↵ | |
3 | createNotification(Notification.REMOVE, collection.get(0), null, 0, oldIsSet) :↵ | 3 | createNotification(Notification.REMOVE, collection.get(0), null, 0, oldIsSet) :↵ | |
4 | createNotification(Notification.REMOVE_MANY, collection, null, Notification.NO_INDEX, oldIsSet));↵ | 4 | createNotification(Notification.REMOVE_MANY, collection, null, Notification.NO_INDEX, oldIsSet));↵ | |
5 | if (hasInverse())↵ | 5 | if (hasInverse())↵ | |
6 | {↵ | 6 | {↵ | |
7 | for (Iterator<E> i = collection.iterator(); i.hasNext(); )↵ | 7 | for (Iterator<E> i = collection.iterator(); i.hasNext(); )↵ | |
8 | {↵ | 8 | {↵ | |
9 | notifications = inverseRemove(i.next(), notifications);↵ | 9 | notifications = inverseRemove(i.next(), notifications);↵ | |
10 | }↵ | 10 | }↵ | |
11 | if (notifications == null)↵ | 11 | if (notifications == null)↵ | |
12 | {↵ | 12 | {↵ | |
13 | dispatchNotification(notification);↵ | 13 | dispatchNotification(notification);↵ | |
14 | }↵ | 14 | }↵ | |
15 | else↵ | 15 | else↵ | |
16 | {↵ | 16 | {↵ | |
17 | notifications.add(notification);↵ | 17 | notifications.add(notification);↵ | |
18 | notifications.dispatch();↵ | 18 | notifications.dispatch();↵ | |
19 | }↵ | 19 | }↵ | |
20 | }↵ | 20 | }↵ | |
21 | else↵ | 21 | else↵ | |
22 | {↵ | 22 | {↵ | |
23 | if (notifications == null)↵ | 23 | if (notifications == null)↵ | |
24 | {↵ | 24 | {↵ | |
25 | dispatchNotification(notification);↵ | 25 | dispatchNotification(notification);↵ | |
26 | }↵ | 26 | }↵ | |
27 | else↵ | 27 | else↵ | |
28 | {↵ | 28 | {↵ | |
29 | notifications.add(notification);↵ | 29 | notifications.add(notification);↵ | |
30 | notifications.dispatch();↵ | 30 | notifications.dispatch();↵ | |
31 | }↵ | 31 | }↵ | |
32 | } | 32 |
| |
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 | 62 |
Number of mapped statements | 12 |
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) | 9.7 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
12 | Notification notification = (collectionSize == 1 ? createNotification(Notification.REMOVE, collection.get(0), null, 0, oldIsSet) : createNotification(Notification.REMOVE_MANY, collection, null, Notification.NO_INDEX, oldIsSet)); |
| 12 | Notification notification = (collectionSize == 1 ? createNotification(Notification.REMOVE, collection.get(0), null, 0, oldIsSet) : createNotification(Notification.REMOVE_MANY, collection, null, Notification.NO_INDEX, oldIsSet)); | |||||||||||||||
13 | if (hasInverse()) | 13 | if (hasInverse()) | ||||||||||||||||
14 | for (Iterator<E> i = collection.iterator(); i.hasNext(); ) |
| 14 | for (Iterator<E> i = collection.iterator(); i.hasNext(); ) | |||||||||||||||
15 | notifications = inverseRemove(i.next(), notifications); | 15 | notifications = inverseRemove(i.next(), notifications); | ||||||||||||||||
16 | if (notifications == null) | 16 | if (notifications == null) | ||||||||||||||||
17 | dispatchNotification(notification); | 17 | dispatchNotification(notification); | ||||||||||||||||
else | else | ||||||||||||||||||
18 | notifications.add(notification); | 18 | notifications.add(notification); | ||||||||||||||||
19 | notifications.dispatch(); | 19 | notifications.dispatch(); | ||||||||||||||||
else | else | ||||||||||||||||||
20 | if (notifications == null) | 20 | if (notifications == null) | ||||||||||||||||
21 | dispatchNotification(notification); | 21 | dispatchNotification(notification); | ||||||||||||||||
else | else | ||||||||||||||||||
22 | notifications.add(notification); | 22 | notifications.add(notification); | ||||||||||||||||
23 | notifications.dispatch(); | 23 | notifications.dispatch(); |
Row | Violation |
---|---|
1 | Type org.eclipse.emf.common.util.BasicEList<E> of variable collection does not match with type java.util.List<E> of variable collection |
2 | Type org.eclipse.emf.common.util.BasicEList<E> of variable collection does not match with type java.util.List<E> of variable collection |
3 | Type org.eclipse.emf.common.util.BasicEList<E> of variable collection does not match with type java.util.List<E> of variable collection |