173-128-133

if (eParameterItemProvider == null) { eParameterItemProvider = new EParameterItemProvider(this); } return eParameterItemProvider;
if (eEnumLiteralItemProvider == null) { eEnumLiteralItemProvider = new EEnumLiteralItemProvider(this); } return eEnumLiteralItemProvider;

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 createEParameterAdapter()` |  | Method name: `Adapter createEEnumLiteralAdapter()`
Number of AST nodes: 3 |  | Number of AST nodes: 3

1

    if (eParameterItemProvider == null)↵

1

    if (eEnumLiteralItemProvider == null)↵

2

        {↵

2

        {↵

3

          eParameterItemProvider = new EParameterItemProvider(this);↵

3

          eEnumLiteralItemProvider = new EEnumLiteralItemProvider(this);↵

4

        }↵

4

        }↵

5

        return eParameterItemProvider;

5

        return eEnumLiteralItemProvider;

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

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

   1

       if (eParameterItemProvider == null)

   1 | if (eParameterItemProvider == null)
   1 | if (eEnumLiteralItemProvider == null)

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   eParameterItemProvider | eEnumLiteralItemProvider | VARIABLE_NAME_MISMATCH
   org.eclipse.emf.ecore.provider.EParameterItemProvider | org.eclipse.emf.ecore.provider.EEnumLiteralItemProvider | SUBCLASS_TYPE_MISMATCH

   1

       if (eEnumLiteralItemProvider == null)

   2

       eParameterItemProvider = new EParameterItemProvider(this);

   2 | eParameterItemProvider = new EParameterItemProvider(this);
   2 | eEnumLiteralItemProvider = new EEnumLiteralItemProvider(this);

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   eParameterItemProvider | eEnumLiteralItemProvider | VARIABLE_NAME_MISMATCH
   org.eclipse.emf.ecore.provider.EParameterItemProvider | org.eclipse.emf.ecore.provider.EEnumLiteralItemProvider | SUBCLASS_TYPE_MISMATCH
   org.eclipse.emf.ecore.provider.EParameterItemProvider | org.eclipse.emf.ecore.provider.EEnumLiteralItemProvider | SUBCLASS_TYPE_MISMATCH

   2

       eEnumLiteralItemProvider = new EEnumLiteralItemProvider(this);

   3

       return eParameterItemProvider;

   3 | return eParameterItemProvider;
   3 | return eEnumLiteralItemProvider;

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   eParameterItemProvider | eEnumLiteralItemProvider | VARIABLE_NAME_MISMATCH
   org.eclipse.emf.ecore.provider.EParameterItemProvider | org.eclipse.emf.ecore.provider.EEnumLiteralItemProvider | SUBCLASS_TYPE_MISMATCH

   3

       return eEnumLiteralItemProvider;

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