173-107-153

if (childrenFeatures == null) { childrenFeatures = new ArrayList<EStructuralFeature>(); } return childrenFeatures;
if (eOperations == null) { eOperations = new EObjectContainmentWithInverseEList<EOperation>(EOperation.class, this, EcorePackage.ECLASS__EOPERATIONS, EcorePackage.EOPERATION__ECONTAINING_CLASS); } return eOperations;

Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/edit/provider/ItemProviderAdapter.java |  | File path: /emf-2.4.1/src/org/eclipse/emf/ecore/impl/EClassImpl.java
Method name: `Collection getChildrenFeatures(Object)` |  | Method name: `EList getEOperations()`
Number of AST nodes: 3 |  | Number of AST nodes: 3

1

    if (childrenFeatures == null)↵

1

    if (eOperations == null)↵

2

        {↵

2

        {↵

3

          childrenFeatures = new ArrayList<EStructuralFeature>();↵

3

          eOperations = new EObjectContainmentWithInverseEList<EOperation>(EOperation.class, this, EcorePackage.ECLASS__EOPERATIONS, EcorePackage.EOPERATION__ECONTAINING_CLASS);↵

4

        }↵

4

        }↵

5

        return childrenFeatures;

5

        return eOperations;

See real code fragment |  | See real code fragment

Summary
Number of common nesting structure subtrees | 1
Number of refactorable cases | 0
Number of non-refactorable cases | 1
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.3
Clones location | Clones are in different classes
Number of node comparisons | 5

1. {Non-refactorable}

   Mapping Summary
   Number of mapped statements | 3
   Number of unmapped statements in the first code fragment | 0
   Number of unmapped statements in the second code fragment | 0
   Time elapsed for statement mapping (ms) | 18.1
   Clone type | Type 2

   Mapped Statements
   ID | Statement |  | ID | Statement
   --- | --- | --- | --- | ---

   1

       if (childrenFeatures == null)

   1 | if (childrenFeatures == null)
   1 | if (eOperations == null)

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   childrenFeatures | eOperations | VARIABLE_NAME_MISMATCH
   java.util.List | org.eclipse.emf.common.util.EList | SUBCLASS_TYPE_MISMATCH

   1

       if (eOperations == null)

   2

       childrenFeatures = new ArrayList<EStructuralFeature>();

   2 | childrenFeatures = new ArrayList<EStructuralFeature>();
   2 | eOperations = new EObjectContainmentWithInverseEList<EOperation>(EOperation.class, this, EcorePackage.ECLASS__EOPERATIONS, EcorePackage.EOPERATION__ECONTAINING_CLASS);

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   childrenFeatures | eOperations | VARIABLE_NAME_MISMATCH
   java.util.List | org.eclipse.emf.common.util.EList | SUBCLASS_TYPE_MISMATCH
   java.util.ArrayList | org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList | SUBCLASS_TYPE_MISMATCH
   org.eclipse.emf.ecore.EStructuralFeature | org.eclipse.emf.ecore.EOperation | SUBCLASS_TYPE_MISMATCH
   new ArrayList() | new EObjectContainmentWithInverseEList(EOperation.class,this,EcorePackage.ECLASS__EOPERATIONS,EcorePackage.EOPERATION__ECONTAINING_CLASS) | ARGUMENT_NUMBER_MISMATCH

   Preondition Violations
   Expression new EObjectContainmentWithInverseEList<EOperation>(EOperation.class,this,EcorePackage.ECLASS__EOPERATIONS,EcorePackage.EOPERATION__ECONTAINING_CLASS) cannot be parameterized, because it has dependencies to/from statements that will be extracted

   2

       eOperations = new EObjectContainmentWithInverseEList<EOperation>(EOperation.class, this, EcorePackage.ECLASS__EOPERATIONS, EcorePackage.EOPERATION__ECONTAINING_CLASS);

   3

       return childrenFeatures;

   3 | return childrenFeatures;
   3 | return eOperations;

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   childrenFeatures | eOperations | VARIABLE_NAME_MISMATCH
   java.util.List | org.eclipse.emf.common.util.EList | SUBCLASS_TYPE_MISMATCH

   3

       return eOperations;

   Precondition Violations (2)
   Row | Violation
   --- | ---
   1 | Expression new EObjectContainmentWithInverseEList<EOperation>(EOperation.class,this,EcorePackage.ECLASS__EOPERATIONS,EcorePackage.EOPERATION__ECONTAINING_CLASS) cannot be parameterized, because it has dependencies to/from statements that will be extracted
   2 | The refactoring of the clones is infeasible, because classes org.eclipse.emf.edit.provider.ItemProviderAdapter and org.eclipse.emf.ecore.impl.EClassImpl do not have a common superclass