173-166-173

if (eParameters == null) { eParameters = new EObjectContainmentWithInverseEList<EParameter>(EParameter.class, this, EcorePackage.EOPERATION__EPARAMETERS, EcorePackage.EPARAMETER__EOPERATION); } return eParameters;
if (references == null) { references = new EObjectResolvingEList<EObject>(EObject.class, this, EcorePackage.EANNOTATION__REFERENCES); } return references;

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

1

    if (eParameters == null)↵

1

    if (references == null)↵

2

        {↵

2

        {↵

3

          eParameters = new EObjectContainmentWithInverseEList<EParameter>(EParameter.class, this, EcorePackage.EOPERATION__EPARAMETERS, EcorePackage.EPARAMETER__EOPERATION);↵

3

          references = new EObjectResolvingEList<EObject>(EObject.class, this, EcorePackage.EANNOTATION__REFERENCES);↵

4

        }↵

4

        }↵

5

        return eParameters;

5

        return references;

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

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

   1

       if (eParameters == null)

   1 | if (eParameters == null)
   1 | if (references == null)

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   eParameters | references | VARIABLE_NAME_MISMATCH

   1

       if (references == null)

   2

       eParameters = new EObjectContainmentWithInverseEList<EParameter>(EParameter.class, this, EcorePackage.EOPERATION__EPARAMETERS, EcorePackage.EPARAMETER__EOPERATION);

   2 | eParameters = new EObjectContainmentWithInverseEList<EParameter>(EParameter.class, this, EcorePackage.EOPERATION__EPARAMETERS, EcorePackage.EPARAMETER__EOPERATION);
   2 | references = new EObjectResolvingEList<EObject>(EObject.class, this, EcorePackage.EANNOTATION__REFERENCES);

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   eParameters | references | VARIABLE_NAME_MISMATCH
   org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList | org.eclipse.emf.ecore.util.EObjectResolvingEList | SUBCLASS_TYPE_MISMATCH
   org.eclipse.emf.ecore.EParameter | org.eclipse.emf.ecore.EObject | SUBCLASS_TYPE_MISMATCH
   new EObjectContainmentWithInverseEList(EParameter.class,this,EcorePackage.EOPERATION__EPARAMETERS,EcorePackage.EPARAMETER__EOPERATION) | new EObjectResolvingEList(EObject.class,this,EcorePackage.EANNOTATION__REFERENCES) | ARGUMENT_NUMBER_MISMATCH

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

   2

       references = new EObjectResolvingEList<EObject>(EObject.class, this, EcorePackage.EANNOTATION__REFERENCES);

   3

       return eParameters;

   3 | return eParameters;
   3 | return references;

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   eParameters | references | VARIABLE_NAME_MISMATCH

   3

       return references;

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