File path: /emf-2.4.1/src/org/eclipse/emf/ecore/impl/ESuperAdapter.java | File path: /emf-2.4.1/src/org/eclipse/emf/ecore/impl/ESuperAdapter.java | |||
Method name: void notifyChanged(Notification)
|
Method name: void notifyChanged(Notification)
|
|||
Number of AST nodes: 8 | Number of AST nodes: 8 | |||
1 | Object newValue = notification.getNewValue();↵ | 1 | Object oldValue = notification.getOldValue();↵ | |
2 | if (newValue != null)↵ | 2 | if (oldValue != null)↵ | |
3 | {↵ | 3 | {↵ | |
4 | for (Iterator<?> i = ((Collection<?>)newValue).iterator(); i.hasNext(); )↵ | 4 | for (Iterator<?> i = ((Collection<?>)oldValue).iterator(); i.hasNext(); )↵ | |
5 | {↵ | 5 | {↵ | |
6 | Holder holder = (Holder)i.next();↵ | 6 | Holder holder = (Holder)i.next();↵ | |
7 | if (!holder.isFrozen())↵ | 7 | if (!holder.isFrozen())↵ | |
8 | {↵ | 8 | {↵ | |
9 | ESuperAdapter eSuperAdapter = holder.getESuperAdapter();↵ | 9 | ESuperAdapter eSuperAdapter = holder.getESuperAdapter();↵ | |
10 | eSuperAdapter.getSubclasses().add((EClass)notification.getNotifier());↵ | 10 | eSuperAdapter.getSubclasses().remove(notification.getNotifier());↵ | |
11 | }↵ | 11 | }↵ | |
12 | }↵ | 12 | }↵ | |
13 | }↵ | 13 | }↵ | |
14 | break; | 14 |
| |
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.3 |
Clones location | Clones are in the same method |
Number of node comparisons | 11 |
Number of mapped statements | 3 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 6.8 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
31 | Holder holder = (Holder)i.next(); |
| 48 | Holder holder = (Holder)i.next(); | |||||||||||||||
32 | if (!holder.isFrozen()) | 49 | if (!holder.isFrozen()) | ||||||||||||||||
33 | ESuperAdapter eSuperAdapter = holder.getESuperAdapter(); | 50 | ESuperAdapter eSuperAdapter = holder.getESuperAdapter(); | ||||||||||||||||
34 | eSuperAdapter.getSubclasses().add((EClass)notification.getNotifier()); |
| | ||||||||||||||||
|
| 51 | eSuperAdapter.getSubclasses().remove(notification.getNotifier()); |
Row | Violation |
---|---|
1 | Type of variable i.next() does not match with type of variable i.next() |
2 | Type java.util.Iterator<> of variable i does not match with type java.util.Iterator<> of variable i |
3 | Unmatched statement eSuperAdapter.getSubclasses().add((EClass)notification.getNotifier()); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
4 | Unmatched statement eSuperAdapter.getSubclasses().remove(notification.getNotifier()); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |