String name = getName(c); if (xmlMap != null) { XMLResource.XMLInfo clsInfo = xmlMap.getInfo(c); if (clsInfo != null) { String targetNamespace = clsInfo.getTargetNamespace(); return getQName(targetNamespace, name); } } return getQName(c.getEPackage(), name);
String name = getName(c); if (xmlMap != null) { XMLResource.XMLInfo clsInfo = xmlMap.getInfo(c); if (clsInfo != null) { String targetNamespace = clsInfo.getTargetNamespace(); return getQName(targetNamespace, name); } } return getQName(c.getEPackage(), name);
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/xmi/impl/XMLHelperImpl.java
Method name: String getQName(EClass) Method name: String getQName(EDataType)
Number of AST nodes: 7 Number of AST nodes: 7
1
String name = getName(c);
1
String name = getName(c);
2
    if (xmlMap != null)
2
    if (xmlMap != null)
3
    {
3
    {
4
      XMLResource.XMLInfo clsInfo = xmlMap.getInfo(c);
4
      XMLResource.XMLInfo clsInfo = xmlMap.getInfo(c);
5
      if (clsInfo != null)
5
      if (clsInfo != null)
6
      {
6
      {
7
        String targetNamespace = clsInfo.getTargetNamespace();
7
        String targetNamespace = clsInfo.getTargetNamespace();
8
        return getQName(targetNamespace, name);
8
        return getQName(targetNamespace, name);
9
      }
9
      }
10
    }
10
    }
11
    return getQName(c.getEPackage(), name);
11
    return getQName(c.getEPackage(), name);
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.1
Clones locationClones are declared in the same class
Number of node comparisons17
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements7
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)21.6
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    String name = getName(c);
    1
    String name = getName(c);
    1
    String name = getName(c);
    Differences
    Expression1Expression2Difference
    org.eclipse.emf.ecore.EClassorg.eclipse.emf.ecore.EDataTypeVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.eclipse.emf.ecore.EClass of variable c does not match with type org.eclipse.emf.ecore.EDataType of variable c
    • Make classes org.eclipse.emf.ecore.EClass and org.eclipse.emf.ecore.EDataType extend a common superclass
    1
    String name = getName(c);
    2
    if (xmlMap != null)
    2
    if (xmlMap != null)
    3
    XMLResource.XMLInfo clsInfo = xmlMap.getInfo(c);
    3
    XMLResource.XMLInfo clsInfo = xmlMap.getInfo(c);
    3
    XMLResource.XMLInfo clsInfo = xmlMap.getInfo(c);
    Differences
    Expression1Expression2Difference
    org.eclipse.emf.ecore.EClassorg.eclipse.emf.ecore.EDataTypeVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.eclipse.emf.ecore.EClass of variable c does not match with type org.eclipse.emf.ecore.EDataType of variable c
    • Make classes org.eclipse.emf.ecore.EClass and org.eclipse.emf.ecore.EDataType extend a common superclass
    3
    XMLResource.XMLInfo clsInfo = xmlMap.getInfo(c);
    4
    if (clsInfo != null)
    4
    if (clsInfo != null)
    5
    String targetNamespace = clsInfo.getTargetNamespace();
    5
    String targetNamespace = clsInfo.getTargetNamespace();
    6
    return getQName(targetNamespace, name);
    6
    return getQName(targetNamespace, name);
    7
    return getQName(c.getEPackage(), name);
    7
    return getQName(c.getEPackage(), name);
    7
    return getQName(c.getEPackage(), name);
    Differences
    Expression1Expression2Difference
    org.eclipse.emf.ecore.EClassorg.eclipse.emf.ecore.EDataTypeVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.eclipse.emf.ecore.EClass of variable c does not match with type org.eclipse.emf.ecore.EDataType of variable c
    • Make classes org.eclipse.emf.ecore.EClass and org.eclipse.emf.ecore.EDataType extend a common superclass
    7
    return getQName(c.getEPackage(), name);
    Precondition Violations (3)
    Row Violation
    1Type org.eclipse.emf.ecore.EClass of variable c does not match with type org.eclipse.emf.ecore.EDataType of variable c
    2Type org.eclipse.emf.ecore.EClass of variable c does not match with type org.eclipse.emf.ecore.EDataType of variable c
    3Type org.eclipse.emf.ecore.EClass of variable c does not match with type org.eclipse.emf.ecore.EDataType of variable c