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: NotificationChain basicAdd(E, NotificationChain)
|
Method name: NotificationChain basicAdd(E, NotificationChain)
|
|||
Number of AST nodes: 10 | Number of AST nodes: 10 | |||
1 | if (isNotificationRequired())↵ | 1 | if (isNotificationRequired())↵ | |
2 | {↵ | 2 | {↵ | |
3 | int index = size();↵ | 3 | int index = size;↵ | |
4 | boolean oldIsSet = isSet();↵ | 4 | boolean oldIsSet = isSet();↵ | |
5 | doAddUnique(index, object);↵ | 5 | doAddUnique(index, object);↵ | |
6 | NotificationImpl notification = createNotification(Notification.ADD, null, object, index, oldIsSet);↵ | 6 | NotificationImpl notification = createNotification(Notification.ADD, null, object, index, oldIsSet);↵ | |
7 | if (notifications == null)↵ | 7 | if (notifications == null)↵ | |
8 | {↵ | 8 | {↵ | |
9 | notifications = notification;↵ | 9 | notifications = notification;↵ | |
10 | }↵ | 10 | }↵ | |
11 | else↵ | 11 | else↵ | |
12 | {↵ | 12 | {↵ | |
13 | notifications.add(notification);↵ | 13 | notifications.add(notification);↵ | |
14 | }↵ | 14 | }↵ | |
15 | }↵ | 15 | }↵ | |
16 | else↵ | 16 | else↵ | |
17 | {↵ | 17 | {↵ | |
18 | doAddUnique(size(), object);↵ | 18 | doAddUnique(size, object);↵ | |
19 | }↵ | 19 | }↵ | |
20 | return notifications; | 20 |
| |
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.2 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 46 |
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) | 1.6 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (isNotificationRequired()) | 1 | if (isNotificationRequired()) | |||||||||||
2 | int index = size(); |
| 2 | int index = size; | ||||||||||
3 | boolean oldIsSet = isSet(); | 3 | boolean oldIsSet = isSet(); | |||||||||||
4 | doAddUnique(index, object); | 4 | doAddUnique(index, object); | |||||||||||
5 | NotificationImpl notification = createNotification(Notification.ADD, null, object, index, oldIsSet); | 5 | NotificationImpl notification = createNotification(Notification.ADD, null, object, index, oldIsSet); | |||||||||||
6 | if (notifications == null) | 6 | if (notifications == null) | |||||||||||
7 | notifications = notification; | 7 | notifications = notification; | |||||||||||
else | else | |||||||||||||
8 | notifications.add(notification); | 8 | notifications.add(notification); | |||||||||||
else | else | |||||||||||||
9 | doAddUnique(size(), object); |
| 9 | doAddUnique(size, object); | ||||||||||
10 | return notifications; | 10 | return notifications; |
Row | Violation |
---|