1329-3-4

Composite composite = new Composite(parent, SWT.NONE); { GridLayout layout = new GridLayout(); layout.numColumns = 1; layout.verticalSpacing = 12; composite.setLayout(layout); GridData data = new GridData(); data.verticalAlignment = GridData.FILL; data.grabExcessVerticalSpace = true; data.horizontalAlignment = GridData.FILL; composite.setLayoutData(data);
Composite composite = new Composite(parent, SWT.NONE); { GridLayout layout = new GridLayout(); layout.numColumns = 1; layout.verticalSpacing = 12; composite.setLayout(layout); GridData data = new GridData(); data.verticalAlignment = GridData.FILL; data.grabExcessVerticalSpace = true; data.horizontalAlignment = GridData.FILL; composite.setLayoutData(data);

Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/converter/ui/ModelConverterDescriptorSelectionPage.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

    Composite composite = new Composite(parent, SWT.NONE);↵

1

    Composite composite = new Composite(parent, SWT.NONE);↵

2

        {↵

2

        ↵

3

      {↵

3

          GridLayout layout = new GridLayout();↵

4

            GridLayout layout = new GridLayout();↵

4

          layout.numColumns = 1;↵

5

            layout.numColumns = 1;↵

5

          layout.verticalSpacing = 12;↵

6

            layout.verticalSpacing = 12;↵

6

          composite.setLayout(layout);↵

7

            composite.setLayout(layout);↵

7

          GridData data = new GridData();↵

8

            GridData data = new GridData();↵

8

          data.verticalAlignment = GridData.FILL;↵

9

            data.verticalAlignment = GridData.FILL;↵

9

          data.grabExcessVerticalSpace = true;↵

10

            data.grabExcessVerticalSpace = true;↵

10

          data.horizontalAlignment = GridData.FILL;↵

11

            data.horizontalAlignment = GridData.FILL;↵

11

          composite.setLayoutData(data);

12

            composite.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 | 49

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 1

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

   1

       Composite composite = new Composite(parent, SWT.NONE);

   1

       Composite composite = new Composite(parent, SWT.NONE);

   2

       GridLayout layout = new GridLayout();

   2

       GridLayout layout = new GridLayout();

   3

       layout.numColumns = 1;

   3

       layout.numColumns = 1;

   4

       layout.verticalSpacing = 12;

   4

       layout.verticalSpacing = 12;

   5

       composite.setLayout(layout);

   5

       composite.setLayout(layout);

   6

       GridData data = new GridData();

   6

       GridData data = new GridData();

   7

       data.verticalAlignment = GridData.FILL;

   7

       data.verticalAlignment = GridData.FILL;

   8

       data.grabExcessVerticalSpace = true;

   8

       data.grabExcessVerticalSpace = true;

   9

       data.horizontalAlignment = GridData.FILL;

   9

       data.horizontalAlignment = GridData.FILL;

   10

       composite.setLayoutData(data);

   10

       composite.setLayoutData(data);

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