nameTextField.setEnabled(false); topPanel.add(nameTextField); 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 strut = Box.createRigidArea(new Dimension(30, 6)); gridBagLayout.setConstraints(strut, c); eastPanel.add(strut); gridBagLayout.setConstraints(removeButton, c); eastPanel.add(removeButton); strut = Box.createRigidArea(new Dimension(30, 12)); gridBagLayout.setConstraints(strut, c); eastPanel.add(strut);
nameTextField.setEnabled(false); topPanel.add(nameTextField); 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, 5)); gridBagLayout.setConstraints(strut1, c); eastPanel.add(strut1); gridBagLayout.setConstraints(editButton, c); eastPanel.add(editButton); Component strut = Box.createRigidArea(new Dimension(30, 5)); gridBagLayout.setConstraints(strut, c); eastPanel.add(strut); gridBagLayout.setConstraints(removeButton, c); eastPanel.add(removeButton); strut = Box.createRigidArea(new Dimension(30, 20)); gridBagLayout.setConstraints(strut, c); eastPanel.add(strut);
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/accountlist/AccountListDialog.java
Method name: void initComponents() Method name: void initComponents()
Number of AST nodes: 28 Number of AST nodes: 28
1
nameTextField.setEnabled(false);
1
nameTextField.setEnabled(false);
2
		topPanel.add(nameTextField);
2
		topPanel.add(nameTextField);
3
		Component glue = Box.createVerticalGlue();
3
		Component glue = Box.createVerticalGlue();
4
		c.anchor = GridBagConstraints.EAST;
4
		c.anchor = GridBagConstraints.EAST;
5
		c.gridwidth = GridBagConstraints.REMAINDER;
5
		c.gridwidth = GridBagConstraints.REMAINDER;
6
		// c.fill = GridBagConstraints.HORIZONTAL;
6
		// c.fill = GridBagConstraints.HORIZONTAL;
7
		gridBagLayout.setConstraints(glue, c);
7
		gridBagLayout.setConstraints(glue, c);
8
		gridBagLayout = new GridBagLayout();
8
		gridBagLayout = new GridBagLayout();
9
		c = new GridBagConstraints();
9
		c = new GridBagConstraints();
10
		JPanel eastPanel = new JPanel(gridBagLayout);
10
		JPanel eastPanel = new JPanel(gridBagLayout);
11
		mainPanel.add(eastPanel, BorderLayout.EAST);
11
		mainPanel.add(eastPanel, BorderLayout.EAST);
12
		c.fill = GridBagConstraints.HORIZONTAL;
12
		c.fill = GridBagConstraints.HORIZONTAL;
13
		c.weightx = 1.0;
13
		c.weightx = 1.0;
14
		c.gridwidth = GridBagConstraints.REMAINDER;
14
		c.gridwidth = GridBagConstraints.REMAINDER;
15
		gridBagLayout.setConstraints(addButton, c);
15
		gridBagLayout.setConstraints(addButton, c);
16
		eastPanel.add(addButton);
16
		eastPanel.add(addButton);
17
		Component strut1 = Box.createRigidArea(new Dimension(30, 6));
17
		Component strut1 = Box.createRigidArea(new Dimension(30, 5));
18
		gridBagLayout.setConstraints(strut1, c);
18
		gridBagLayout.setConstraints(strut1, c);
19
		eastPanel.add(strut1);
19
		eastPanel.add(strut1);
20
		gridBagLayout.setConstraints(editButton, c);
20
		gridBagLayout.setConstraints(editButton, c);
21
		eastPanel.add(editButton);
21
		eastPanel.add(editButton);
22
		Component strut = Box.createRigidArea(new Dimension(30, 6));
22
		Component strut = Box.createRigidArea(new Dimension(30, 5));
23
		gridBagLayout.setConstraints(strut, c);
23
		gridBagLayout.setConstraints(strut, c);
24
		eastPanel.add(strut);
24
		eastPanel.add(strut);
25
		gridBagLayout.setConstraints(removeButton, c);
25
		gridBagLayout.setConstraints(removeButton, c);
26
		eastPanel.add(removeButton);
26
		eastPanel.add(removeButton);
27
		strut = Box.createRigidArea(new Dimension(30, 12));
27
		strut = Box.createRigidArea(new Dimension(30, 20));
28
		gridBagLayout.setConstraints(strut, c);
28
		gridBagLayout.setConstraints(strut, c);
29
		eastPanel.add(strut);
29
		eastPanel.add(strut);
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 comparisons380
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements28
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment2
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    45
    nameTextField.setEnabled(false);
    30
    nameTextField.setEnabled(false);
    46
    topPanel.add(nameTextField);
    31
    topPanel.add(nameTextField);
    47
    Component glue = Box.createVerticalGlue();
    32
    Component glue = Box.createVerticalGlue();
    48
    c.anchor = GridBagConstraints.EAST;
    33
    c.anchor = GridBagConstraints.EAST;
                                                                                              
    34
    c.gridwidth = GridBagConstraints.REMAINDER;
    49
    c.gridwidth = GridBagConstraints.REMAINDER;
    42
    c.gridwidth = GridBagConstraints.REMAINDER;
    50
    gridBagLayout.setConstraints(glue, c);
    35
    gridBagLayout.setConstraints(glue, c);
    51
    gridBagLayout = new GridBagLayout();
    36
    gridBagLayout = new GridBagLayout();
    52
    c = new GridBagConstraints();
    37
    c = new GridBagConstraints();
    53
    JPanel eastPanel = new JPanel(gridBagLayout);
    38
    JPanel eastPanel = new JPanel(gridBagLayout);
    54
    mainPanel.add(eastPanel, BorderLayout.EAST);
    39
    mainPanel.add(eastPanel, BorderLayout.EAST);
    55
    c.fill = GridBagConstraints.HORIZONTAL;
    40
    c.fill = GridBagConstraints.HORIZONTAL;
    56
    c.weightx = 1.0;
    41
    c.weightx = 1.0;
    57
    c.gridwidth = GridBagConstraints.REMAINDER;
    42
    c.gridwidth = GridBagConstraints.REMAINDER;
    58
    gridBagLayout.setConstraints(addButton, c);
    43
    gridBagLayout.setConstraints(addButton, c);
    59
    eastPanel.add(addButton);
    44
    eastPanel.add(addButton);
    60
    Component strut1 = Box.createRigidArea(new Dimension(30, 6));
    60
    Component strut1 = Box.createRigidArea(new Dimension(30, 6));
    45
    Component strut1 = Box.createRigidArea(new Dimension(30, 5));
    Differences
    Expression1Expression2Difference
    65LITERAL_VALUE_MISMATCH
    45
    Component strut1 = Box.createRigidArea(new Dimension(30, 5));
    61
    gridBagLayout.setConstraints(strut1, c);
    46
    gridBagLayout.setConstraints(strut1, c);
    62
    eastPanel.add(strut1);
    47
    eastPanel.add(strut1);
    63
    gridBagLayout.setConstraints(editButton, c);
    48
    gridBagLayout.setConstraints(editButton, c);
    64
    eastPanel.add(editButton);
    49
    eastPanel.add(editButton);
    65
    Component strut = Box.createRigidArea(new Dimension(30, 6));
    65
    Component strut = Box.createRigidArea(new Dimension(30, 6));
    50
    Component strut = Box.createRigidArea(new Dimension(30, 5));
    Differences
    Expression1Expression2Difference
    65LITERAL_VALUE_MISMATCH
    50
    Component strut = Box.createRigidArea(new Dimension(30, 5));
                                                                                        
    51
    gridBagLayout.setConstraints(strut, c);
    Preondition Violations
    Unmatched statement gridBagLayout.setConstraints(strut,c); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    51
    gridBagLayout.setConstraints(strut, c);
    66
    gridBagLayout.setConstraints(strut, c);
    56
    gridBagLayout.setConstraints(strut, c);
    67
    eastPanel.add(strut);
    52
    eastPanel.add(strut);
    68
    gridBagLayout.setConstraints(removeButton, c);
    53
    gridBagLayout.setConstraints(removeButton, c);
    69
    eastPanel.add(removeButton);
    54
    eastPanel.add(removeButton);
    70
    strut = Box.createRigidArea(new Dimension(30, 12));
    70
    strut = Box.createRigidArea(new Dimension(30, 12));
    55
    strut = Box.createRigidArea(new Dimension(30, 20));
    Differences
    Expression1Expression2Difference
    1220LITERAL_VALUE_MISMATCH
    55
    strut = Box.createRigidArea(new Dimension(30, 20));
    71
    gridBagLayout.setConstraints(strut, c);
    56
    gridBagLayout.setConstraints(strut, c);
    72
    eastPanel.add(strut);
    57
    eastPanel.add(strut);
    Precondition Violations (2)
    Row Violation
    1Unmatched statement gridBagLayout.setConstraints(strut,c); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    2Clone fragment #1 returns variables gridBagLayout, c, eastPanel, glue , while Clone fragment #2 returns variables gridBagLayout, c, strut, glue, eastPanel