if (object instanceof EAnnotation)
{
EAnnotation eAnnotation = (EAnnotation)object;
if (source.equals(eAnnotation.getSource()) && count-- == 0)
{
return eAnnotation;
}
}
if (object instanceof ENamedElement)
{
ENamedElement eNamedElement = (ENamedElement)object;
if (name.equals(eNamedElement.getName()) && count-- == 0)
{
return eNamedElement;
}
}
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/impl/EModelElementImpl.java
|
|
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/impl/EModelElementImpl.java
|
Method name: EObject eObjectForURIFragmentSegment(String)
|
|
Method name: EObject eObjectForURIFragmentSegment(String)
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | if (object instanceof EAnnotation)↵ | | 1 | if (object instanceof ENamedElement)↵
|
2 | {↵ | | 2 | {↵
|
3 | EAnnotation eAnnotation = (EAnnotation)object;↵ | | 3 | ENamedElement eNamedElement = (ENamedElement)object;↵
|
4 | if (source.equals(eAnnotation.getSource()) && count-- == 0)↵ | | 4 | if (name.equals(eNamedElement.getName()) && count-- == 0)↵
|
5 | {↵ | | 5 | ↵
|
6 | ↵ | | 6 | {↵
|
7 | return eAnnotation;↵ | | 7 | return e↵
|
8 | ↵ | | 8 | NamedElement;↵
|
9 | }↵ | | 9 | }↵
|
10 | } | | 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 the same method |
Number of node comparisons | 1 |