Component glue = Box.createVerticalGlue(); c.anchor = GridBagConstraints.EAST; c.gridwidth = GridBagConstraints.REMAINDER; // c.fill = GridBagConstraints.HORIZONTAL; gridBagLayout.setConstraints(glue, c); gridBagLayout = new GridBagLayout(); c = new GridBagConstraints(); JPanel eastPanel = new JPanel(gridBagLayout); mainPanel.add(eastPanel, BorderLayout.EAST); c.fill = GridBagConstraints.HORIZONTAL; c.weightx = 1.0; c.gridwidth = GridBagConstraints.REMAINDER; gridBagLayout.setConstraints(addButton, c); eastPanel.add(addButton); Component strut1 = Box.createRigidArea(new Dimension(30, 6)); gridBagLayout.setConstraints(strut1, c); eastPanel.add(strut1); gridBagLayout.setConstraints(editButton, c); eastPanel.add(editButton);
Component glue = Box.createVerticalGlue(); c.anchor = GridBagConstraints.EAST; c.gridwidth = GridBagConstraints.REMAINDER; // c.fill = GridBagConstraints.HORIZONTAL; gridBagLayout.setConstraints(glue, c); gridBagLayout = new GridBagLayout(); c = new GridBagConstraints(); JPanel eastPanel = new JPanel(gridBagLayout); mainPanel.add(eastPanel, BorderLayout.EAST); c.fill = GridBagConstraints.HORIZONTAL; c.weightx = 1.0; c.gridwidth = GridBagConstraints.REMAINDER; gridBagLayout.setConstraints(subscribeButton, c); eastPanel.add(subscribeButton); Component strut1 = Box.createRigidArea(new Dimension(30, 6)); gridBagLayout.setConstraints(strut1, c); eastPanel.add(strut1); gridBagLayout.setConstraints(unsubscribeButton, c); eastPanel.add(unsubscribeButton);
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/config/filter/ConfigFrame.java File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/config/subscribe/SubscribeDialog.java
Method name: void initComponents() Method name: void initComponents()
Number of AST nodes: 18 Number of AST nodes: 18
1
Component glue = Box.createVerticalGlue();
1
Component glue = Box.createVerticalGlue();
2
		c.anchor = GridBagConstraints.EAST;
2
		c.anchor = GridBagConstraints.EAST;
3
		c.gridwidth = GridBagConstraints.REMAINDER;
3
		c.gridwidth = GridBagConstraints.REMAINDER;
4
		// c.fill = GridBagConstraints.HORIZONTAL;
4
		// c.fill = GridBagConstraints.HORIZONTAL;
5
		gridBagLayout.setConstraints(glue, c);
5
		gridBagLayout.setConstraints(glue, c);
6
		gridBagLayout = new GridBagLayout();
6
		gridBagLayout = new GridBagLayout();
7
		c = new GridBagConstraints();
7
		c = new GridBagConstraints();
8
		JPanel eastPanel = new JPanel(gridBagLayout);
8
		JPanel eastPanel = new JPanel(gridBagLayout);
9
		mainPanel.add(eastPanel, BorderLayout.EAST);
9
		mainPanel.add(eastPanel, BorderLayout.EAST);
10
		c.fill = GridBagConstraints.HORIZONTAL;
10
		c.fill = GridBagConstraints.HORIZONTAL;
11
		c.weightx = 1.0;
11
		c.weightx = 1.0;
12
		c.gridwidth = GridBagConstraints.REMAINDER;
12
		c.gridwidth = GridBagConstraints.REMAINDER;
13
		gridBagLayout.setConstraints(addButton, c);
13
		gridBagLayout.setConstraints(subscribeButton, c);
14
		eastPanel.add(addButton);
14
		eastPanel.add(subscribeButton);
15
		Component strut1 = Box.createRigidArea(new Dimension(30, 6));
15
		Component strut1 = Box.createRigidArea(new Dimension(30, 6));
16
		gridBagLayout.setConstraints(strut1, c);
16
		gridBagLayout.setConstraints(strut1, c);
17
		eastPanel.add(strut1);
17
		eastPanel.add(strut1);
18
		gridBagLayout.setConstraints(editButton, c);
18
		gridBagLayout.setConstraints(unsubscribeButton, c);
19
		eastPanel.add(editButton);
19
		eastPanel.add(unsubscribeButton);
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 different classes having the same super class
Number of node comparisons164
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements18
    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
    47
    Component glue = Box.createVerticalGlue();
    23
    Component glue = Box.createVerticalGlue();
    48
    c.anchor = GridBagConstraints.EAST;
    24
    c.anchor = GridBagConstraints.EAST;
    49
    c.gridwidth = GridBagConstraints.REMAINDER;
    25
    c.gridwidth = GridBagConstraints.REMAINDER;
    50
    gridBagLayout.setConstraints(glue, c);
    26
    gridBagLayout.setConstraints(glue, c);
    51
    gridBagLayout = new GridBagLayout();
    27
    gridBagLayout = new GridBagLayout();
    52
    c = new GridBagConstraints();
    28
    c = new GridBagConstraints();
    53
    JPanel eastPanel = new JPanel(gridBagLayout);
    29
    JPanel eastPanel = new JPanel(gridBagLayout);
    54
    mainPanel.add(eastPanel, BorderLayout.EAST);
    30
    mainPanel.add(eastPanel, BorderLayout.EAST);
    55
    c.fill = GridBagConstraints.HORIZONTAL;
    31
    c.fill = GridBagConstraints.HORIZONTAL;
    56
    c.weightx = 1.0;
    32
    c.weightx = 1.0;
    57
    c.gridwidth = GridBagConstraints.REMAINDER;
    33
    c.gridwidth = GridBagConstraints.REMAINDER;
    58
    gridBagLayout.setConstraints(addButton, c);
    58
    gridBagLayout.setConstraints(addButton, c);
    34
    gridBagLayout.setConstraints(subscribeButton, c);
    Differences
    Expression1Expression2Difference
    addButtonsubscribeButtonVARIABLE_NAME_MISMATCH
    34
    gridBagLayout.setConstraints(subscribeButton, c);
    59
    eastPanel.add(addButton);
    59
    eastPanel.add(addButton);
    35
    eastPanel.add(subscribeButton);
    Differences
    Expression1Expression2Difference
    addButtonsubscribeButtonVARIABLE_NAME_MISMATCH
    35
    eastPanel.add(subscribeButton);
    60
    Component strut1 = Box.createRigidArea(new Dimension(30, 6));
    36
    Component strut1 = Box.createRigidArea(new Dimension(30, 6));
    61
    gridBagLayout.setConstraints(strut1, c);
    37
    gridBagLayout.setConstraints(strut1, c);
    62
    eastPanel.add(strut1);
    38
    eastPanel.add(strut1);
    63
    gridBagLayout.setConstraints(editButton, c);
    63
    gridBagLayout.setConstraints(editButton, c);
    39
    gridBagLayout.setConstraints(unsubscribeButton, c);
    Differences
    Expression1Expression2Difference
    editButtonunsubscribeButtonVARIABLE_NAME_MISMATCH
    39
    gridBagLayout.setConstraints(unsubscribeButton, c);
    64
    eastPanel.add(editButton);
    64
    eastPanel.add(editButton);
    40
    eastPanel.add(unsubscribeButton);
    Differences
    Expression1Expression2Difference
    editButtonunsubscribeButtonVARIABLE_NAME_MISMATCH
    40
    eastPanel.add(unsubscribeButton);
    Precondition Violations (1)
    Row Violation
    1Clone fragment #1 returns variables gridBagLayout, c, eastPanel, glue , while Clone fragment #2 returns variables gridBagLayout, c, eastPanel, glue