if (leftGradient == null) { getGradients(); } return leftGradient;
if (wildcards == null) { setWildcards(basicGetWildcards(eStructuralFeature)); } return wildcards;
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 getWildcards()
Number of AST nodes: 3 Number of AST nodes: 3
1
if (leftGradient == null)
1
if (wildcards == null)
2
    {
2
      {
3
      getGradients();
3
        setWildcards(basicGetWildcards(eStructuralFeature));
4
    }
4
      }
5
    return leftGradient;
5
      return wildcards;
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)4.4
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (leftGradient == null)
    1
    if (leftGradient == null)
    1
    if (wildcards == null)
    Differences
    Expression1Expression2Difference
    leftGradientwildcardsVARIABLE_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 wildcards
    • Make classes org.eclipse.swt.graphics.Image and java.util.List extend a common superclass
    1
    if (wildcards == null)
    2
    getGradients();
    2
    getGradients();
    2
    setWildcards(basicGetWildcards(eStructuralFeature));
    Differences
    Expression1Expression2Difference
    getGradientssetWildcardsMETHOD_INVOCATION_NAME_MISMATCH
    getGradients()setWildcards(basicGetWildcards(eStructuralFeature))ARGUMENT_NUMBER_MISMATCH
    Preondition Violations
    Expression getGradients() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression setWildcards(basicGetWildcards(eStructuralFeature)) 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 setWildcards(basicGetWildcards(eStructuralFeature)) 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 setWildcards(basicGetWildcards(eStructuralFeature)) 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 setWildcards(basicGetWildcards(eStructuralFeature)) is a void method call, and thus it cannot be parameterized
    2
    setWildcards(basicGetWildcards(eStructuralFeature));
                                            
    3
    return wildcards;
    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 wildcards
    2Expression getGradients() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression setWildcards(basicGetWildcards(eStructuralFeature)) 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 setWildcards(basicGetWildcards(eStructuralFeature)) 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 setWildcards(basicGetWildcards(eStructuralFeature)) 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 setWildcards(basicGetWildcards(eStructuralFeature)) is a void method call, and thus it cannot be parameterized