File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/DelegatingFeatureMap.java | File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/BasicFeatureMap.java | |||
Method name: Object resolveProxy(EStructuralFeature, int, int, Object)
|
Method name: Object resolveProxy(EStructuralFeature, int, int, Object)
|
|||
Number of AST nodes: 12 | Number of AST nodes: 12 | |||
1 | EObject resolved = resolveProxy((EObject)object);↵ | 1 | EObject resolved = resolveProxy((EObject)object);↵ | |
2 | if (resolved != object)↵ | 2 | if (resolved != object)↵ | |
3 | {↵ | 3 | {↵ | |
4 | Entry oldObject = delegateGet(entryIndex);↵ | 4 | Entry oldObject = (Entry)data[entryIndex];↵ | |
5 | Entry entry = createEntry(feature, resolved);↵ | 5 | Entry entry = createEntry(feature, resolved);↵ | |
6 | delegateSet(entryIndex, validate(entryIndex, entry));↵ | 6 | assign(entryIndex, validate(entryIndex, entry));↵ | |
7 | didSet(entryIndex, entry, oldObject);↵ | 7 | didSet(entryIndex, entry, oldObject);↵ | |
8 | if (isNotificationRequired())↵ | 8 | if (isNotificationRequired())↵ | |
9 | {↵ | 9 | {↵ | |
10 | NotificationImpl notifications = ↵ | 10 | NotificationImpl notifications = ↵ | |
11 | createNotification↵ | 11 | createNotification↵ | |
12 | (Notification.RESOLVE, ↵ | 12 | (Notification.RESOLVE, ↵ | |
13 | entry.getEStructuralFeature(), ↵ | 13 | entry.getEStructuralFeature(), ↵ | |
14 | object,↵ | 14 | object,↵ | |
15 | resolved,↵ | 15 | resolved,↵ | |
16 | index,↵ | 16 | index,↵ | |
17 | false);↵ | 17 | false);↵ | |
18 | notifications.add(createNotification(Notification.RESOLVE, oldObject, entry, index, false));↵ | 18 | notifications.add(createNotification(Notification.RESOLVE, oldObject, entry, index, false));↵ | |
19 | notifications.dispatch();↵ | 19 | notifications.dispatch();↵ | |
20 | }↵ | 20 | }↵ | |
21 | return resolved;↵ | 21 | return resolved;↵ | |
22 | }↵ | 22 | }↵ | |
23 | return object; | 23 |
| |
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.2 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 56 |
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) | 3.2 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | EObject resolved = resolveProxy((EObject)object); | 1 | EObject resolved = resolveProxy((EObject)object); | |||||||||||||
2 | if (resolved != object) | 2 | if (resolved != object) | |||||||||||||
3 | Entry oldObject = delegateGet(entryIndex); |
| 3 | Entry oldObject = (Entry)data[entryIndex]; | ||||||||||||
4 | Entry entry = createEntry(feature, resolved); | 4 | Entry entry = createEntry(feature, resolved); | |||||||||||||
5 | delegateSet(entryIndex, validate(entryIndex, entry)); |
| 5 | assign(entryIndex, validate(entryIndex, entry)); | ||||||||||||
6 | didSet(entryIndex, entry, oldObject); | 6 | didSet(entryIndex, entry, oldObject); | |||||||||||||
7 | if (isNotificationRequired()) | 7 | if (isNotificationRequired()) | |||||||||||||
8 | NotificationImpl notifications = createNotification(Notification.RESOLVE, entry.getEStructuralFeature(), object, resolved, index, false); | 8 | NotificationImpl notifications = createNotification(Notification.RESOLVE, entry.getEStructuralFeature(), object, resolved, index, false); | |||||||||||||
9 | notifications.add(createNotification(Notification.RESOLVE, oldObject, entry, index, false)); | 9 | notifications.add(createNotification(Notification.RESOLVE, oldObject, entry, index, false)); | |||||||||||||
10 | notifications.dispatch(); | 10 | notifications.dispatch(); | |||||||||||||
11 | return resolved; | 11 | return resolved; | |||||||||||||
12 | return object; | 12 | return object; |
Row | Violation |
---|---|
1 | Expression delegateSet(entryIndex,validate(entryIndex,entry)) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression assign(entryIndex,validate(entryIndex,entry)) cannot be parameterized, because it has dependencies to/from statements that will be extracted |