173-156-168

if (eLiterals == null) { eLiterals = new EObjectContainmentWithInverseEList<EEnumLiteral>(EEnumLiteral.class, this, EcorePackage.EENUM__ELITERALS, EcorePackage.EENUM_LITERAL__EENUM); } return eLiterals;
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/EEnumImpl.java |  | File path: /emf-2.4.1/src/org/eclipse/emf/ecore/impl/FlatEObjectImpl.java
Method name: `EList getELiterals()` |  | Method name: `EList eCrossReferences()`
Number of AST nodes: 3 |  | Number of AST nodes: 3

1

    if (eLiterals == null)↵

1

    if (eCrossReferences == null)↵

2

        {↵

2

        {↵

3

          eLiterals = new EObjectContainmentWithInverseEList<EEnumLiteral>(EEnumLiteral.class, this, EcorePackage.EENUM__ELITERALS, EcorePackage.EENUM_LITERAL__EENUM);↵

3

          eCrossReferences = ECrossReferenceEList.createECrossReferenceEList(this);↵

4

        }↵

4

        }↵

5

        return eLiterals;

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

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

   1

       if (eLiterals == null)

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

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

   1

       if (eCrossReferences == null)

   2

       eLiterals = new EObjectContainmentWithInverseEList<EEnumLiteral>(EEnumLiteral.class, this, EcorePackage.EENUM__ELITERALS, EcorePackage.EENUM_LITERAL__EENUM);

   2 | eLiterals = new EObjectContainmentWithInverseEList<EEnumLiteral>(EEnumLiteral.class, this, EcorePackage.EENUM__ELITERALS, EcorePackage.EENUM_LITERAL__EENUM);
   2 | eCrossReferences = ECrossReferenceEList.createECrossReferenceEList(this);

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   eLiterals | eCrossReferences | VARIABLE_NAME_MISMATCH
   org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList | org.eclipse.emf.ecore.util.ECrossReferenceEList | SUBCLASS_TYPE_MISMATCH
   new EObjectContainmentWithInverseEList(EEnumLiteral.class,this,EcorePackage.EENUM__ELITERALS,EcorePackage.EENUM_LITERAL__EENUM) | ECrossReferenceEList.createECrossReferenceEList(this) | TYPE_COMPATIBLE_REPLACEMENT

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

   2

       eCrossReferences = ECrossReferenceEList.createECrossReferenceEList(this);

   3

       return eLiterals;

   3 | return eLiterals;
   3 | return eCrossReferences;

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

   3

       return eCrossReferences;

   Precondition Violations (1)
   Row | Violation
   --- | ---
   1 | Expression new EObjectContainmentWithInverseEList<EEnumLiteral>(EEnumLiteral.class,this,EcorePackage.EENUM__ELITERALS,EcorePackage.EENUM_LITERAL__EENUM) cannot be parameterized, because it has dependencies to/from statements that will be extracted