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);
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);
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/config/accountlist/AccountListDialog.java File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/config/filter/ConfigFrame.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, 5));
17
		Component strut1 = Box.createRigidArea(new Dimension(30, 6));
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, 5));
22
		Component strut = Box.createRigidArea(new Dimension(30, 6));
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, 20));
27
		strut = Box.createRigidArea(new Dimension(30, 12));
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 comparisons346
  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 fragment0
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    30
    nameTextField.setEnabled(false);
    45
    nameTextField.setEnabled(false);
    31
    topPanel.add(nameTextField);
    46
    topPanel.add(nameTextField);
    32
    Component glue = Box.createVerticalGlue();
    47
    Component glue = Box.createVerticalGlue();
    33
    c.anchor = GridBagConstraints.EAST;
    48
    c.anchor = GridBagConstraints.EAST;
    34
    c.gridwidth = GridBagConstraints.REMAINDER;
    49
    c.gridwidth = GridBagConstraints.REMAINDER;
    35
    gridBagLayout.setConstraints(glue, c);
    50
    gridBagLayout.setConstraints(glue, c);
    36
    gridBagLayout = new GridBagLayout();
    51
    gridBagLayout = new GridBagLayout();
    37
    c = new GridBagConstraints();
    52
    c = new GridBagConstraints();
    38
    JPanel eastPanel = new JPanel(gridBagLayout);
    53
    JPanel eastPanel = new JPanel(gridBagLayout);
    39
    mainPanel.add(eastPanel, BorderLayout.EAST);
    54
    mainPanel.add(eastPanel, BorderLayout.EAST);
    40
    c.fill = GridBagConstraints.HORIZONTAL;
    55
    c.fill = GridBagConstraints.HORIZONTAL;
    41
    c.weightx = 1.0;
    56
    c.weightx = 1.0;
    42
    c.gridwidth = GridBagConstraints.REMAINDER;
    57
    c.gridwidth = GridBagConstraints.REMAINDER;
    43
    gridBagLayout.setConstraints(addButton, c);
    58
    gridBagLayout.setConstraints(addButton, c);
    44
    eastPanel.add(addButton);
    59
    eastPanel.add(addButton);
    45
    Component strut1 = Box.createRigidArea(new Dimension(30, 5));
    45
    Component strut1 = Box.createRigidArea(new Dimension(30, 5));
    60
    Component strut1 = Box.createRigidArea(new Dimension(30, 6));
    Differences
    Expression1Expression2Difference
    56LITERAL_VALUE_MISMATCH
    60
    Component strut1 = Box.createRigidArea(new Dimension(30, 6));
    46
    gridBagLayout.setConstraints(strut1, c);
    61
    gridBagLayout.setConstraints(strut1, c);
    47
    eastPanel.add(strut1);
    62
    eastPanel.add(strut1);
    48
    gridBagLayout.setConstraints(editButton, c);
    63
    gridBagLayout.setConstraints(editButton, c);
    49
    eastPanel.add(editButton);
    64
    eastPanel.add(editButton);
    50
    Component strut = Box.createRigidArea(new Dimension(30, 5));
    50
    Component strut = Box.createRigidArea(new Dimension(30, 5));
    65
    Component strut = Box.createRigidArea(new Dimension(30, 6));
    Differences
    Expression1Expression2Difference
    56LITERAL_VALUE_MISMATCH
    65
    Component strut = Box.createRigidArea(new Dimension(30, 6));
    51
    gridBagLayout.setConstraints(strut, c);
    66
    gridBagLayout.setConstraints(strut, c);
    52
    eastPanel.add(strut);
    67
    eastPanel.add(strut);
    53
    gridBagLayout.setConstraints(removeButton, c);
    68
    gridBagLayout.setConstraints(removeButton, c);
    54
    eastPanel.add(removeButton);
    69
    eastPanel.add(removeButton);
    55
    strut = Box.createRigidArea(new Dimension(30, 20));
    55
    strut = Box.createRigidArea(new Dimension(30, 20));
    70
    strut = Box.createRigidArea(new Dimension(30, 12));
    Differences
    Expression1Expression2Difference
    2012LITERAL_VALUE_MISMATCH
    70
    strut = Box.createRigidArea(new Dimension(30, 12));
    56
    gridBagLayout.setConstraints(strut, c);
    71
    gridBagLayout.setConstraints(strut, c);
    57
    eastPanel.add(strut);
    72
    eastPanel.add(strut);
    Precondition Violations (1)
    Row Violation
    1Clone fragment #1 returns variables glue, c, gridBagLayout, eastPanel , while Clone fragment #2 returns variables gridBagLayout, c, eastPanel, strut, glue