File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/BasicFeatureMap.java | File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/DelegatingFeatureMap.java | |||
Method name: Object get(EStructuralFeature, int, boolean)
|
Method name: Object get(EStructuralFeature, int, boolean)
|
|||
Number of AST nodes: 10 | Number of AST nodes: 10 | |||
1 | Entry entry = entries[i];↵ | 1 | Entry entry = delegateGet(i);↵ | |
2 | if (validator.isValid(entry.getEStructuralFeature()))↵ | 2 | if (validator.isValid(entry.getEStructuralFeature()))↵ | |
3 | {↵ | 3 | {↵ | |
4 | if (count == index)↵ | 4 | if (count == index)↵ | |
5 | {↵ | 5 | {↵ | |
6 | if (FeatureMapUtil.isFeatureMap(feature))↵ | 6 | if (FeatureMapUtil.isFeatureMap(feature))↵ | |
7 | {↵ | 7 | {↵ | |
8 | return entry;↵ | 8 | return entry;↵ | |
9 | }↵ | 9 | }↵ | |
10 | else↵ | 10 | else↵ | |
11 | {↵ | 11 | {↵ | |
12 | Object value = entry.getValue();↵ | 12 | Object value = entry.getValue();↵ | |
13 | if (value != null && resolve && isResolveProxies(feature))↵ | 13 | if (value != null && resolve && isResolveProxies(feature))↵ | |
14 | {↵ | 14 | {↵ | |
15 | value = resolveProxy(feature, i, count, value);↵ | 15 | value = resolveProxy(feature, i, count, entry.getValue());↵ | |
16 | }↵ | 16 | }↵ | |
17 | return value;↵ | 17 | return value;↵ | |
18 | }↵ | 18 | }↵ | |
19 | }↵ | 19 | }↵ | |
20 | ++count;↵ | 20 | ++count;↵ | |
21 | } | 21 |
| |
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.7 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 27 |
Number of mapped statements | 10 |
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.9 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6 | Entry entry = entries[i]; |
| 5 | Entry entry = delegateGet(i); | ||||||||||||
7 | if (validator.isValid(entry.getEStructuralFeature())) | 6 | if (validator.isValid(entry.getEStructuralFeature())) | |||||||||||||
8 | if (count == index) | 7 | if (count == index) | |||||||||||||
9 | if (FeatureMapUtil.isFeatureMap(feature)) | 8 | if (FeatureMapUtil.isFeatureMap(feature)) | |||||||||||||
10 | return entry; | 9 | return entry; | |||||||||||||
else | else | |||||||||||||||
11 | Object value = entry.getValue(); | 10 | Object value = entry.getValue(); | |||||||||||||
12 | if (value != null && resolve && isResolveProxies(feature)) | 11 | if (value != null && resolve && isResolveProxies(feature)) | |||||||||||||
13 | value = resolveProxy(feature, i, count, value); |
| 12 | value = resolveProxy(feature, i, count, entry.getValue()); | ||||||||||||
14 | return value; | 13 | return value; | |||||||||||||
15 | ++count; | 14 | ++count; |
Row | Violation |
---|---|
1 | Expression value cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression entry.getValue() cannot be parameterized, because it has dependencies to/from statements that will be extracted |