173-1-69

if (itemPropertyDescriptors == null) { super.getPropertyDescriptors(object); addChangeablePropertyDescriptor(object); addVolatilePropertyDescriptor(object); addTransientPropertyDescriptor(object); addDefaultValueLiteralPropertyDescriptor(object); addDefaultValuePropertyDescriptor(object); addUnsettablePropertyDescriptor(object); addDerivedPropertyDescriptor(object); addEContainingClassPropertyDescriptor(object); } return itemPropertyDescriptors;
if (eNamedElementToXMLInfoMapEntryItemProvider == null) { eNamedElementToXMLInfoMapEntryItemProvider = new ENamedElementToXMLInfoMapEntryItemProvider(this); } return eNamedElementToXMLInfoMapEntryItemProvider;

Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/provider/EStructuralFeatureItemProvider.java |  | File path: /emf-2.4.1/src/org/eclipse/emf/mapping/ecore2xml/provider/Ecore2XMLItemProviderAdapterFactory.java
Method name: `List getPropertyDescriptors(Object)` |  | Method name: `Adapter createENamedElementToXMLInfoMapEntryAdapter()`
Number of AST nodes: 11 |  | Number of AST nodes: 3

1

    if (itemPropertyDescriptors == null)↵

1

    if (↵

2

        {↵

3

          super.getPropertyDescriptors(object);↵

4

          addChangeablePropertyDescriptor(object);↵

5

          addVolatilePropertyDescriptor(object);↵

6

          addTransientPropertyDescriptor(object);↵

7

          addDefaultValueLiteralPropertyDescriptor(object);↵

8

          addDefaultValuePropertyDescriptor(object);↵

9

          addUnsettablePropertyDescriptor(object);↵

10

          addDerivedPropertyDescriptor(object);↵

11

          addEContainingClassPropertyDescriptor(object↵

2

    eNamedElementToXMLInfoMapEntryItemProvider == null)↵

3

        {↵

12

    );↵

4

          eNamedElementToXMLInfoMapEntryItemProvider = new ENamedElementToXMLInfoMapEntryItemProvider(this);↵

13

        }↵

5

        }↵

14

        return itemPropertyDescriptors;

6

        return eNamedElementToXMLInfoMapEntryItemProvider;

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.1
Clones location | Clones are in different classes
Number of node comparisons | 21

1. {Non-refactorable}

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

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

   1

       if (itemPropertyDescriptors == null)

   1 | if (itemPropertyDescriptors == null)
   1 | if (eNamedElementToXMLInfoMapEntryItemProvider == null)

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   itemPropertyDescriptors | eNamedElementToXMLInfoMapEntryItemProvider | VARIABLE_NAME_MISMATCH
   java.util.List | org.eclipse.emf.mapping.ecore2xml.provider.ENamedElementToXMLInfoMapEntryItemProvider | VARIABLE_TYPE_MISMATCH

   Preondition Violations

   Type java.util.List<org.eclipse.emf.edit.provider.IItemPropertyDescriptor> of variable itemPropertyDescriptors does not match with type org.eclipse.emf.mapping.ecore2xml.provider.ENamedElementToXMLInfoMapEntryItemProvider of variable eNamedElementToXMLInfoMapEntryItemProvider
   - Make classes java.util.List and org.eclipse.emf.mapping.ecore2xml.provider.ENamedElementToXMLInfoMapEntryItemProvider extend a common superclass

   1

       if (eNamedElementToXMLInfoMapEntryItemProvider == null)

   2

       eNamedElementToXMLInfoMapEntryItemProvider = new ENamedElementToXMLInfoMapEntryItemProvider(this);

   2

       super.getPropertyDescriptors(object);

   3

       addChangeablePropertyDescriptor(object);

   4

       addVolatilePropertyDescriptor(object);

   5

       addTransientPropertyDescriptor(object);

   6

       addDefaultValueLiteralPropertyDescriptor(object);

   7

       addDefaultValuePropertyDescriptor(object);

   8

       addUnsettablePropertyDescriptor(object);

   9

       addDerivedPropertyDescriptor(object);

   10

       addEContainingClassPropertyDescriptor(object);

   3 | return eNamedElementToXMLInfoMapEntryItemProvider;

   Preondition Violations
   Unmatched return eNamedElementToXMLInfoMapEntryItemProvider;

   3

       return eNamedElementToXMLInfoMapEntryItemProvider;

   11

       return itemPropertyDescriptors;

   11 | return itemPropertyDescriptors;

   Preondition Violations
   Unmatched return itemPropertyDescriptors;

   Precondition Violations (3)
   Row | Violation
   --- | ---
   1 | Type java.util.List<org.eclipse.emf.edit.provider.IItemPropertyDescriptor> of variable itemPropertyDescriptors does not match with type org.eclipse.emf.mapping.ecore2xml.provider.ENamedElementToXMLInfoMapEntryItemProvider of variable eNamedElementToXMLInfoMapEntryItemProvider
   2 | Unmatched return eNamedElementToXMLInfoMapEntryItemProvider;
   3 | Unmatched return itemPropertyDescriptors;