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 (itemPropertyDescriptors == null) { super.getPropertyDescriptors(object); addAbstractPropertyDescriptor(object); addInterfacePropertyDescriptor(object); addESuperTypesPropertyDescriptor(object); } return itemPropertyDescriptors;
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/ecore/provider/EClassItemProvider.java
Method name: List getPropertyDescriptors(Object) Method name: List getPropertyDescriptors(Object)
Number of AST nodes: 11 Number of AST nodes: 6
1
if (itemPropertyDescriptors == null)
1
if (itemPropertyDescriptors == null)
2
    {
2
    {
3
      super.getPropertyDescriptors(object);
3
      super.getPropertyDescriptors(object);
4
      addChangeablePropertyDescriptor(object);
4
      add
5
      addVolatilePropertyDescriptor(object);
6
      addTransientPropertyDescriptor(object);
7
      addDefaultValueLiteralPropertyDescriptor(object);
8
      addDefaultValu
5
AbstractPropertyDescriptor(object);
9
ePropertyDescriptor(object);
6
      addInterfacePropertyDescriptor(object);
10
      addUnsettablePropertyDescriptor(object);
7
      add
11
      addDerivedPropertyDescriptor(object);
12
      addEContainingClassPropertyDescriptor(object);
8
ESuperTypesPropertyDescriptor(object);
13
    }
9
    }
14
    return itemPropertyDescriptors;
10
    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 comparisons51
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements6
    Number of unmapped statements in the first code fragment5
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)23.8
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    1
    if (itemPropertyDescriptors == null)
    1
    if (itemPropertyDescriptors == null)
    2
    super.getPropertyDescriptors(object);
    2
    super.getPropertyDescriptors(object);
    3
    addChangeablePropertyDescriptor(object);
    3
    addChangeablePropertyDescriptor(object);
    3
    addAbstractPropertyDescriptor(object);
    Differences
    Expression1Expression2Difference
    addChangeablePropertyDescriptoraddAbstractPropertyDescriptorMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression addChangeablePropertyDescriptor(object) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression addAbstractPropertyDescriptor(object) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression addChangeablePropertyDescriptor(object) is a void method call, and thus it cannot be parameterized
    Expression addAbstractPropertyDescriptor(object) is a void method call, and thus it cannot be parameterized
    3
    addAbstractPropertyDescriptor(object);
    4
    addVolatilePropertyDescriptor(object);
    4
    addVolatilePropertyDescriptor(object);
    4
    addInterfacePropertyDescriptor(object);
    Differences
    Expression1Expression2Difference
    addVolatilePropertyDescriptoraddInterfacePropertyDescriptorMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression addVolatilePropertyDescriptor(object) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression addInterfacePropertyDescriptor(object) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression addVolatilePropertyDescriptor(object) is a void method call, and thus it cannot be parameterized
    Expression addInterfacePropertyDescriptor(object) is a void method call, and thus it cannot be parameterized
    4
    addInterfacePropertyDescriptor(object);
    5
    addTransientPropertyDescriptor(object);
    5
    addTransientPropertyDescriptor(object);
    5
    addESuperTypesPropertyDescriptor(object);
    Differences
    Expression1Expression2Difference
    addTransientPropertyDescriptoraddESuperTypesPropertyDescriptorMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression addTransientPropertyDescriptor(object) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression addESuperTypesPropertyDescriptor(object) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression addTransientPropertyDescriptor(object) is a void method call, and thus it cannot be parameterized
    Expression addESuperTypesPropertyDescriptor(object) is a void method call, and thus it cannot be parameterized
    5
    addESuperTypesPropertyDescriptor(object);
    6
    addDefaultValueLiteralPropertyDescriptor(object);
    6
    addDefaultValueLiteralPropertyDescriptor(object);
    Preondition Violations
    Unmatched statement addDefaultValueLiteralPropertyDescriptor(object); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
                                                                                                            
    7
    addDefaultValuePropertyDescriptor(object);
    7
    addDefaultValuePropertyDescriptor(object);
    Preondition Violations
    Unmatched statement addDefaultValuePropertyDescriptor(object); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
                                                                                              
    8
    addUnsettablePropertyDescriptor(object);
    8
    addUnsettablePropertyDescriptor(object);
    Preondition Violations
    Unmatched statement addUnsettablePropertyDescriptor(object); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
                                                                                          
    9
    addDerivedPropertyDescriptor(object);
    9
    addDerivedPropertyDescriptor(object);
    Preondition Violations
    Unmatched statement addDerivedPropertyDescriptor(object); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
                                                                                    
    10
    addEContainingClassPropertyDescriptor(object);
    10
    addEContainingClassPropertyDescriptor(object);
    Preondition Violations
    Unmatched statement addEContainingClassPropertyDescriptor(object); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
                                                                                                        
    11
    return itemPropertyDescriptors;
    6
    return itemPropertyDescriptors;
    Precondition Violations (17)
    Row Violation
    1Expression addChangeablePropertyDescriptor(object) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression addAbstractPropertyDescriptor(object) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression addChangeablePropertyDescriptor(object) is a void method call, and thus it cannot be parameterized
    4Expression addAbstractPropertyDescriptor(object) is a void method call, and thus it cannot be parameterized
    5Expression addVolatilePropertyDescriptor(object) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6Expression addInterfacePropertyDescriptor(object) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    7Expression addVolatilePropertyDescriptor(object) is a void method call, and thus it cannot be parameterized
    8Expression addInterfacePropertyDescriptor(object) is a void method call, and thus it cannot be parameterized
    9Expression addTransientPropertyDescriptor(object) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    10Expression addESuperTypesPropertyDescriptor(object) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    11Expression addTransientPropertyDescriptor(object) is a void method call, and thus it cannot be parameterized
    12Expression addESuperTypesPropertyDescriptor(object) is a void method call, and thus it cannot be parameterized
    13Unmatched statement addDefaultValueLiteralPropertyDescriptor(object); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    14Unmatched statement addDefaultValuePropertyDescriptor(object); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    15Unmatched statement addUnsettablePropertyDescriptor(object); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    16Unmatched statement addDerivedPropertyDescriptor(object); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    17Unmatched statement addEContainingClassPropertyDescriptor(object); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted