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/DelegatingFeatureMap.java | |||
Method name: NotificationChain basicRemove(EStructuralFeature, Object, NotificationChain)
|
Method name: int lastIndexOf(EStructuralFeature, Object, boolean)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 5 | |||
1 | Entry entry = delegateGet(i);↵ | 1 | Entry entry = delegateGet(i);↵ | |
2 | if (validator.isValid(entry.getEStructuralFeature()))↵ | 2 | if (validator.isValid(entry.getEStructuralFeature()))↵ | |
3 | {↵ | 3 | {↵ | |
4 | if (object.equals(entry.getValue()))↵ | 4 | if (object.equals(entry.getValue()))↵ | |
5 | {↵ | 5 | {↵ | |
6 | match = entry;↵ | 6 | ↵ | |
7 | break;↵ | 7 | result = count;↵ | |
8 | }↵ | 8 | }↵ | |
9 | ++count;↵ | 9 | ++count;↵ | |
10 | } | 10 |
| |
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 declared in the same class |
Number of node comparisons | 13 |
Number of mapped statements | 4 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 0.7 |
Clone type | Type 3 |
ID | Statement | ID | Statement | ||||
---|---|---|---|---|---|---|---|
14 | Entry entry = delegateGet(i); | 14 | Entry entry = delegateGet(i); | ||||
15 | if (validator.isValid(entry.getEStructuralFeature())) | 15 | if (validator.isValid(entry.getEStructuralFeature())) | ||||
16 | if (object.equals(entry.getValue())) | 16 | if (object.equals(entry.getValue())) | ||||
|
| 17 | result = count; | ||||
17 | match = entry; |
| | ||||
18 | break; |
| | ||||
19 | ++count; | 18 | ++count; |
Row | Violation |
---|---|
1 | Unmatched statement result=count; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched statement match=entry; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
3 | Unmatched break; |
4 | Clone fragment #1 returns variables entry, count , while Clone fragment #2 returns variables count |