String result = eAnnotation.getDetails().get("name"); if (result != null) { return result; }
String name = info.getName(); if (name != null) { return info.getName(); }
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/BasicExtendedMetaData.java File path: /emf-2.4.1/src/org/eclipse/emf/ecore/xmi/impl/EMOFExtendedMetaData.java
Method name: String basicGetName(EClassifier) Method name: String getName(EClassifier)
Number of AST nodes: 3 Number of AST nodes: 3
1
String result = eAnnotation.getDetails().get("name");
1
String name = info.getName();
2
      if (result != null)
2
      if (name != null)
3
      {
3
      {
4
        return result;
4
        return info.getName();
5
      }
5
      }
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
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 comparisons6
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements2
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)14.1
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
                                                                
    3
    String name = info.getName();
    3
    String result = eAnnotation.getDetails().get("name");
                                                                                                                
    4
    if (result != null)
    4
    if (result != null)
    4
    if (name != null)
    Differences
    Expression1Expression2Difference
    resultnameVARIABLE_NAME_MISMATCH
    4
    if (name != null)
    5
    return result;
    5
    return result;
    5
    return info.getName();
    Differences
    Expression1Expression2Difference
    resultinfo.getName()TYPE_COMPATIBLE_REPLACEMENT
    5
    return info.getName();
    Precondition Violations (0)
    Row Violation