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 shadowRemove(FeatureMap.Entry.Internal, NotificationChain)
|
Method name: NotificationChain shadowRemove(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 | NotificationImpl notification = ↵ | 3 | NotificationImpl notification = ↵ | |
4 | feature.isMany() ?↵ | 4 | feature.isMany() ?↵ | |
5 | createNotification↵ | 5 | createNotification↵ | |
6 | (Notification.REMOVE,↵ | 6 | (Notification.REMOVE,↵ | |
7 | feature,↵ | 7 | feature,↵ | |
8 | value,↵ | 8 | value,↵ | |
9 | null, ↵ | 9 | null, ↵ | |
10 | indexOf(feature, value),↵ | 10 | indexOf(feature, value),↵ | |
11 | true) :↵ | 11 | true) :↵ | |
12 | createNotification↵ | 12 | createNotification↵ | |
13 | (feature.isUnsettable() ? Notification.UNSET : Notification.SET, ↵ | 13 | (feature.isUnsettable() ? Notification.UNSET : Notification.SET, ↵ | |
14 | feature,↵ | 14 | feature,↵ | |
15 | value,↵ | 15 | value,↵ | |
16 | feature.getDefaultValue(), ↵ | 16 | feature.getDefaultValue(), ↵ | |
17 | Notification.NO_INDEX,↵ | 17 | Notification.NO_INDEX,↵ | |
18 | true);↵ | 18 | true);↵ | |
19 | if (notifications != null)↵ | 19 | if (notifications != null)↵ | |
20 | {↵ | 20 | {↵ | |
21 | notifications.add(notification);↵ | 21 | notifications.add(notification);↵ | |
22 | }↵ | 22 | ↵ | |
23 | }↵ | |||
23 | else↵ | 24 | else↵ | |
24 | {↵ | 25 | {↵ | |
25 | notifications = notification;↵ | 26 | notifications = notification;↵ | |
26 | }↵ | 27 | ↵ | |
27 | ↵ | |||
28 | return notifications; | 28 |
| |
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.7 |
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.REMOVE, feature, value, null, indexOf(feature, value), true) : createNotification(feature.isUnsettable() ? Notification.UNSET : Notification.SET, feature, value, feature.getDefaultValue(), Notification.NO_INDEX, true); | 4 | NotificationImpl notification = feature.isMany() ? createNotification(Notification.REMOVE, feature, value, null, indexOf(feature, value), true) : createNotification(feature.isUnsettable() ? Notification.UNSET : Notification.SET, feature, value, feature.getDefaultValue(), 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 |