String result = info.getName(); if (result != null) { return result; }
String label = eTypeParameter.getName(); if (label != null) { result.append(label); }
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/xmi/impl/XMLHelperImpl.java File path: /emf-2.4.1/src/org/eclipse/emf/ecore/impl/EGenericTypeImpl.java
Method name: String getName(ENamedElement) Method name: void toString(StringBuilder)
Number of AST nodes: 3 Number of AST nodes: 3
1
String result = info.getName();
1
String label = eTypeParameter.getName();
2
         if (result != null)
2
      if (label != null)
3
         {
3
      
4
   
4
{
5
        return result;
5
        re
6
   
6
sult.append(label);
7
      }
7
      }
Summary
Number of common nesting structure subtrees1
Number of refactorable cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)0.2
Clones locationClones are in different classes
Number of node comparisons6
  1. {Non-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)0.5
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    6
    String result = info.getName();
    6
    String result = info.getName();
    25
    String label = eTypeParameter.getName();
    Differences
    Expression1Expression2Difference
    resultlabelVARIABLE_NAME_MISMATCH
    infoeTypeParameterVARIABLE_NAME_MISMATCH
    org.eclipse.emf.ecore.xmi.XMLResource.XMLInfoorg.eclipse.emf.ecore.ETypeParameterVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.eclipse.emf.ecore.xmi.XMLResource.XMLInfo of variable info does not match with type org.eclipse.emf.ecore.ETypeParameter of variable eTypeParameter
    • Make classes org.eclipse.emf.ecore.xmi.XMLResource.XMLInfo and org.eclipse.emf.ecore.ETypeParameter extend a common superclass
    25
    String label = eTypeParameter.getName();
    7
    if (result != null)
    7
    if (result != null)
    26
    if (label != null)
    Differences
    Expression1Expression2Difference
    resultlabelVARIABLE_NAME_MISMATCH
    26
    if (label != null)
    8
    return result;
                                      
                                                      
    27
    result.append(label);
    Precondition Violations (1)
    Row Violation
    1Type org.eclipse.emf.ecore.xmi.XMLResource.XMLInfo of variable info does not match with type org.eclipse.emf.ecore.ETypeParameter of variable eTypeParameter