Label containerLabel = new Label(composite, SWT.LEFT); { containerLabel.setText(EcoreEditorPlugin.INSTANCE.getString("_UI_ModelObject")); GridData data = new GridData(); data.horizontalAlignment = GridData.FILL; containerLabel.setLayoutData(data); } initialObjectField = new Combo(composite, SWT.BORDER); { GridData data = new GridData(); data.horizontalAlignment = GridData.FILL; data.grabExcessHorizontalSpace = true; initialObjectField.setLayoutData(data);
Label encodingLabel = new Label(composite, SWT.LEFT); { encodingLabel.setText(EcoreEditorPlugin.INSTANCE.getString("_UI_XMLEncoding")); GridData data = new GridData(); data.horizontalAlignment = GridData.FILL; encodingLabel.setLayoutData(data); } encodingField = new Combo(composite, SWT.BORDER); { GridData data = new GridData(); data.horizontalAlignment = GridData.FILL; data.grabExcessHorizontalSpace = true; encodingField.setLayoutData(data);
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/presentation/EcoreModelWizard.java File path: /emf-2.4.1/src/org/eclipse/emf/ecore/presentation/EcoreModelWizard.java
Method name: void createControlGen(Composite) Method name: void createControlGen(Composite)
Number of AST nodes: 10 Number of AST nodes: 10
1
Label containerLabel = new Label(composite, SWT.LEFT);
1
Label encodingLabel = new Label(composite, SWT.LEFT);
2
      {
2
      {
3
        containerLabel.setText(EcoreEditorPlugin.INSTANCE.getString("_UI_ModelObject"));
3
        encodingLabel.setText(EcoreEditorPlugin.INSTANCE.getString("_UI_XMLEncoding"));
4
        GridData data = new GridData();
4
        GridData data = new GridData();
5
        data.horizontalAlignment = GridData.FILL;
5
        data.horizontalAlignment = GridData.FILL;
6
        containerLabel.setLayoutData(data);
6
        encodingLabel.setLayoutData(data);
7
      }
7
      }
8
      initialObjectField = new Combo(composite, SWT.BORDER);
8
      encodingField = new Combo(composite, SWT.BORDER);
9
      {
9
      {
10
        GridData data = new GridData();
10
        GridData data = new GridData();
11
        data.horizontalAlignment = GridData.FILL;
11
        data.horizontalAlignment = GridData.FILL;
12
        data.grabExcessHorizontalSpace = true;
12
        data.grabExcessHorizontalSpace = true;
13
        initialObjectField.setLayoutData(data);
13
        encodingField.setLayoutData(data);
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 comparisons41
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements10
    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
    11
    Label containerLabel = new Label(composite, SWT.LEFT);
    11
    Label containerLabel = new Label(composite, SWT.LEFT);
    26
    Label encodingLabel = new Label(composite, SWT.LEFT);
    Differences
    Expression1Expression2Difference
    containerLabelencodingLabelVARIABLE_NAME_MISMATCH
    26
    Label encodingLabel = new Label(composite, SWT.LEFT);
    12
    containerLabel.setText(EcoreEditorPlugin.INSTANCE.getString("_UI_ModelObject"));
    12
    containerLabel.setText(EcoreEditorPlugin.INSTANCE.getString("_UI_ModelObject"));
    27
    encodingLabel.setText(EcoreEditorPlugin.INSTANCE.getString("_UI_XMLEncoding"));
    Differences
    Expression1Expression2Difference
    "_UI_ModelObject""_UI_XMLEncoding"LITERAL_VALUE_MISMATCH
    containerLabelencodingLabelVARIABLE_NAME_MISMATCH
    27
    encodingLabel.setText(EcoreEditorPlugin.INSTANCE.getString("_UI_XMLEncoding"));
    13
    GridData data = new GridData();
    28
    GridData data = new GridData();
    14
    data.horizontalAlignment = GridData.FILL;
    29
    data.horizontalAlignment = GridData.FILL;
    15
    containerLabel.setLayoutData(data);
    15
    containerLabel.setLayoutData(data);
    30
    encodingLabel.setLayoutData(data);
    Differences
    Expression1Expression2Difference
    containerLabelencodingLabelVARIABLE_NAME_MISMATCH
    30
    encodingLabel.setLayoutData(data);
    16
    initialObjectField = new Combo(composite, SWT.BORDER);
    16
    initialObjectField = new Combo(composite, SWT.BORDER);
    31
    encodingField = new Combo(composite, SWT.BORDER);
    Differences
    Expression1Expression2Difference
    initialObjectFieldencodingFieldVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression initialObjectField is a field being modified, and thus it cannot be parameterized
    Expression encodingField is a field being modified, and thus it cannot be parameterized
    31
    encodingField = new Combo(composite, SWT.BORDER);
    17
    GridData data = new GridData();
    32
    GridData data = new GridData();
    18
    data.horizontalAlignment = GridData.FILL;
    33
    data.horizontalAlignment = GridData.FILL;
    19
    data.grabExcessHorizontalSpace = true;
    34
    data.grabExcessHorizontalSpace = true;
    20
    initialObjectField.setLayoutData(data);
    20
    initialObjectField.setLayoutData(data);
    35
    encodingField.setLayoutData(data);
    Differences
    Expression1Expression2Difference
    initialObjectFieldencodingFieldVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression initialObjectField cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression encodingField cannot be parameterized, because it has dependencies to/from statements that will be extracted
    35
    encodingField.setLayoutData(data);
    Precondition Violations (4)
    Row Violation
    1Expression initialObjectField is a field being modified, and thus it cannot be parameterized
    2Expression encodingField is a field being modified, and thus it cannot be parameterized
    3Expression initialObjectField cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Expression encodingField cannot be parameterized, because it has dependencies to/from statements that will be extracted