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 |
| |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
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 | 380 |
Number of mapped statements | 28 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 3 |
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)); |
| 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)); |
| 50 | Component strut = Box.createRigidArea(new Dimension(30, 5)); | ||||||||||
|
| 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)); |
| 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); |
Row | Violation |
---|---|
1 | 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 |
2 | Clone fragment #1 returns variables gridBagLayout, c, eastPanel, glue , while Clone fragment #2 returns variables gridBagLayout, c, strut, glue, eastPanel |