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: 7 | Number of AST nodes: 6 | |||
1 | for (int i = 0, size = delegateSize(); i < size; ++i)↵ | 1 | for (int i = 0, size = delegateSize(); i < size; ++i)↵ | |
2 | {↵ | 2 | {↵ | |
3 | Entry entry = delegateGet(i);↵ | 3 | Entry entry = delegateGet(i);↵ | |
4 | if (validator.isValid(entry.getEStructuralFeature()))↵ | 4 | if (validator.isValid(entry.getEStructuralFeature()))↵ | |
5 | {↵ | 5 | {↵ | |
6 | if (entry.getValue() == null)↵ | 6 | if (entry.getValue() == null)↵ | |
7 | {↵ | 7 | {↵ | |
8 | match = entry;↵ | 8 | ↵ | |
9 | break;↵ | 9 | result = count;↵ | |
10 | }↵ | 10 | }↵ | |
11 | ++count;↵ | 11 | ++count;↵ | |
12 | }↵ | 12 | }↵ | |
13 | } | 13 |
| |
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.4 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 16 |
Number of mapped statements | 5 |
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.8 |
Clone type | Type 3 |
ID | Statement | ID | Statement | ||||
---|---|---|---|---|---|---|---|
20 | for (int i = 0, size = delegateSize(); i < size; ++i) | 28 | for (int i = 0, size = delegateSize(); i < size; ++i) | ||||
21 | Entry entry = delegateGet(i); | 29 | Entry entry = delegateGet(i); | ||||
22 | if (validator.isValid(entry.getEStructuralFeature())) | 30 | if (validator.isValid(entry.getEStructuralFeature())) | ||||
23 | if (entry.getValue() == null) | 31 | if (entry.getValue() == null) | ||||
24 | match = entry; |
| | ||||
25 | break; |
| | ||||
|
| 32 | result = count; | ||||
26 | ++count; | 33 | ++count; |
Row | Violation |
---|---|
1 | Unmatched statement match=entry; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched break; |
3 | Unmatched statement result=count; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
4 | Clone fragment #1 returns variables entry, count , while Clone fragment #2 returns variables count |