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())); }
if (itemPropertyDescriptors == null) { super.getPropertyDescriptors(object); //MappingPackage ePackage = ((FunctionNamePair)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.getFunctionNamePair_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.getFunctionNamePair_Out2in())); }
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/mapping/provider/ComplexTypeConverterItemProvider.java File path: /emf-2.4.1/src/org/eclipse/emf/mapping/provider/FunctionNamePairItemProvider.java
Method name: List getPropertyDescriptors(Object) Method name: List getPropertyDescriptors(Object)
Number of AST nodes: 5 Number of AST nodes: 5
1
if (itemPropertyDescriptors == null)
1
if (itemPropertyDescriptors == null)
2
    {
2
    {
3
      super.getPropertyDescriptors(object);
3
      super.getPropertyDescriptors(object);
4
      //MappingPackage ePackage = ((ComplexTypeConverter)object).ePackageMapping();
4
      //MappingPackage ePackage = ((FunctionNamePair)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.getComplexTypeConverter_In2out()));
13
           ePackage.getFunctionNamePair_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.getComplexTypeConverter_Out2in()));
21
           ePackage.getFunctionNamePair_Out2in()));
22
    }
22
    }
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 comparisons25
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements5
    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.1
    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.getComplexTypeConverter_In2out()));
    4
    itemPropertyDescriptors.add(new ItemPropertyDescriptor(adapterFactory, MappingPlugin.getPlugin().getString("_UI_In2out_property_label"), MappingPlugin.getPlugin().getString("_UI_In2out_property_description"), ePackage.getComplexTypeConverter_In2out()));
    4
    itemPropertyDescriptors.add(new ItemPropertyDescriptor(adapterFactory, MappingPlugin.getPlugin().getString("_UI_In2out_property_label"), MappingPlugin.getPlugin().getString("_UI_In2out_property_description"), ePackage.getFunctionNamePair_In2out()));
    Differences
    Expression1Expression2Difference
    getComplexTypeConverter_In2outgetFunctionNamePair_In2outMETHOD_INVOCATION_NAME_MISMATCH
    org.eclipse.emf.ecore.EReferenceorg.eclipse.emf.ecore.EAttributeVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Expression ePackage.getComplexTypeConverter_In2out() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression ePackage.getFunctionNamePair_In2out() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type org.eclipse.emf.ecore.EReference of variable ePackage.getComplexTypeConverter_In2out() does not match with type org.eclipse.emf.ecore.EAttribute of variable ePackage.getFunctionNamePair_In2out()
    • Make classes org.eclipse.emf.ecore.EReference and org.eclipse.emf.ecore.EAttribute extend a common superclass
    4
    itemPropertyDescriptors.add(new ItemPropertyDescriptor(adapterFactory, MappingPlugin.getPlugin().getString("_UI_In2out_property_label"), MappingPlugin.getPlugin().getString("_UI_In2out_property_description"), ePackage.getFunctionNamePair_In2out()));
    5
    itemPropertyDescriptors.add(new ItemPropertyDescriptor(adapterFactory, MappingPlugin.getPlugin().getString("_UI_Out2in_property_label"), MappingPlugin.getPlugin().getString("_UI_Out2in_property_description"), ePackage.getComplexTypeConverter_Out2in()));
    5
    itemPropertyDescriptors.add(new ItemPropertyDescriptor(adapterFactory, MappingPlugin.getPlugin().getString("_UI_Out2in_property_label"), MappingPlugin.getPlugin().getString("_UI_Out2in_property_description"), ePackage.getComplexTypeConverter_Out2in()));
    5
    itemPropertyDescriptors.add(new ItemPropertyDescriptor(adapterFactory, MappingPlugin.getPlugin().getString("_UI_Out2in_property_label"), MappingPlugin.getPlugin().getString("_UI_Out2in_property_description"), ePackage.getFunctionNamePair_Out2in()));
    Differences
    Expression1Expression2Difference
    getComplexTypeConverter_Out2ingetFunctionNamePair_Out2inMETHOD_INVOCATION_NAME_MISMATCH
    org.eclipse.emf.ecore.EReferenceorg.eclipse.emf.ecore.EAttributeVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Expression ePackage.getComplexTypeConverter_Out2in() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression ePackage.getFunctionNamePair_Out2in() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type org.eclipse.emf.ecore.EReference of variable ePackage.getComplexTypeConverter_Out2in() does not match with type org.eclipse.emf.ecore.EAttribute of variable ePackage.getFunctionNamePair_Out2in()
    • Make classes org.eclipse.emf.ecore.EReference and org.eclipse.emf.ecore.EAttribute extend a common superclass
    5
    itemPropertyDescriptors.add(new ItemPropertyDescriptor(adapterFactory, MappingPlugin.getPlugin().getString("_UI_Out2in_property_label"), MappingPlugin.getPlugin().getString("_UI_Out2in_property_description"), ePackage.getFunctionNamePair_Out2in()));
    Precondition Violations (6)
    Row Violation
    1Expression ePackage.getComplexTypeConverter_In2out() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression ePackage.getFunctionNamePair_In2out() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Type org.eclipse.emf.ecore.EReference of variable ePackage.getComplexTypeConverter_In2out() does not match with type org.eclipse.emf.ecore.EAttribute of variable ePackage.getFunctionNamePair_In2out()
    4Expression ePackage.getComplexTypeConverter_Out2in() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    5Expression ePackage.getFunctionNamePair_Out2in() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6Type org.eclipse.emf.ecore.EReference of variable ePackage.getComplexTypeConverter_Out2in() does not match with type org.eclipse.emf.ecore.EAttribute of variable ePackage.getFunctionNamePair_Out2in()