173-10-22

if (itemPropertyDescriptors == null) { super.getPropertyDescriptors(object); addSetPropertyDescriptor(object); addValuePropertyDescriptor(object); addFeaturePropertyDescriptor(object); } return itemPropertyDescriptors;
if (itemPropertyDescriptors == null) { super.getPropertyDescriptors(object); addEPackagePropertyDescriptor(object); } return itemPropertyDescriptors;

Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/change/provider/FeatureChangeItemProvider.java |  | File path: /emf-2.4.1/src/org/eclipse/emf/ecore/provider/EFactoryItemProvider.java
Method name: `List getPropertyDescriptors(Object)` |  | Method name: `List getPropertyDescriptors(Object)`
Number of AST nodes: 6 |  | Number of AST nodes: 4

1

    if (itemPropertyDescriptors == null)↵

1

    if (itemPropertyDescriptors == null)↵

2

        {↵

2

        {↵

3

          super.getPropertyDescriptors(object);↵

3

          super.getPropertyDescriptors(object);↵

4

          addSetPropertyDescriptor(object);↵

4

          add↵

5

          addValuePropertyDescriptor(object);↵

6

          addFeaturePropertyDescriptor(object);↵

5

    EPackagePropertyDescriptor(object);↵

7

        }↵

6

        }↵

8

        return itemPropertyDescriptors;

7

        return itemPropertyDescriptors;

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 having the same super class
Number of node comparisons | 16

1. {Non-refactorable}

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

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

   1

       if (itemPropertyDescriptors == null)

   1

       if (itemPropertyDescriptors == null)

   2

       super.getPropertyDescriptors(object);

   2 | super.getPropertyDescriptors(object);
   2 | super.getPropertyDescriptors(object);

   Preondition Violations
   Super method call super.getPropertyDescriptors(object); cannot be extracted from method
   Super method call super.getPropertyDescriptors(object); cannot be extracted from method

   2

       super.getPropertyDescriptors(object);

   3

       addSetPropertyDescriptor(object);

   3 | addSetPropertyDescriptor(object);

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

   4

       addValuePropertyDescriptor(object);

   4 | addValuePropertyDescriptor(object);
   3 | addEPackagePropertyDescriptor(object);

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   addValuePropertyDescriptor | addEPackagePropertyDescriptor | METHOD_INVOCATION_NAME_MISMATCH

   Preondition Violations
   Expression addValuePropertyDescriptor(object) cannot be parameterized, because it has dependencies to/from statements that will be extracted
   Expression addEPackagePropertyDescriptor(object) cannot be parameterized, because it has dependencies to/from statements that will be extracted
   Expression addValuePropertyDescriptor(object) is a void method call, and thus it cannot be parameterized
   Expression addEPackagePropertyDescriptor(object) is a void method call, and thus it cannot be parameterized

   3

       addEPackagePropertyDescriptor(object);

   5

       addFeaturePropertyDescriptor(object);

   5 | addFeaturePropertyDescriptor(object);

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

   6

       return itemPropertyDescriptors;

   4

       return itemPropertyDescriptors;

   Precondition Violations (8)
   Row | Violation
   --- | ---
   1 | Super method call super.getPropertyDescriptors(object); cannot be extracted from method
   2 | Super method call super.getPropertyDescriptors(object); cannot be extracted from method
   3 | Unmatched statement addSetPropertyDescriptor(object); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
   4 | Expression addValuePropertyDescriptor(object) cannot be parameterized, because it has dependencies to/from statements that will be extracted
   5 | Expression addEPackagePropertyDescriptor(object) cannot be parameterized, because it has dependencies to/from statements that will be extracted
   6 | Expression addValuePropertyDescriptor(object) is a void method call, and thus it cannot be parameterized
   7 | Expression addEPackagePropertyDescriptor(object) is a void method call, and thus it cannot be parameterized
   8 | Unmatched statement addFeaturePropertyDescriptor(object); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted