if (canvas != null) { canvas.dispose(); canvas = null; super.dismiss(); // setEditor(null, null, -1); }
if (titleLabel != null) { titleLabel.setImage(image); titleLabel.setText(title); }
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/common/ui/ViewerPane.java
Method name: void dismiss() Method name: void setTitle(String, Image)
Number of AST nodes: 4 Number of AST nodes: 3
1
if (canvas != null)
1
if (titleLabel != null)
2
    {
2
    {
3
      canvas.dispose();
3
      
4
      canvas = null;
5
      super.dismiss();
6
      // setEditor(null, null, -1
4
titleLabel.setImage(image);
7
);
5
      titleLabel.setText(title);
8
    }
6
    }
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 comparisons12
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements3
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.8
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    1
    if (canvas != null)
    1
    if (canvas != null)
    1
    if (titleLabel != null)
    Differences
    Expression1Expression2Difference
    canvastitleLabelVARIABLE_NAME_MISMATCH
    org.eclipse.swt.widgets.Compositeorg.eclipse.swt.custom.CLabelSUBCLASS_TYPE_MISMATCH
    1
    if (titleLabel != null)
    2
    canvas.dispose();
    2
    canvas.dispose();
    2
    titleLabel.setImage(image);
    Differences
    Expression1Expression2Difference
    disposesetImageMETHOD_INVOCATION_NAME_MISMATCH
    canvastitleLabelVARIABLE_NAME_MISMATCH
    org.eclipse.swt.widgets.Compositeorg.eclipse.swt.custom.CLabelSUBCLASS_TYPE_MISMATCH
    canvas.dispose()titleLabel.setImage(image)ARGUMENT_NUMBER_MISMATCH
    Preondition Violations
    Expression canvas.dispose() is a void method call, and thus it cannot be parameterized
    Expression titleLabel.setImage(image) is a void method call, and thus it cannot be parameterized
    Expression canvas.dispose() is a void method call, and thus it cannot be parameterized
    Expression titleLabel.setImage(image) is a void method call, and thus it cannot be parameterized
    2
    titleLabel.setImage(image);
    3
    canvas = null;
                                  
    4
    super.dismiss();
    4
    super.dismiss();
    3
    titleLabel.setText(title);
    Differences
    Expression1Expression2Difference
    super.dismiss()titleLabel.setText(title)TYPE_COMPATIBLE_REPLACEMENT
    Preondition Violations
    Expression super.dismiss() is a void method call, and thus it cannot be parameterized
    Expression titleLabel.setText(title) is a void method call, and thus it cannot be parameterized
    3
    titleLabel.setText(title);
    Precondition Violations (6)
    Row Violation
    1Expression canvas.dispose() is a void method call, and thus it cannot be parameterized
    2Expression titleLabel.setImage(image) is a void method call, and thus it cannot be parameterized
    3Expression canvas.dispose() is a void method call, and thus it cannot be parameterized
    4Expression titleLabel.setImage(image) is a void method call, and thus it cannot be parameterized
    5Expression super.dismiss() is a void method call, and thus it cannot be parameterized
    6Expression titleLabel.setText(title) is a void method call, and thus it cannot be parameterized