1236-2-4

Label containerLabel = new Label(composite, SWT.LEFT); { containerLabel.setText(Ecore2XMLUIPlugin.INSTANCE.getString("_UI_ModelObject")); //$NON-NLS-1$ 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 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);

Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/mapping/ecore2xml/presentation/Ecore2XMLModelWizard.java |  | File path: /emf-2.4.1/src/org/eclipse/emf/ecore/presentation/EcoreModelWizard.java
Method name: `void createControl(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 containerLabel = new Label(composite, SWT.LEFT);↵

2

          {↵

2

          {↵

3

            containerLabel.setText(Ecore2XMLUIPlugin.INSTANCE.getString("_UI_ModelObject")); //$NON-NLS-1$↵

3

            containerLabel.setText(EcoreEditorPlugin.INSTANCE.getString("_UI_ModelObject"));↵

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

            containerLabel.setLayoutData(data);↵

7

          }↵

7

          }↵

8

          initialObjectField = new Combo(composite, SWT.BORDER);↵

8

          initialObjectField = 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

            initialObjectField.setLayoutData(data);

See real code fragment |  | See real code fragment

Summary
Number of common nesting structure subtrees | 1
Number of refactorable cases | 1
Number of non-refactorable cases | 0
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.0
Clones location | Clones are in different classes having the same super class
Number of node comparisons | 41

1. {Refactorable}

   Mapping Summary
   Number of mapped statements | 10
   Number of unmapped statements in the first code fragment | 0
   Number of unmapped statements in the second code fragment | 0
   Time elapsed for statement mapping (ms) | 0.0
   Clone type | Type 2

   Mapped Statements
   ID | Statement |  | ID | Statement
   --- | --- | --- | --- | ---

   11

       Label containerLabel = new Label(composite, SWT.LEFT);

   11

       Label containerLabel = new Label(composite, SWT.LEFT);

   12

       containerLabel.setText(Ecore2XMLUIPlugin.INSTANCE.getString("_UI_ModelObject"));

   12 | containerLabel.setText(Ecore2XMLUIPlugin.INSTANCE.getString("_UI_ModelObject"));
   12 | containerLabel.setText(EcoreEditorPlugin.INSTANCE.getString("_UI_ModelObject"));

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   org.eclipse.emf.mapping.ecore2xml.ui.Ecore2XMLUIPlugin | org.eclipse.emf.ecore.presentation.EcoreEditorPlugin | SUBCLASS_TYPE_MISMATCH

   12

       containerLabel.setText(EcoreEditorPlugin.INSTANCE.getString("_UI_ModelObject"));

   13

       GridData data = new GridData();

   13

       GridData data = new GridData();

   14

       data.horizontalAlignment = GridData.FILL;

   14

       data.horizontalAlignment = GridData.FILL;

   15

       containerLabel.setLayoutData(data);

   15

       containerLabel.setLayoutData(data);

   16

       initialObjectField = new Combo(composite, SWT.BORDER);

   16

       initialObjectField = new Combo(composite, SWT.BORDER);

   17

       GridData data = new GridData();

   17

       GridData data = new GridData();

   18

       data.horizontalAlignment = GridData.FILL;

   18

       data.horizontalAlignment = GridData.FILL;

   19

       data.grabExcessHorizontalSpace = true;

   19

       data.grabExcessHorizontalSpace = true;

   20

       initialObjectField.setLayoutData(data);

   20

       initialObjectField.setLayoutData(data);

   Precondition Violations (0)
   Row | Violation
   --- | ---