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
          }
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.2
Clones locationClones are in the same method
Number of node comparisons1