Composite choiceComposite = new Composite(contents, SWT.NONE); { GridData data = new GridData(SWT.FILL, SWT.FILL, true, true); data.horizontalAlignment = SWT.END; choiceComposite.setLayoutData(data); GridLayout layout = new GridLayout(); data.horizontalAlignment = SWT.FILL; layout.marginHeight = 0; layout.marginWidth = 0; layout.numColumns = 1; choiceComposite.setLayout(layout); } Label choiceLabel = new Label(choiceComposite, SWT.NONE);
Composite featureComposite = new Composite(contents, SWT.NONE); { GridData data = new GridData(SWT.FILL, SWT.FILL, true, true); data.horizontalAlignment = SWT.END; featureComposite.setLayoutData(data); GridLayout layout = new GridLayout(); data.horizontalAlignment = SWT.FILL; layout.marginHeight = 0; layout.marginWidth = 0; layout.numColumns = 1; featureComposite.setLayout(layout); } Label featureLabel = new Label(featureComposite,SWT.NONE);
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/edit/ui/celleditor/FeatureEditorDialog.java File path: /emf-2.4.1/src/org/eclipse/emf/edit/ui/celleditor/FeatureEditorDialog.java
Method name: Control createDialogArea(Composite) Method name: Control createDialogArea(Composite)
Number of AST nodes: 11 Number of AST nodes: 11
1
Composite choiceComposite = new Composite(contents, SWT.NONE);
1
Composite featureComposite = new Composite(contents, SWT.NONE);
2
    {
2
    {
3
      GridData data = new GridData(SWT.FILL, SWT.FILL, true, true);
3
      GridData data = new GridData(SWT.FILL, SWT.FILL, true, true);
4
      data.horizontalAlignment = SWT.END;
4
      data.horizontalAlignment = SWT.END;
5
      choiceComposite.setLayoutData(data);
5
      featureComposite.setLayoutData(data);
6
      GridLayout layout = new GridLayout();
6
      GridLayout layout = new GridLayout();
7
      data.horizontalAlignment = SWT.FILL;
7
      data.horizontalAlignment = SWT.FILL;
8
      layout.marginHeight = 0;
8
      layout.marginHeight = 0;
9
      layout.marginWidth = 0;
9
      layout.marginWidth = 0;
10
      layout.numColumns = 1;
10
      layout.numColumns = 1;
11
      choiceComposite.setLayout(layout);
11
      featureComposite.setLayout(layout);
12
    }
12
    }
13
    Label choiceLabel = new Label(choiceComposite, SWT.NONE);
13
    Label featureLabel = new Label(featureComposite,SWT.NONE);
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.0
Clones locationClones are in the same method
Number of node comparisons58
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements11
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    7
    Composite choiceComposite = new Composite(contents, SWT.NONE);
    7
    Composite choiceComposite = new Composite(contents, SWT.NONE);
    86
    Composite featureComposite = new Composite(contents, SWT.NONE);
    Differences
    Expression1Expression2Difference
    choiceCompositefeatureCompositeVARIABLE_NAME_MISMATCH
    86
    Composite featureComposite = new Composite(contents, SWT.NONE);
    8
    GridData data = new GridData(SWT.FILL, SWT.FILL, true, true);
    87
    GridData data = new GridData(SWT.FILL, SWT.FILL, true, true);
    9
    data.horizontalAlignment = SWT.END;
    88
    data.horizontalAlignment = SWT.END;
    10
    choiceComposite.setLayoutData(data);
    10
    choiceComposite.setLayoutData(data);
    89
    featureComposite.setLayoutData(data);
    Differences
    Expression1Expression2Difference
    choiceCompositefeatureCompositeVARIABLE_NAME_MISMATCH
    89
    featureComposite.setLayoutData(data);
    11
    GridLayout layout = new GridLayout();
    90
    GridLayout layout = new GridLayout();
    12
    data.horizontalAlignment = SWT.FILL;
    91
    data.horizontalAlignment = SWT.FILL;
    13
    layout.marginHeight = 0;
    92
    layout.marginHeight = 0;
    14
    layout.marginWidth = 0;
    93
    layout.marginWidth = 0;
    15
    layout.numColumns = 1;
    94
    layout.numColumns = 1;
    16
    choiceComposite.setLayout(layout);
    16
    choiceComposite.setLayout(layout);
    95
    featureComposite.setLayout(layout);
    Differences
    Expression1Expression2Difference
    choiceCompositefeatureCompositeVARIABLE_NAME_MISMATCH
    95
    featureComposite.setLayout(layout);
    17
    Label choiceLabel = new Label(choiceComposite, SWT.NONE);
    17
    Label choiceLabel = new Label(choiceComposite, SWT.NONE);
    96
    Label featureLabel = new Label(featureComposite, SWT.NONE);
    Differences
    Expression1Expression2Difference
    choiceLabelfeatureLabelVARIABLE_NAME_MISMATCH
    choiceCompositefeatureCompositeVARIABLE_NAME_MISMATCH
    96
    Label featureLabel = new Label(featureComposite, SWT.NONE);
    Precondition Violations (1)
    Row Violation
    1Clone fragment #1 returns variables choiceLabel, choiceComposite , while Clone fragment #2 returns variables featureLabel, featureComposite