for (EAnnotation eAnnotation : eAnnotations) { if (eAnnotation.getSource() == null) { return eAnnotation; } }
for (EEnumLiteral eEnumLiteral : getELiterals()) { if (literal.equals(eEnumLiteral.getLiteral())) { return eEnumLiteral; } }
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/EEnumImpl.java
Method name: EAnnotation getEAnnotation(String) Method name: EEnumLiteral getEEnumLiteralByLiteral(String)
Number of AST nodes: 3 Number of AST nodes: 3
1
for (EAnnotation eAnnotation : eAnnotations)
1
for (E
2
    
2
EnumLiteral eEnumLiteral : getELiterals())
3
      {
3
      {
4
            if (eAnnotation.getSource() == null)
4
        
5
    
5
if (literal.equals(eEnumLiteral.getLiteral()))
6
        {
6
        {
7
              return eAnnotation;
7
          return e
8
            }
9
    
8
EnumLiteral;
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.1
Clones locationClones are in different classes having the same super class
Number of node comparisons1