173-164-168

if (eTypeParameters == null) { eTypeParameters = new EObjectContainmentEList.Resolving<ETypeParameter>(ETypeParameter.class, this, EcorePackage.ECLASSIFIER__ETYPE_PARAMETERS); } return eTypeParameters;
if (eCrossReferences == null) { eCrossReferences = ECrossReferenceEList.createECrossReferenceEList(this); } return eCrossReferences;

Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/impl/EClassifierImpl.java |  | File path: /emf-2.4.1/src/org/eclipse/emf/ecore/impl/FlatEObjectImpl.java
Method name: `EList getETypeParameters()` |  | Method name: `EList eCrossReferences()`
Number of AST nodes: 3 |  | Number of AST nodes: 3

1

    if (eTypeParameters == null)↵

1

    if (eCrossReferences == null)↵

2

        {↵

2

        {↵

3

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

3

          eCrossReferences = ECrossReferenceEList.createECrossReferenceEList(this);↵

4

        }↵

4

        }↵

5

        return eTypeParameters;

5

        return eCrossReferences;

See real code fragment |  | See real code fragment

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

1. {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) | 36.6
   Clone type | Type 2

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

   1

       if (eTypeParameters == null)

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

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   eTypeParameters | eCrossReferences | VARIABLE_NAME_MISMATCH

   1

       if (eCrossReferences == null)

   2

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

   2 | eTypeParameters = new EObjectContainmentEList.Resolving<ETypeParameter>(ETypeParameter.class, this, EcorePackage.ECLASSIFIER__ETYPE_PARAMETERS);
   2 | eCrossReferences = ECrossReferenceEList.createECrossReferenceEList(this);

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   eTypeParameters | eCrossReferences | VARIABLE_NAME_MISMATCH
   org.eclipse.emf.ecore.util.EObjectContainmentEList.Resolving | org.eclipse.emf.ecore.util.ECrossReferenceEList | SUBCLASS_TYPE_MISMATCH
   new EObjectContainmentEList.Resolving(ETypeParameter.class,this,EcorePackage.ECLASSIFIER__ETYPE_PARAMETERS) | ECrossReferenceEList.createECrossReferenceEList(this) | TYPE_COMPATIBLE_REPLACEMENT

   2

       eCrossReferences = ECrossReferenceEList.createECrossReferenceEList(this);

   3

       return eTypeParameters;

   3 | return eTypeParameters;
   3 | return eCrossReferences;

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   eTypeParameters | eCrossReferences | VARIABLE_NAME_MISMATCH

   3

       return eCrossReferences;

   Precondition Violations (0)
   Row | Violation
   --- | ---