for (EAnnotation eAnnotation : eAnnotations) { if (eAnnotation.getSource() == null) { return eAnnotation; } }
for (EAnnotation eAnnotation : eAnnotations) { 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/impl/EModelElementImpl.java File path: /emf-2.4.1/src/org/eclipse/emf/ecore/impl/EModelElementImpl.java
Method name: EAnnotation getEAnnotation(String) Method name: EAnnotation getEAnnotation(String)
Number of AST nodes: 3 Number of AST nodes: 3
1
for (EAnnotation eAnnotation : eAnnotations)
1
for (EAnnotation eAnnotation : eAnnotations)
2
          {
2
          {
3
            if (eAnnotation.getSource() == null)
3
            if (source.equals(eAnnotation.getSource()))
4
            {
4
            {
5
              return eAnnotation;
5
              return eAnnotation;
6
            }
6
            }
7
          }
7
          }
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.1
Clones locationClones are in the same method
Number of node comparisons1