Entry entry = entries[i];
if (validator.isValid(entry.getEStructuralFeature()))
{
if (FeatureMapUtil.isFeatureMap(feature))
{
return entry;
}
else
{
Object value = entry.getValue();
if (value != null && resolve && isResolveProxies(feature))
{
value = resolveProxy(feature, i, count, value);
}
return value;
}
}
++count;
Entry entry = delegateGet(i);
if (validator.isValid(entry.getEStructuralFeature()))
{
if (FeatureMapUtil.isFeatureMap(feature))
{
return entry;
}
else
{
Object value = entry.getValue();
if (value != null && resolve && isResolveProxies(feature))
{
value = resolveProxy(feature, i, count, value);
}
return value;
}
}
++count;
Clone fragments detected by clone detection tool
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, boolean)
|
Number of AST nodes: 9
|
|
Number of AST nodes: 9
|
|
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 (FeatureMapUtil.isFeatureMap(feature))↵ | | 4 | if (FeatureMapUtil.isFeatureMap(feature))↵
|
5 | {↵ | | 5 | {↵
|
6 | return entry;↵ | | 6 | return entry;↵
|
7 | }↵ | | 7 | }↵
|
8 | else↵ | | 8 | else↵
|
9 | {↵ | | 9 | {↵
|
10 | Object value = entry.getValue();↵ | | 10 | Object value = entry.getValue();↵
|
11 | if (value != null && resolve && isResolveProxies(feature))↵ | | 11 | if (value != null && resolve && isResolveProxies(feature))↵
|
12 | {↵ | | 12 | {↵
|
13 | value = resolveProxy(feature, i, count, value);↵ | | 13 | value = resolveProxy(feature, i, count, value);↵
|
14 | }↵ | | 14 | }↵
|
15 | return value;↵ | | 15 | return value;↵
|
16 | }↵ | | 16 | }↵
|
17 | }↵ | | 17 | }↵
|
18 | ++count; | | 18 | ++count;
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.5 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 26 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 9 |
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) | 2.3 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
19 | Entry entry = entries[i]; | | 6 | Entry entry = delegateGet(i); |
20 | if (validator.isValid(entry.getEStructuralFeature())) | | 7 | if (validator.isValid(entry.getEStructuralFeature())) |
21 | if (FeatureMapUtil.isFeatureMap(feature)) | | 8 | if (FeatureMapUtil.isFeatureMap(feature)) |
22 | | | 9 | |
| | | | |
23 | Object value = entry.getValue(); | | 10 | Object value = entry.getValue(); |
24 | if (value != null && resolve && isResolveProxies(feature)) | | 11 | if (value != null && resolve && isResolveProxies(feature)) |
25 | value = resolveProxy(feature, i, count, value); | | 12 | value = resolveProxy(feature, i, count, value); |
26 | | | 13 | |
27 | ++count; | | 14 | ++count; |
Precondition Violations (0)
Row |
Violation |