if (validator.isValid(entry.getEStructuralFeature()))
{
if (collection.contains(isFeatureMap ? entry : entry.getValue()))
{
return false;
}
else
{
for (Object object : collection)
{
doSet(i, isFeatureMap ? (Entry)object : createEntry(feature, object));
}
return true;
}
}
if (validator.isValid(entry.getEStructuralFeature()))
{
if (collection.contains(isFeatureMap ? entry : entry.getValue()))
{
return false;
}
else
{
for (Object object : collection)
{
doSet(i, isFeatureMap ? (Entry)object : createEntry(feature, object));
}
return true;
}
}
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: boolean addAll(EStructuralFeature, Collection>)
|
|
Method name: boolean addAll(EStructuralFeature, Collection>)
|
Number of AST nodes: 6
|
|
Number of AST nodes: 6
|
|
1 | if (validator.isValid(entry.getEStructuralFeature()))↵ | | 1 | if (validator.isValid(entry.getEStructuralFeature()))↵
|
2 | {↵ | | 2 | {↵
|
3 | if (collection.contains(isFeatureMap ? entry : entry.getValue()))↵ | | 3 | if (collection.contains(isFeatureMap ? entry : entry.getValue()))↵
|
4 | {↵ | | 4 | {↵
|
5 | return false;↵ | | 5 | return false;↵
|
6 | }↵ | | 6 | }↵
|
7 | else↵ | | 7 | else↵
|
8 | {↵ | | 8 | {↵
|
9 | for (Object object : collection)↵ | | 9 | for (Object object : collection)↵
|
10 | {↵ | | 10 | {↵
|
11 | doSet(i, isFeatureMap ? (Entry)object : createEntry(feature, object));↵ | | 11 | doSet(i, isFeatureMap ? (Entry)object : createEntry(feature, object));↵
|
12 | }↵ | | 12 | }↵
|
13 | return true;↵ | | 13 | return true;↵
|
14 | }↵ | | 14 | }↵
|
15 | } | | 15 | }
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 0 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.1 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 1 |