for (int i = 0; i < size; ++i) { EAnnotation eAnnotation = eAnnotationArray[i]; if (source.equals(eAnnotation.getSource())) { return eAnnotation; } }
for (int i = 0; i < size; ++i) { EAnnotation eAnnotation = eAnnotationArray[i]; if (eAnnotation.getSource() == null) { 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: 4 Number of AST nodes: 4
1
for (int i = 0; i < size; ++i)
1
for (int i = 0; i < size; ++i)
2
            {
2
            {
3
              EAnnotation eAnnotation = eAnnotationArray[i];
3
              EAnnotation eAnnotation = eAnnotationArray[i];
4
              if (source.equals(eAnnotation.getSource()))
4
              if (eAnnotation.getSource() == null)
5
              {
5
              {
6
                return eAnnotation;
6
                return eAnnotation;
7
              }
7
              }
8
            }
8
            }
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