173-126-194

if (eStringToStringMapEntryItemProvider == null) { eStringToStringMapEntryItemProvider = new EStringToStringMapEntryItemProvider(this); } return eStringToStringMapEntryItemProvider;
if (referencedEPackageFilterToConvert == null) { referencedEPackageFilterToConvert = createReferencedEPackageFilterToConvert(); } return referencedEPackageFilterToConvert.computeValidReferencedGenPackages();

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/converter/ModelConverter.java
Method name: `Adapter createEStringToStringMapEntryAdapter()` |  | Method name: `List computeValidReferencedGenPackages()`
Number of AST nodes: 3 |  | Number of AST nodes: 3

1

    if (eStringToStringMapEntryItemProvider == null)↵

1

    if (referencedEPackageFilterToConvert == null)↵

2

        {↵

2

        {↵

3

          eStringToStringMapEntryItemProvider = new EStringToStringMapEntryItemProvider(this);↵

3

          referencedEPackageFilterToConvert = createReferencedEPackageFilterToConvert();↵

4

        }↵

4

        }↵

5

        return eStringToStringMapEntryItemProvider;

5

        return referencedEPackageFilterToConvert.computeValidReferencedGenPackages();

See real code fragment |  | See real code fragment

Summary
Number of common nesting structure subtrees | 1
Number of refactorable cases | 0
Number of non-refactorable cases | 1
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.2
Clones location | Clones are in different classes
Number of node comparisons | 5

1. {Non-refactorable}

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

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

   1

       if (eStringToStringMapEntryItemProvider == null)

   1 | if (eStringToStringMapEntryItemProvider == null)
   1 | if (referencedEPackageFilterToConvert == null)

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   eStringToStringMapEntryItemProvider | referencedEPackageFilterToConvert | VARIABLE_NAME_MISMATCH
   org.eclipse.emf.ecore.provider.EStringToStringMapEntryItemProvider | org.eclipse.emf.converter.ModelConverter.ReferencedEPackageFilter | VARIABLE_TYPE_MISMATCH

   Preondition Violations

   Type org.eclipse.emf.ecore.provider.EStringToStringMapEntryItemProvider of variable eStringToStringMapEntryItemProvider does not match with type org.eclipse.emf.converter.ModelConverter.ReferencedEPackageFilter of variable referencedEPackageFilterToConvert
   - Make classes org.eclipse.emf.ecore.provider.EStringToStringMapEntryItemProvider and org.eclipse.emf.converter.ModelConverter.ReferencedEPackageFilter extend a common superclass

   1

       if (referencedEPackageFilterToConvert == null)

   2 | referencedEPackageFilterToConvert = createReferencedEPackageFilterToConvert();

   Preondition Violations
   Unmatched statement referencedEPackageFilterToConvert=createReferencedEPackageFilterToConvert(); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted

   2

       referencedEPackageFilterToConvert = createReferencedEPackageFilterToConvert();

   2

       eStringToStringMapEntryItemProvider = new EStringToStringMapEntryItemProvider(this);

   2 | eStringToStringMapEntryItemProvider = new EStringToStringMapEntryItemProvider(this);

   Preondition Violations
   Unmatched statement eStringToStringMapEntryItemProvider=new EStringToStringMapEntryItemProvider(this); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted

   3 | return referencedEPackageFilterToConvert.computeValidReferencedGenPackages();

   Preondition Violations
   Unmatched return referencedEPackageFilterToConvert.computeValidReferencedGenPackages();

   3

       return referencedEPackageFilterToConvert.computeValidReferencedGenPackages();

   3

       return eStringToStringMapEntryItemProvider;

   3 | return eStringToStringMapEntryItemProvider;

   Preondition Violations
   Unmatched return eStringToStringMapEntryItemProvider;

   Precondition Violations (6)
   Row | Violation
   --- | ---
   1 | Type org.eclipse.emf.ecore.provider.EStringToStringMapEntryItemProvider of variable eStringToStringMapEntryItemProvider does not match with type org.eclipse.emf.converter.ModelConverter.ReferencedEPackageFilter of variable referencedEPackageFilterToConvert
   2 | Unmatched statement referencedEPackageFilterToConvert=createReferencedEPackageFilterToConvert(); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
   3 | Unmatched statement eStringToStringMapEntryItemProvider=new EStringToStringMapEntryItemProvider(this); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
   4 | Unmatched return referencedEPackageFilterToConvert.computeValidReferencedGenPackages();
   5 | Unmatched return eStringToStringMapEntryItemProvider;
   6 | The refactoring of the clones is infeasible, because the number of macthed statements is equal to zero