File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/BasicFeatureMap.java | File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/DelegatingFeatureMap.java | |||
Method name: NotificationChain shadowAdd(FeatureMap.Entry.Internal, NotificationChain)
|
Method name: NotificationChain shadowAdd(Entry, NotificationChain)
|
|||
Number of AST nodes: 7 | Number of AST nodes: 6 | |||
1 | EStructuralFeature feature = entry.getEStructuralFeature();↵ | 1 | EStructuralFeature feature = object.getEStructuralFeature();↵ | |
2 | Object value = entry.getValue();↵ | 2 | Object value = object.getValue();↵ | |
3 | // EATM must fix isSet bits.↵ | 3 | // EATM must fix isSet bits.↵ | |
4 | NotificationImpl notification = ↵ | 4 | NotificationImpl notification = ↵ | |
5 | feature.isMany() ?↵ | 5 | feature.isMany() ?↵ | |
6 | createNotification↵ | 6 | createNotification↵ | |
7 | (Notification.ADD,↵ | 7 | (Notification.ADD,↵ | |
8 | feature,↵ | 8 | feature,↵ | |
9 | null, ↵ | 9 | null, ↵ | |
10 | value,↵ | 10 | value,↵ | |
11 | indexOf(feature, value),↵ | 11 | indexOf(feature, value),↵ | |
12 | true) :↵ | 12 | true) :↵ | |
13 | createNotification↵ | 13 | createNotification↵ | |
14 | (Notification.SET, ↵ | 14 | (Notification.SET, ↵ | |
15 | feature,↵ | 15 | feature,↵ | |
16 | feature.getDefaultValue(), ↵ | 16 | feature.getDefaultValue(), ↵ | |
17 | value,↵ | 17 | value,↵ | |
18 | Notification.NO_INDEX,↵ | 18 | Notification.NO_INDEX,↵ | |
19 | true);↵ | 19 | true);↵ | |
20 | ↵ | 20 | ↵ | |
21 | if (notifications != null)↵ | 21 | if (notifications != null)↵ | |
22 | {↵ | 22 | ↵ | |
23 | {↵ | |||
23 | notifications.add(notification);↵ | 24 | notifications.add(notification);↵ | |
24 | }↵ | 25 | }↵ | |
25 | else↵ | 26 | else↵ | |
26 | {↵ | 27 | ↵ | |
28 | {↵ | |||
27 | notifications = notification;↵ | 29 | notifications = notification;↵ | |
28 | }↵ | 30 | ↵ | |
29 | return notifications; | 31 |
| |
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.1 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 15 |
Number of mapped statements | 6 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 1.8 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | EStructuralFeature feature = entry.getEStructuralFeature(); |
| 2 | EStructuralFeature feature = object.getEStructuralFeature(); | ||||||||||||||
2 | Object value = entry.getValue(); |
| 3 | Object value = object.getValue(); | ||||||||||||||
3 | NotificationImpl notification = feature.isMany() ? createNotification(Notification.ADD, feature, null, value, indexOf(feature, value), true) : createNotification(Notification.SET, feature, feature.getDefaultValue(), value, Notification.NO_INDEX, true); | 4 | NotificationImpl notification = feature.isMany() ? createNotification(Notification.ADD, feature, null, value, indexOf(feature, value), true) : createNotification(Notification.SET, feature, feature.getDefaultValue(), value, Notification.NO_INDEX, true); | |||||||||||||||
4 | if (notifications != null) | 5 | if (notifications != null) | |||||||||||||||
5 | notifications.add(notification); | 6 | notifications.add(notification); | |||||||||||||||
else | else | |||||||||||||||||
6 | notifications = notification; | 7 | notifications = notification; | |||||||||||||||
7 | return notifications; | |
Row | Violation |
---|---|
1 | Type org.eclipse.emf.ecore.util.FeatureMap.Entry.Internal of variable entry does not match with type org.eclipse.emf.ecore.util.FeatureMap.Entry of variable object |
2 | Type org.eclipse.emf.ecore.util.FeatureMap.Entry.Internal of variable entry does not match with type org.eclipse.emf.ecore.util.FeatureMap.Entry of variable object |