for (int i = 0; i < size; ++i)
{
Entry entry = entries[i];
if (validator.isValid(entry.getEStructuralFeature()))
{
return FeatureMapUtil.isFeatureMap(feature) ? entry : entry.getValue();
}
}
return null;
for (int i = 0; i < size; ++i)
{
EAnnotation eAnnotation = eAnnotationArray[i];
if (source.equals(eAnnotation.getSource()))
{
return eAnnotation;
}
}
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/impl/EModelElementImpl.java
|
Method name: Object set(EStructuralFeature, int, Object)
|
|
Method name: EAnnotation getEAnnotation(String)
|
Number of AST nodes: 5
|
|
Number of AST nodes: 4
|
|
1 | for (int i = 0; i < size; ++i)↵ | | 1 | for (int i = 0; i < size; ++i)↵
|
2 | {↵ | | 2 | {↵
|
3 | Entry entry = entries[i];↵ | | 3 | EAnnotation eAnnotation = eAnnotationArray[i];↵
|
4 | if (validator.isValid(entry.getEStructuralFeature()))↵ | | 4 | if (source.equals(eAnnotation.getSource()))↵
|
5 | {↵ | | 5 | ↵
|
| | | 6 | {↵
|
6 | return FeatureMapUtil.isFeatureMap(feature) ? entry : entry.getValue();↵ | | 7 | return eAnnotation;↵
|
7 | }↵ | | 8 | ↵
|
8 | }↵ | | 9 | }↵
|
|
9 | return null; | | 10 | }
|
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.2 |
Clones location | Clones are in different classes |
Number of node comparisons | 1 |