173-130-132

if (eOperationItemProvider == null) { eOperationItemProvider = new EOperationItemProvider(this); } return eOperationItemProvider;
if (eFactoryItemProvider == null) { eFactoryItemProvider = new EFactoryItemProvider(this); } return eFactoryItemProvider;

Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/provider/EcoreItemProviderAdapterFactory.java |  | File path: /emf-2.4.1/src/org/eclipse/emf/ecore/provider/EcoreItemProviderAdapterFactory.java
Method name: `Adapter createEOperationAdapter()` |  | Method name: `Adapter createEFactoryAdapter()`
Number of AST nodes: 3 |  | Number of AST nodes: 3

1

    if (eOperationItemProvider == null)↵

1

    if (eFactoryItemProvider == null)↵

2

        {↵

2

        {↵

3

          eOperationItemProvider = new EOperationItemProvider(this);↵

3

          eFactoryItemProvider = new EFactoryItemProvider(this);↵

4

        }↵

4

        }↵

5

        return eOperationItemProvider;

5

        return eFactoryItemProvider;

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.5
Clones location | Clones are declared in the same 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) | 74.2
   Clone type | Type 2

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

   1

       if (eOperationItemProvider == null)

   1 | if (eOperationItemProvider == null)
   1 | if (eFactoryItemProvider == null)

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   eOperationItemProvider | eFactoryItemProvider | VARIABLE_NAME_MISMATCH
   org.eclipse.emf.ecore.provider.EOperationItemProvider | org.eclipse.emf.ecore.provider.EFactoryItemProvider | SUBCLASS_TYPE_MISMATCH

   1

       if (eFactoryItemProvider == null)

   2

       eOperationItemProvider = new EOperationItemProvider(this);

   2 | eOperationItemProvider = new EOperationItemProvider(this);
   2 | eFactoryItemProvider = new EFactoryItemProvider(this);

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   eOperationItemProvider | eFactoryItemProvider | VARIABLE_NAME_MISMATCH
   org.eclipse.emf.ecore.provider.EOperationItemProvider | org.eclipse.emf.ecore.provider.EFactoryItemProvider | SUBCLASS_TYPE_MISMATCH
   org.eclipse.emf.ecore.provider.EOperationItemProvider | org.eclipse.emf.ecore.provider.EFactoryItemProvider | SUBCLASS_TYPE_MISMATCH

   2

       eFactoryItemProvider = new EFactoryItemProvider(this);

   3

       return eOperationItemProvider;

   3 | return eOperationItemProvider;
   3 | return eFactoryItemProvider;

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   eOperationItemProvider | eFactoryItemProvider | VARIABLE_NAME_MISMATCH
   org.eclipse.emf.ecore.provider.EOperationItemProvider | org.eclipse.emf.ecore.provider.EFactoryItemProvider | SUBCLASS_TYPE_MISMATCH

   3

       return eFactoryItemProvider;

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