if (childrenFeatures == null) { super.getChildrenFeatures(object); childrenFeatures.add(EcorePackage.Literals.ECLASSIFIER__ETYPE_PARAMETERS); } return childrenFeatures;
if (childrenFeatures == null) { super.getChildrenFeatures(object); childrenFeatures.add(Ecore2XMLPackage.Literals.XML_MAP__ECORE_TO_XML_INFO); } return childrenFeatures;
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/provider/EClassifierItemProvider.java File path: /emf-2.4.1/src/org/eclipse/emf/mapping/ecore2xml/provider/XMLMapItemProvider.java
Method name: Collection getChildrenFeatures(Object) Method name: Collection getChildrenFeatures(Object)
Number of AST nodes: 4 Number of AST nodes: 4
1
if (childrenFeatures == null)
1
if (childrenFeatures == null)
2
    {
2
    {
3
      super.getChildrenFeatures(object);
3
      super.getChildrenFeatures(object);
4
      childrenFeatures.add(EcorePackage.Literals.ECLASSIFIER__ETYPE_PARAMETERS);
4
      childrenFeatures.add(Ecore2XMLPackage.Literals.XML_MAP__ECORE_TO_XML_INFO);
5
    }
5
    }
6
    return childrenFeatures;
6
    return childrenFeatures;
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 in different classes having the same super class
Number of node comparisons10
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements4
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.8
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (childrenFeatures == null)
    1
    if (childrenFeatures == null)
    2
    super.getChildrenFeatures(object);
    2
    super.getChildrenFeatures(object);
    3
    childrenFeatures.add(EcorePackage.Literals.ECLASSIFIER__ETYPE_PARAMETERS);
    3
    childrenFeatures.add(EcorePackage.Literals.ECLASSIFIER__ETYPE_PARAMETERS);
    3
    childrenFeatures.add(Ecore2XMLPackage.Literals.XML_MAP__ECORE_TO_XML_INFO);
    Differences
    Expression1Expression2Difference
    org.eclipse.emf.ecore.EcorePackageorg.eclipse.emf.mapping.ecore2xml.Ecore2XMLPackageVARIABLE_TYPE_MISMATCH
    org.eclipse.emf.ecore.EcorePackage.Literalsorg.eclipse.emf.mapping.ecore2xml.Ecore2XMLPackage.LiteralsVARIABLE_TYPE_MISMATCH
    ECLASSIFIER__ETYPE_PARAMETERSXML_MAP__ECORE_TO_XML_INFOVARIABLE_NAME_MISMATCH
    Preondition Violations
    Type org.eclipse.emf.ecore.EcorePackage of variable EcorePackage does not match with type org.eclipse.emf.mapping.ecore2xml.Ecore2XMLPackage of variable Ecore2XMLPackage
    • Make classes org.eclipse.emf.ecore.EcorePackage and org.eclipse.emf.mapping.ecore2xml.Ecore2XMLPackage extend a common superclass
    Type org.eclipse.emf.ecore.EcorePackage.Literals of variable EcorePackage.Literals does not match with type org.eclipse.emf.mapping.ecore2xml.Ecore2XMLPackage.Literals of variable Ecore2XMLPackage.Literals
    • Make classes org.eclipse.emf.ecore.EcorePackage.Literals and org.eclipse.emf.mapping.ecore2xml.Ecore2XMLPackage.Literals extend a common superclass
    3
    childrenFeatures.add(Ecore2XMLPackage.Literals.XML_MAP__ECORE_TO_XML_INFO);
    4
    return childrenFeatures;
    4
    return childrenFeatures;
    Precondition Violations (2)
    Row Violation
    1Type org.eclipse.emf.ecore.EcorePackage of variable EcorePackage does not match with type org.eclipse.emf.mapping.ecore2xml.Ecore2XMLPackage of variable Ecore2XMLPackage
    2Type org.eclipse.emf.ecore.EcorePackage.Literals of variable EcorePackage.Literals does not match with type org.eclipse.emf.mapping.ecore2xml.Ecore2XMLPackage.Literals of variable Ecore2XMLPackage.Literals