File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/config/columns/ColumnConfigDialog.java | File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/config/folder/FolderOptionsDialog.java | |||
Method name: JPanel createButtonPanel()
|
Method name: JPanel createButtonPanel()
|
|||
Number of AST nodes: 21 | Number of AST nodes: 21 | |||
1 | JPanel bottom = new JPanel();↵ | 1 | JPanel bottom = new JPanel();↵ | |
2 | bottom.setLayout(new BorderLayout());↵ | 2 | bottom.setLayout(new BorderLayout());↵ | |
3 | bottom.setBorder(BorderFactory.createEmptyBorder(12, 12, 12, 12↵ | 3 | // bottom.setBorder(new SingleSideEtchedBorder(SwingConstants.TOP));↵ | |
4 | // bottom.setLayout( new BoxLayout( bottom, BoxLayout.X_AXIS ) );↵ | |||
4 | ));↵ | 5 | // bottom.add( Box.createHorizontalStrut());↵ | |
5 | ButtonWithMnemonic cancelButton = new ButtonWithMnemonic(↵ | 6 | ButtonWithMnemonic cancelButton = new ButtonWithMnemonic(↵ | |
6 | MailResourceLoader.getString("global", "cancel"));↵ | 7 | MailResourceLoader.getString("global", "cancel")); //$NON-NLS-1$ //$NON-NLS-2$↵ | |
7 | //$NON-NLS-1$ //$NON-NLS-2$↵ | 8 | //$NON-NLS-1$ //$NON-NLS-2$↵ | |
8 | cancelButton.addActionListener(this);↵ | 9 | cancelButton.addActionListener(this);↵ | |
9 | cancelButton.setActionCommand("CANCEL"); //$NON-NLS-1$↵ | 10 | cancelButton.setActionCommand("CANCEL"); //$NON-NLS-1$↵ | |
10 | ButtonWithMnemonic okButton = new ButtonWithMnemonic(MailResourceLoader↵ | 11 | ButtonWithMnemonic okButton = new ButtonWithMnemonic(MailResourceLoader↵ | |
11 | .getString("global", "ok"));↵ | 12 | .getString("global", "ok")); //$NON-NLS-1$ //$NON-NLS-2$↵ | |
12 | //$NON-NLS-1$ //$NON-NLS-2$↵ | 13 | //$NON-NLS-1$ //$NON-NLS-2$↵ | |
13 | okButton.addActionListener(this);↵ | 14 | okButton.addActionListener(this);↵ | |
14 | okButton.setActionCommand("OK"); //$NON-NLS-1$↵ | 15 | okButton.setActionCommand("OK"); //$NON-NLS-1$↵ | |
15 | okButton.setDefaultCapable(true);↵ | 16 | okButton.setDefaultCapable(true);↵ | |
16 | getRootPane().setDefaultButton(okButton);↵ | 17 | getRootPane().setDefaultButton(okButton);↵ | |
17 | ButtonWithMnemonic helpButton = new ButtonWithMnemonic(↵ | 18 | ButtonWithMnemonic helpButton = new ButtonWithMnemonic(↵ | |
18 | MailResourceLoader.getString("global", "help"));↵ | 19 | MailResourceLoader.getString("global", "help")); //$NON-NLS-1$ //$NON-NLS-2$↵ | |
19 | // associate with JavaHelp↵ | 20 | // associate with JavaHelp↵ | |
20 | HelpManager.getInstance().enableHelpOnButton(helpButton,↵ | 21 | HelpManager.getInstance().enableHelpOnButton(helpButton,↵ | |
21 | "configuring_columba");↵ | 22 | "folder_options");↵ | |
22 | HelpManager.getInstance()↵ | 23 | HelpManager.getInstance()↵ | |
23 | .enableHelpKey(getRootPane(),↵ | 24 | .enableHelpKey(getRootPane(),↵ | |
24 | "configuring_columba");↵ | 25 | "folder_options");↵ | |
25 | JPanel buttonPanel = new JPanel();↵ | 26 | JPanel buttonPanel = new JPanel();↵ | |
26 | ↵ | 27 | buttonPanel.setBorder(BorderFactory.createEmptyBorder(12, 12, 12, 12));↵ | |
27 | buttonPanel.setLayout(new GridLayout(1, 3, 6, 0));↵ | 28 | buttonPanel.setLayout(new GridLayout(1, 3, 6, 0));↵ | |
28 | buttonPanel.add(okButton);↵ | 29 | buttonPanel.add(okButton);↵ | |
29 | buttonPanel.add(cancelButton);↵ | 30 | buttonPanel.add(cancelButton);↵ | |
30 | buttonPanel.add(helpButton);↵ | 31 | buttonPanel.add(helpButton);↵ | |
32 | // bottom.add( Box.createHorizontalGlue() );↵ | |||
31 | bottom.add(buttonPanel, BorderLayout.EAST);↵ | 33 | bottom.add(buttonPanel, BorderLayout.EAST);↵ | |
32 | return bottom; | 34 |
| |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
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 | 140 |
Number of mapped statements | 21 |
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 | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | JPanel bottom = new JPanel(); | 1 | JPanel bottom = new JPanel(); | |||||||||||||
2 | bottom.setLayout(new BorderLayout()); | 2 | bottom.setLayout(new BorderLayout()); | |||||||||||||
3 | bottom.setBorder(BorderFactory.createEmptyBorder(12, 12, 12, 12)); |
| 15 | buttonPanel.setBorder(BorderFactory.createEmptyBorder(12, 12, 12, 12)); | ||||||||||||
4 | ButtonWithMnemonic cancelButton = new ButtonWithMnemonic(MailResourceLoader.getString("global", "cancel")); | 3 | ButtonWithMnemonic cancelButton = new ButtonWithMnemonic(MailResourceLoader.getString("global", "cancel")); | |||||||||||||
5 | cancelButton.addActionListener(this); | 4 | cancelButton.addActionListener(this); | |||||||||||||
6 | cancelButton.setActionCommand("CANCEL"); | 5 | cancelButton.setActionCommand("CANCEL"); | |||||||||||||
7 | ButtonWithMnemonic okButton = new ButtonWithMnemonic(MailResourceLoader.getString("global", "ok")); | 6 | ButtonWithMnemonic okButton = new ButtonWithMnemonic(MailResourceLoader.getString("global", "ok")); | |||||||||||||
8 | okButton.addActionListener(this); | 7 | okButton.addActionListener(this); | |||||||||||||
9 | okButton.setActionCommand("OK"); | 8 | okButton.setActionCommand("OK"); | |||||||||||||
10 | okButton.setDefaultCapable(true); | 9 | okButton.setDefaultCapable(true); | |||||||||||||
11 | getRootPane().setDefaultButton(okButton); | 10 | getRootPane().setDefaultButton(okButton); | |||||||||||||
12 | ButtonWithMnemonic helpButton = new ButtonWithMnemonic(MailResourceLoader.getString("global", "help")); | 11 | ButtonWithMnemonic helpButton = new ButtonWithMnemonic(MailResourceLoader.getString("global", "help")); | |||||||||||||
13 | HelpManager.getInstance().enableHelpOnButton(helpButton, "configuring_columba"); |
| 12 | HelpManager.getInstance().enableHelpOnButton(helpButton, "folder_options"); | ||||||||||||
14 | HelpManager.getInstance().enableHelpKey(getRootPane(), "configuring_columba"); |
| 13 | HelpManager.getInstance().enableHelpKey(getRootPane(), "folder_options"); | ||||||||||||
15 | JPanel buttonPanel = new JPanel(); | 14 | JPanel buttonPanel = new JPanel(); | |||||||||||||
16 | buttonPanel.setLayout(new GridLayout(1, 3, 6, 0)); | 16 | buttonPanel.setLayout(new GridLayout(1, 3, 6, 0)); | |||||||||||||
17 | buttonPanel.add(okButton); | 17 | buttonPanel.add(okButton); | |||||||||||||
18 | buttonPanel.add(cancelButton); | 18 | buttonPanel.add(cancelButton); | |||||||||||||
19 | buttonPanel.add(helpButton); | 19 | buttonPanel.add(helpButton); | |||||||||||||
20 | bottom.add(buttonPanel, BorderLayout.EAST); | 20 | bottom.add(buttonPanel, BorderLayout.EAST); | |||||||||||||
21 | return bottom; | 21 | return bottom; |
Row | Violation |
---|---|
1 | Expression bottom cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression buttonPanel cannot be parameterized, because it has dependencies to/from statements that will be extracted |