File path: /columba-1.4-src/core/src/main/java/org/columba/core/gui/profiles/ProfileChooserDialog.java | File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/config/subscribe/SubscribeDialog.java | |||
Method name: void layoutComponents()
|
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 | ↵ | |||
5 | ↵ | |||
6 | //c.fill = GridBagConstraints.HORIZONTAL;↵ | 4 | // c.fill = GridBagConstraints.HORIZONTAL;↵ | |
7 | gridBagLayout.setConstraints(glue, c);↵ | 5 | gridBagLayout.setConstraints(glue, c);↵ | |
8 | ↵ | |||
9 | ↵ | |||
10 | gridBagLayout = new GridBagLayout();↵ | 6 | gridBagLayout = new GridBagLayout();↵ | |
11 | c = new GridBagConstraints();↵ | 7 | c = new GridBagConstraints();↵ | |
12 | ↵ | |||
13 | ↵ | |||
14 | JPanel eastPanel = new JPanel(gridBagLayout);↵ | 8 | JPanel eastPanel = new JPanel(gridBagLayout);↵ | |
15 | mainPanel.add(eastPanel, BorderLayout.EAST);↵ | 9 | mainPanel.add(eastPanel, BorderLayout.EAST);↵ | |
16 | ↵ | |||
17 | ↵ | |||
18 | c.fill = GridBagConstraints.HORIZONTAL;↵ | 10 | c.fill = GridBagConstraints.HORIZONTAL;↵ | |
19 | c.weightx = 1.0;↵ | 11 | c.weightx = 1.0;↵ | |
20 | c.gridwidth = GridBagConstraints.REMAINDER;↵ | 12 | c.gridwidth = GridBagConstraints.REMAINDER;↵ | |
21 | gridBagLayout.setConstraints(addButton, c);↵ | 13 | gridBagLayout.setConstraints(subscribeButton, c);↵ | |
22 | eastPanel.add(addButton);↵ | 14 | eastPanel.add(↵ | |
23 | ↵ | |||
24 | ↵ | 15 | subscribeButton);↵ | |
25 | Component strut1 = Box.createRigidArea(new Dimension(30, 5));↵ | 16 | Component strut1 = Box.createRigidArea(new Dimension(30, 6));↵ | |
26 | gridBagLayout.setConstraints(strut1, c);↵ | 17 | gridBagLayout.setConstraints(strut1, c);↵ | |
27 | eastPanel.add(strut1);↵ | 18 | eastPanel.add(strut1);↵ | |
28 | ↵ | |||
29 | ↵ | |||
30 | gridBagLayout.setConstraints(editButton, c);↵ | 19 | gridBagLayout.setConstraints(unsubscribeButton, c);↵ | |
31 | eastPanel.add(editButton); | 20 | eastPanel.add(unsubscribeButton); | |
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 | 164 |
Number of mapped statements | 18 |
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 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
13 | Component glue = Box.createVerticalGlue(); | 23 | Component glue = Box.createVerticalGlue(); | |||||||||||
14 | c.anchor = GridBagConstraints.EAST; | 24 | c.anchor = GridBagConstraints.EAST; | |||||||||||
15 | c.gridwidth = GridBagConstraints.REMAINDER; | 25 | c.gridwidth = GridBagConstraints.REMAINDER; | |||||||||||
16 | gridBagLayout.setConstraints(glue, c); | 26 | gridBagLayout.setConstraints(glue, c); | |||||||||||
17 | gridBagLayout = new GridBagLayout(); | 27 | gridBagLayout = new GridBagLayout(); | |||||||||||
18 | c = new GridBagConstraints(); | 28 | c = new GridBagConstraints(); | |||||||||||
19 | JPanel eastPanel = new JPanel(gridBagLayout); | 29 | JPanel eastPanel = new JPanel(gridBagLayout); | |||||||||||
20 | mainPanel.add(eastPanel, BorderLayout.EAST); | 30 | mainPanel.add(eastPanel, BorderLayout.EAST); | |||||||||||
21 | c.fill = GridBagConstraints.HORIZONTAL; | 31 | c.fill = GridBagConstraints.HORIZONTAL; | |||||||||||
22 | c.weightx = 1.0; | 32 | c.weightx = 1.0; | |||||||||||
23 | c.gridwidth = GridBagConstraints.REMAINDER; | 33 | c.gridwidth = GridBagConstraints.REMAINDER; | |||||||||||
24 | gridBagLayout.setConstraints(addButton, c); |
| 34 | gridBagLayout.setConstraints(subscribeButton, c); | ||||||||||
25 | eastPanel.add(addButton); |
| 35 | eastPanel.add(subscribeButton); | ||||||||||
26 | Component strut1 = Box.createRigidArea(new Dimension(30, 5)); |
| 36 | Component strut1 = Box.createRigidArea(new Dimension(30, 6)); | ||||||||||
27 | gridBagLayout.setConstraints(strut1, c); | 37 | gridBagLayout.setConstraints(strut1, c); | |||||||||||
28 | eastPanel.add(strut1); | 38 | eastPanel.add(strut1); | |||||||||||
29 | gridBagLayout.setConstraints(editButton, c); |
| 39 | gridBagLayout.setConstraints(unsubscribeButton, c); | ||||||||||
30 | eastPanel.add(editButton); |
| 40 | eastPanel.add(unsubscribeButton); |
Row | Violation |
---|---|
1 | Clone fragment #1 returns variables glue, c, gridBagLayout, eastPanel , while Clone fragment #2 returns variables gridBagLayout, c, eastPanel, glue |