173-131-188

if (eObjectItemProvider == null) { eObjectItemProvider = new ReflectiveItemProvider(this); } return eObjectItemProvider;
mappingHelperItemProvider = new MappingHelperItemProvider(this); } return mappingHelperItemProvider;

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/mapping/provider/MappingItemProviderAdapterFactory.java
Method name: `Adapter createEObjectAdapter()` |  | Method name: `Adapter createMappingHelperAdapter()`
Number of AST nodes: 3 |  | Number of AST nodes: 2

1

    if (eObjectItemProvider == null)↵

2

        {↵

3

          eObjectItemProvider = new ReflectiveItemProvider(this);↵

1

    mappingHelperItemProvider = new MappingHelperItemProvider(this);↵

4

        }↵

2

        }↵

5

        return eObjectItemProvider;

3

        return mappingHelperItemProvider;

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.0
Clones location | Clones are in different classes having the same super class
Number of node comparisons | 2

1. {Refactorable}

   Mapping Summary
   Number of mapped statements | 1
   Number of unmapped statements in the first code fragment | 0
   Number of unmapped statements in the second code fragment | 1
   Time elapsed for statement mapping (ms) | 0.0
   Clone type | Type 3

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

   1

       mappingHelperItemProvider = new MappingHelperItemProvider(this);

   3

       return eObjectItemProvider;

   3 | return eObjectItemProvider;
   2 | return mappingHelperItemProvider;

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   eObjectItemProvider | mappingHelperItemProvider | VARIABLE_NAME_MISMATCH
   org.eclipse.emf.edit.provider.ReflectiveItemProvider | org.eclipse.emf.mapping.provider.MappingHelperItemProvider | SUBCLASS_TYPE_MISMATCH

   2

       return mappingHelperItemProvider;

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