173-106-164

if (childrenReferences == null) { childrenReferences = new ArrayList<EReference>(); } return childrenReferences;
if (eTypeParameters == null) { eTypeParameters = new EObjectContainmentEList.Resolving<ETypeParameter>(ETypeParameter.class, this, EcorePackage.ECLASSIFIER__ETYPE_PARAMETERS); } return eTypeParameters;

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/EClassifierImpl.java
Method name: `Collection getChildrenReferences(Object)` |  | Method name: `EList getETypeParameters()`
Number of AST nodes: 3 |  | Number of AST nodes: 3

1

    if (childrenReferences == null)↵

1

    if (eTypeParameters == null)↵

2

        {↵

2

        {↵

3

          childrenReferences = new ArrayList<EReference>();↵

3

          eTypeParameters = new EObjectContainmentEList.Resolving<ETypeParameter>(ETypeParameter.class, this, EcorePackage.ECLASSIFIER__ETYPE_PARAMETERS);↵

4

        }↵

4

        }↵

5

        return childrenReferences;

5

        return eTypeParameters;

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.2
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) | 17.3
   Clone type | Type 2

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

   1

       if (childrenReferences == null)

   1 | if (childrenReferences == null)
   1 | if (eTypeParameters == null)

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

   1

       if (eTypeParameters == null)

   2

       childrenReferences = new ArrayList<EReference>();

   2 | childrenReferences = new ArrayList<EReference>();
   2 | eTypeParameters = new EObjectContainmentEList.Resolving<ETypeParameter>(ETypeParameter.class, this, EcorePackage.ECLASSIFIER__ETYPE_PARAMETERS);

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   childrenReferences | eTypeParameters | VARIABLE_NAME_MISMATCH
   java.util.List | org.eclipse.emf.common.util.EList | SUBCLASS_TYPE_MISMATCH
   java.util.ArrayList | org.eclipse.emf.ecore.util.EObjectContainmentEList.Resolving | SUBCLASS_TYPE_MISMATCH
   ArrayList | EObjectContainmentEList.Resolving | TYPE_COMPATIBLE_REPLACEMENT
   org.eclipse.emf.ecore.EReference | org.eclipse.emf.ecore.ETypeParameter | SUBCLASS_TYPE_MISMATCH
   new ArrayList() | new EObjectContainmentEList.Resolving(ETypeParameter.class,this,EcorePackage.ECLASSIFIER__ETYPE_PARAMETERS) | ARGUMENT_NUMBER_MISMATCH

   2

       eTypeParameters = new EObjectContainmentEList.Resolving<ETypeParameter>(ETypeParameter.class, this, EcorePackage.ECLASSIFIER__ETYPE_PARAMETERS);

   3

       return childrenReferences;

   3 | return childrenReferences;
   3 | return eTypeParameters;

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

   3

       return eTypeParameters;

   Precondition Violations (1)
   Row | Violation
   --- | ---
   1 | The refactoring of the clones is infeasible, because classes org.eclipse.emf.edit.provider.ItemProviderAdapter and org.eclipse.emf.ecore.impl.EClassifierImpl do not have a common superclass