if (leftGradient == null) { getGradients(); } return leftGradient;
if (enumerationLiterals == null) { setEnumerationFacet(basicGetEnumerationFacet(eDataType)); } return enumerationLiterals;
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/edit/ui/celleditor/AdapterFactoryTableTreeEditor.java File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/BasicExtendedMetaData.java
Method name: Image getLeftGradient() Method name: List getEnumerationFacet()
Number of AST nodes: 3 Number of AST nodes: 3
1
if (leftGradient == null)
1
if (enumerationLiterals == null)
2
    {
2
      {
3
      getGradients();
3
        setEnumerationFacet(basicGetEnumerationFacet(eDataType));
4
    }
4
    
5
  }
5
    return leftGradient;
6
      return enumerationLiterals;
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 comparisons5
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements2
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)3.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (leftGradient == null)
    1
    if (leftGradient == null)
    1
    if (enumerationLiterals == null)
    Differences
    Expression1Expression2Difference
    leftGradientenumerationLiteralsVARIABLE_NAME_MISMATCH
    org.eclipse.swt.graphics.Imagejava.util.ListVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.eclipse.swt.graphics.Image of variable leftGradient does not match with type java.util.List<java.lang.String> of variable enumerationLiterals
    • Make classes org.eclipse.swt.graphics.Image and java.util.List extend a common superclass
    1
    if (enumerationLiterals == null)
    2
    getGradients();
    2
    getGradients();
    2
    setEnumerationFacet(basicGetEnumerationFacet(eDataType));
    Differences
    Expression1Expression2Difference
    getGradientssetEnumerationFacetMETHOD_INVOCATION_NAME_MISMATCH
    getGradients()setEnumerationFacet(basicGetEnumerationFacet(eDataType))ARGUMENT_NUMBER_MISMATCH
    Preondition Violations
    Expression getGradients() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression setEnumerationFacet(basicGetEnumerationFacet(eDataType)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression getGradients() is a void method call, and thus it cannot be parameterized
    Expression setEnumerationFacet(basicGetEnumerationFacet(eDataType)) is a void method call, and thus it cannot be parameterized
    Expression getGradients() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression setEnumerationFacet(basicGetEnumerationFacet(eDataType)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression getGradients() is a void method call, and thus it cannot be parameterized
    Expression setEnumerationFacet(basicGetEnumerationFacet(eDataType)) is a void method call, and thus it cannot be parameterized
    2
    setEnumerationFacet(basicGetEnumerationFacet(eDataType));
                                                                
    3
    return enumerationLiterals;
    3
    return leftGradient;
                                                  
    Precondition Violations (9)
    Row Violation
    1Type org.eclipse.swt.graphics.Image of variable leftGradient does not match with type java.util.List<java.lang.String> of variable enumerationLiterals
    2Expression getGradients() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression setEnumerationFacet(basicGetEnumerationFacet(eDataType)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Expression getGradients() is a void method call, and thus it cannot be parameterized
    5Expression setEnumerationFacet(basicGetEnumerationFacet(eDataType)) is a void method call, and thus it cannot be parameterized
    6Expression getGradients() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    7Expression setEnumerationFacet(basicGetEnumerationFacet(eDataType)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    8Expression getGradients() is a void method call, and thus it cannot be parameterized
    9Expression setEnumerationFacet(basicGetEnumerationFacet(eDataType)) is a void method call, and thus it cannot be parameterized