if (itemPropertyDescriptors == null) { super.getPropertyDescriptors(object); addKeyPropertyDescriptor(object); addValuePropertyDescriptor(object); } return itemPropertyDescriptors;
if (projectDescriptors == null) { loadFromExtensionPoints(); } return projectDescriptors;
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/provider/EStringToStringMapEntryItemProvider.java File path: /emf-2.4.1/src/org/eclipse/emf/common/ui/wizard/ExampleInstallerWizard.java
Method name: List getPropertyDescriptors(Object) Method name: List getProjectDescriptors()
Number of AST nodes: 5 Number of AST nodes: 3
1
if (itemPropertyDescriptors == null)
1
if (projectDescriptors == null)
2
    {
2
    {
3
      super.getPropertyDescriptors(object);
3
      
4
      addKeyPropertyDescriptor(object);
5
      addValuePropertyDescriptor(object);
4
loadFromExtensionPoints();
6
    }
5
    }
7
    return itemPropertyDescriptors;
6
    return projectDescriptors;
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
Number of node comparisons9
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements2
    Number of unmapped statements in the first code fragment3
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)3.4
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    1
    if (itemPropertyDescriptors == null)
    1
    if (itemPropertyDescriptors == null)
    1
    if (projectDescriptors == null)
    Differences
    Expression1Expression2Difference
    itemPropertyDescriptorsprojectDescriptorsVARIABLE_NAME_MISMATCH
    java.util.Listjava.util.ListVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type java.util.List<org.eclipse.emf.edit.provider.IItemPropertyDescriptor> of variable itemPropertyDescriptors does not match with type java.util.List<org.eclipse.emf.common.ui.wizard.AbstractExampleInstallerWizard.ProjectDescriptor> of variable projectDescriptors
    • Make classes java.util.List and java.util.List extend a common superclass
    1
    if (projectDescriptors == null)
    2
    super.getPropertyDescriptors(object);
                                                                                    
    3
    addKeyPropertyDescriptor(object);
    3
    addKeyPropertyDescriptor(object);
    2
    loadFromExtensionPoints();
    Differences
    Expression1Expression2Difference
    addKeyPropertyDescriptorloadFromExtensionPointsMETHOD_INVOCATION_NAME_MISMATCH
    addKeyPropertyDescriptor(object)loadFromExtensionPoints()ARGUMENT_NUMBER_MISMATCH
    Preondition Violations
    Expression loadFromExtensionPoints() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression addKeyPropertyDescriptor(object) is a void method call, and thus it cannot be parameterized
    Expression loadFromExtensionPoints() is a void method call, and thus it cannot be parameterized
    Expression loadFromExtensionPoints() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression addKeyPropertyDescriptor(object) is a void method call, and thus it cannot be parameterized
    Expression loadFromExtensionPoints() is a void method call, and thus it cannot be parameterized
    2
    loadFromExtensionPoints();
    4
    addValuePropertyDescriptor(object);
                                                                                
                                                              
    3
    return projectDescriptors;
    5
    return itemPropertyDescriptors;
    5
    return itemPropertyDescriptors;
    Preondition Violations
    Unmatched return itemPropertyDescriptors;
                                                                        
    Precondition Violations (8)
    Row Violation
    1Type java.util.List<org.eclipse.emf.edit.provider.IItemPropertyDescriptor> of variable itemPropertyDescriptors does not match with type java.util.List<org.eclipse.emf.common.ui.wizard.AbstractExampleInstallerWizard.ProjectDescriptor> of variable projectDescriptors
    2Expression loadFromExtensionPoints() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression addKeyPropertyDescriptor(object) is a void method call, and thus it cannot be parameterized
    4Expression loadFromExtensionPoints() is a void method call, and thus it cannot be parameterized
    5Expression loadFromExtensionPoints() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6Expression addKeyPropertyDescriptor(object) is a void method call, and thus it cannot be parameterized
    7Expression loadFromExtensionPoints() is a void method call, and thus it cannot be parameterized
    8Unmatched return itemPropertyDescriptors;