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: Object set(EStructuralFeature, int, Object)
|
Method name: Object setUnique(EStructuralFeature, int, Object)
|
|||
Number of AST nodes: 7 | Number of AST nodes: 7 | |||
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 (count == index)↵ | 6 | if (count == index)↵ | |
7 | {↵ | 7 | {↵ | |
8 | return doSet(i, FeatureMapUtil.isFeatureMap(feature) ? (Entry)object : createEntry(feature, object));↵ | 8 | return setUnique(i, FeatureMapUtil.isFeatureMap(feature) ? (Entry)object : createEntry(feature, object));↵ | |
9 | }↵ | 9 | }↵ | |
10 | ++count;↵ | 10 | ++count;↵ | |
11 | }↵ | 11 | }↵ | |
12 | }↵ | 12 | }↵ | |
13 | throw new IndexOutOfBoundsException("index=" + index + ", size=" + count); | 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 | 14 |
Number of mapped statements | 7 |
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) | 1.4 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
8 | for (int i = 0, size = delegateSize(); i < size; ++i) | 4 | for (int i = 0, size = delegateSize(); i < size; ++i) | |||||||||||||
9 | Entry entry = delegateGet(i); | 5 | Entry entry = delegateGet(i); | |||||||||||||
10 | if (validator.isValid(entry.getEStructuralFeature())) | 6 | if (validator.isValid(entry.getEStructuralFeature())) | |||||||||||||
11 | if (count == index) | 7 | if (count == index) | |||||||||||||
12 | return doSet(i, FeatureMapUtil.isFeatureMap(feature) ? (Entry)object : createEntry(feature, object)); |
| 8 | return setUnique(i, FeatureMapUtil.isFeatureMap(feature) ? (Entry)object : createEntry(feature, object)); | ||||||||||||
13 | ++count; | 9 | ++count; | |||||||||||||
14 | throw new IndexOutOfBoundsException("index=" + index + ", size=" + count); | 10 | throw new IndexOutOfBoundsException("index=" + index + ", size=" + count); |
Row | Violation |
---|---|
1 | Expression doSet(i,FeatureMapUtil.isFeatureMap(feature) ? (Entry)object : createEntry(feature,object)) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression setUnique(i,FeatureMapUtil.isFeatureMap(feature) ? (Entry)object : createEntry(feature,object)) cannot be parameterized, because it has dependencies to/from statements that will be extracted |