if (itemPropertyDescriptors == null) { super.getPropertyDescriptors(object); //MappingPackage ePackage = ((FunctionPair)object).ePackageMapping(); MappingPackage ePackage = MappingPackage.eINSTANCE; // This is for the in2out feature. // itemPropertyDescriptors.add (new ItemPropertyDescriptor (adapterFactory, MappingPlugin.getPlugin().getString("_UI_In2out_property_label"), MappingPlugin.getPlugin().getString("_UI_In2out_property_description"), ePackage.getFunctionPair_In2out())); // This is for the out2in feature. // itemPropertyDescriptors.add (new ItemPropertyDescriptor (adapterFactory, MappingPlugin.getPlugin().getString("_UI_Out2in_property_label"), MappingPlugin.getPlugin().getString("_UI_Out2in_property_description"), ePackage.getFunctionPair_Out2in())); } return itemPropertyDescriptors;
if (itemPropertyDescriptors == null) { super.getPropertyDescriptors(object); //MappingPackage ePackage = ((ComplexTypeConverter)object).ePackageMapping(); MappingPackage ePackage = MappingPackage.eINSTANCE; // This is for the in2out feature. // itemPropertyDescriptors.add (new ItemPropertyDescriptor (adapterFactory, MappingPlugin.getPlugin().getString("_UI_In2out_property_label"), MappingPlugin.getPlugin().getString("_UI_In2out_property_description"), ePackage.getComplexTypeConverter_In2out())); // This is for the out2in feature. // itemPropertyDescriptors.add (new ItemPropertyDescriptor (adapterFactory, MappingPlugin.getPlugin().getString("_UI_Out2in_property_label"), MappingPlugin.getPlugin().getString("_UI_Out2in_property_description"), ePackage.getComplexTypeConverter_Out2in())); } return itemPropertyDescriptors;
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/mapping/provider/FunctionPairItemProvider.java File path: /emf-2.4.1/src/org/eclipse/emf/mapping/provider/ComplexTypeConverterItemProvider.java
Method name: List getPropertyDescriptors(Object) Method name: List getPropertyDescriptors(Object)
Number of AST nodes: 6 Number of AST nodes: 6
1
if (itemPropertyDescriptors == null)
1
if (itemPropertyDescriptors == null)
2
    {
2
    {
3
      super.getPropertyDescriptors(object);
3
      super.getPropertyDescriptors(object);
4
      //MappingPackage ePackage = ((FunctionPair)object).ePackageMapping();
4
      //MappingPackage ePackage = ((ComplexTypeConverter)object).ePackageMapping();
5
      MappingPackage ePackage = MappingPackage.eINSTANCE;
5
      MappingPackage ePackage = MappingPackage.eINSTANCE;
6
      // This is for the in2out feature.
6
      // This is for the in2out feature.
7
      //
7
      //
8
      itemPropertyDescriptors.add
8
      itemPropertyDescriptors.add
9
        (new ItemPropertyDescriptor
9
        (new ItemPropertyDescriptor
10
          (adapterFactory,
10
          (adapterFactory,
11
           MappingPlugin.getPlugin().getString("_UI_In2out_property_label"),
11
           MappingPlugin.getPlugin().getString("_UI_In2out_property_label"),
12
           MappingPlugin.getPlugin().getString("_UI_In2out_property_description"),
12
           MappingPlugin.getPlugin().getString("_UI_In2out_property_description"),
13
           ePackage.getFunctionPair_In2out()));
13
           ePackage.getComplexTypeConverter_In2out()));
14
      // This is for the out2in feature.
14
      // This is for the out2in feature.
15
      //
15
      //
16
      itemPropertyDescriptors.add
16
      itemPropertyDescriptors.add
17
        (new ItemPropertyDescriptor
17
        (new ItemPropertyDescriptor
18
          (adapterFactory,
18
          (adapterFactory,
19
           MappingPlugin.getPlugin().getString("_UI_Out2in_property_label"),
19
           MappingPlugin.getPlugin().getString("_UI_Out2in_property_label"),
20
           MappingPlugin.getPlugin().getString("_UI_Out2in_property_description"),
20
           MappingPlugin.getPlugin().getString("_UI_Out2in_property_description"),
21
           ePackage.getFunctionPair_Out2in()));
21
           ePackage.getComplexTypeConverter_Out2in()));
22
    }
22
    }
23
    return itemPropertyDescriptors;
23
    return itemPropertyDescriptors;
Summary
Number of common nesting structure subtrees1
Number of refactorable cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)0.1
Clones locationClones are in different classes having the same super class
Number of node comparisons26
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements6
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)4.6
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (itemPropertyDescriptors == null)
    1
    if (itemPropertyDescriptors == null)
    2
    super.getPropertyDescriptors(object);
    2
    super.getPropertyDescriptors(object);
    3
    MappingPackage ePackage = MappingPackage.eINSTANCE;
    3
    MappingPackage ePackage = MappingPackage.eINSTANCE;
    4
    itemPropertyDescriptors.add(new ItemPropertyDescriptor(adapterFactory, MappingPlugin.getPlugin().getString("_UI_In2out_property_label"), MappingPlugin.getPlugin().getString("_UI_In2out_property_description"), ePackage.getFunctionPair_In2out()));
    4
    itemPropertyDescriptors.add(new ItemPropertyDescriptor(adapterFactory, MappingPlugin.getPlugin().getString("_UI_In2out_property_label"), MappingPlugin.getPlugin().getString("_UI_In2out_property_description"), ePackage.getFunctionPair_In2out()));
    4
    itemPropertyDescriptors.add(new ItemPropertyDescriptor(adapterFactory, MappingPlugin.getPlugin().getString("_UI_In2out_property_label"), MappingPlugin.getPlugin().getString("_UI_In2out_property_description"), ePackage.getComplexTypeConverter_In2out()));
    Differences
    Expression1Expression2Difference
    getFunctionPair_In2outgetComplexTypeConverter_In2outMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression ePackage.getFunctionPair_In2out() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression ePackage.getComplexTypeConverter_In2out() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4
    itemPropertyDescriptors.add(new ItemPropertyDescriptor(adapterFactory, MappingPlugin.getPlugin().getString("_UI_In2out_property_label"), MappingPlugin.getPlugin().getString("_UI_In2out_property_description"), ePackage.getComplexTypeConverter_In2out()));
    5
    itemPropertyDescriptors.add(new ItemPropertyDescriptor(adapterFactory, MappingPlugin.getPlugin().getString("_UI_Out2in_property_label"), MappingPlugin.getPlugin().getString("_UI_Out2in_property_description"), ePackage.getFunctionPair_Out2in()));
    5
    itemPropertyDescriptors.add(new ItemPropertyDescriptor(adapterFactory, MappingPlugin.getPlugin().getString("_UI_Out2in_property_label"), MappingPlugin.getPlugin().getString("_UI_Out2in_property_description"), ePackage.getFunctionPair_Out2in()));
    5
    itemPropertyDescriptors.add(new ItemPropertyDescriptor(adapterFactory, MappingPlugin.getPlugin().getString("_UI_Out2in_property_label"), MappingPlugin.getPlugin().getString("_UI_Out2in_property_description"), ePackage.getComplexTypeConverter_Out2in()));
    Differences
    Expression1Expression2Difference
    getFunctionPair_Out2ingetComplexTypeConverter_Out2inMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression ePackage.getFunctionPair_Out2in() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression ePackage.getComplexTypeConverter_Out2in() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    5
    itemPropertyDescriptors.add(new ItemPropertyDescriptor(adapterFactory, MappingPlugin.getPlugin().getString("_UI_Out2in_property_label"), MappingPlugin.getPlugin().getString("_UI_Out2in_property_description"), ePackage.getComplexTypeConverter_Out2in()));
    6
    return itemPropertyDescriptors;
    6
    return itemPropertyDescriptors;
    Precondition Violations (4)
    Row Violation
    1Expression ePackage.getFunctionPair_In2out() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression ePackage.getComplexTypeConverter_In2out() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression ePackage.getFunctionPair_Out2in() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Expression ePackage.getComplexTypeConverter_Out2in() cannot be parameterized, because it has dependencies to/from statements that will be extracted