File path: /columba-1.4-src/contact/src/main/java/org/columba/addressbook/gui/dialog/group/EditGroupDialog.java | File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/config/account/ReceiveOptionsPanel.java | |||
Method name: void initComponents()
|
Method name: void initComponents()
|
|||
Number of AST nodes: 23 | Number of AST nodes: 22 | |||
1 | nameLabel = new JLabel(AddressbookResourceLoader↵ | 1 | intervalCheckingLabel = new LabelWithMnemonic(MailResourceLoader↵ | |
2 | .getString("dialog",↵ | 2 | .getString("dialog",↵ | |
3 | "editgroupdialog", "name")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$↵ | |||
4 | nameTextField = new JTextField(↵ | 3 | "account", "check_for_new_messages_every"));↵ | |
4 | intervalCheckingSpinner = new JSpinner(new SpinnerNumberModel(5, 1,↵ | |||
5 | );↵ | 5 | 100, 1));↵ | |
6 | description↵ | 6 | intervalCheckingLabel.setLabelFor(intervalCheckingSpinner);↵ | |
7 | Label = new JLabel(AddressbookResourceLoader.getString(↵ | 7 | intervalCheckingLabel2 = new JLabel(MailResourceLoader.getString(↵ | |
8 | "dialog", "editgroupdialog", "description_2")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$↵ | 8 | "dialog", "↵ | |
9 | descriptionTextField = new JTextField();↵ | |||
10 | addComboBox = new DefaultAddressComboBox(parentFolder.getId(), false↵ | 9 | account", "minutes"));↵ | |
10 | intervalCheckingCheckBox = new CheckBoxWithMnemonic(MailResourceLoader↵ | |||
11 | .getString("dialog", "account",↵ | |||
11 | );↵ | 12 | "enable_interval_message_checking"));↵ | |
12 | ((JTextComponent) addComboBox.getEditor().getEditorComponent())↵ | 13 | intervalCheckingCheckBox.set↵ | |
13 | .addKeyListener(this);↵ | |||
14 | members = new AddressbookListModel();↵ | |||
15 | list = new AddressbookDNDListView(members);↵ | |||
16 | list.setMinimumSize(new Dimension(200, 300));↵ | |||
17 | addButton = new JButton("Add"); //$NON-NLS-1$↵ | |||
18 | addButton.addActionListener(this↵ | 14 | ActionCommand("ENABLE");↵ | |
15 | intervalCheckingCheckBox.addActionListener(this);↵ | |||
16 | autodownloadCheckBox = new CheckBoxWithMnemonic(MailResourceLoader↵ | |||
17 | .getString("dialog", "account",↵ | |||
18 | IncomingItem.AUTOMATICALLY_DOWNLOAD_NEW_MESSAGES));↵ | |||
19 | playsoundCheckBox = new CheckBoxWithMnemonic(MailResourceLoader↵ | |||
20 | .getString("dialog", "account",↵ | |||
19 | );↵ | 21 | "play_sound_when_new_messages_arrive"));↵ | |
20 | addButton.setActionCommand("ADD"); //$NON-NLS-1$↵ | 22 | playsoundCheckBox.setActionCommand("↵ | |
21 | removeButton = new JButton("Remove"); //$NON-NLS-1$↵ | |||
22 | removeButton↵ | 23 | PLAYSOUND");↵ | |
23 | .addActionListener(this);↵ | 24 | playsoundCheckBox.addActionListener(this);↵ | |
24 | removeButton.setActionCommand("REMOVE"); //$NON-NLS-1$↵ | 25 | ↵ | |
25 | ok↵ | 26 | ButtonGroup group = new ButtonGroup();↵ | |
26 | Button = new ButtonWithMnemonic(AddressbookResourceLoader.getString(↵ | 27 | defaultRadioButton = new JRadioButton(MailResourceLoader.getString(↵ | |
27 | "global", "ok")); //$NON-NLS-1$ //$NON-NLS-2$↵ | 28 | "↵ | |
28 | okButton.setActionCommand("OK"); //$NON-NLS-1$↵ | |||
29 | okButton.addActionListener(this↵ | 29 | dialog", "account", "default_soundfile"));↵ | |
30 | );↵ | 30 | group.add(defaultRadioButton);↵ | |
31 | cancelButton = new ButtonWithMnemonic(AddressbookResourceLoader↵ | 31 | chooseRadioButton = new JRadioButton(MailResourceLoader↵ | |
32 | .getString("global", "cancel")); //$NON-NLS-1$ //$NON-NLS-2$↵ | 32 | .getString(↵ | |
33 | cancelButton.setActionCommand("CANCEL"); //$NON-NLS-1$↵ | |||
34 | cancelButton.addActionListener(this);↵ | |||
35 | getRootPane().setDefaultButton(okButton);↵ | |||
36 | getRootPane().registerKeyboardAction(this, "CANCEL", //$NON-NLS-1$↵ | |||
37 | KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0),↵ | |||
38 | JComponent.WHEN_IN_FOCUSED_WINDOW); | |||
33 | "dialog", "account", "choose_soundfile"));↵ | |||
34 | group.add(chooseRadioButton);↵ | |||
35 | chooseButton = new JButton("..");↵ | |||
36 | chooseButton.setActionCommand("CHOOSE");↵ | |||
37 | chooseButton.addActionListener(this);↵ | |||
38 | if (item.isPopAccount()) {↵ | |||
39 | popPanel = new PopAttributPanel(item.getPopItem());↵ | |||
40 | } else {↵ | |||
41 | imapPanel = new ImapAttributPanel(item.getImapItem());↵ | |||
42 |
| |||
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 | 227 |
Number of mapped statements | 16 |
Number of unmapped statements in the first code fragment | 7 |
Number of unmapped statements in the second code fragment | 3 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | nameLabel = new JLabel(AddressbookResourceLoader.getString("dialog", "editgroupdialog", "name")); |
| 17 | chooseButton = new JButton(".."); | ||||||||||||||||||||||||||
2 | nameTextField = new JTextField(); |
| 2 | intervalCheckingSpinner = new JSpinner(new SpinnerNumberModel(5, 1, 100, 1)); | ||||||||||||||||||||||||||
3 | descriptionLabel = new JLabel(AddressbookResourceLoader.getString("dialog", "editgroupdialog", "description_2")); |
| 4 | intervalCheckingLabel2 = new JLabel(MailResourceLoader.getString("dialog", "account", "minutes")); | ||||||||||||||||||||||||||
| 12 | ButtonGroup group = new ButtonGroup(); | ||||||||||||||||||||||||||||
4 | descriptionTextField = new JTextField(); |
| 13 | defaultRadioButton = new JRadioButton(MailResourceLoader.getString("dialog", "account", "default_soundfile")); | ||||||||||||||||||||||||||
5 | addComboBox = new DefaultAddressComboBox(parentFolder.getId(), false); |
| 15 | chooseRadioButton = new JRadioButton(MailResourceLoader.getString("dialog", "account", "choose_soundfile")); | ||||||||||||||||||||||||||
6 | ((JTextComponent)addComboBox.getEditor().getEditorComponent()).addKeyListener(this); | | ||||||||||||||||||||||||||||
7 | members = new AddressbookListModel(); | | ||||||||||||||||||||||||||||
8 | list = new AddressbookDNDListView(members); | | ||||||||||||||||||||||||||||
9 | list.setMinimumSize(new Dimension(200, 300)); | | ||||||||||||||||||||||||||||
10 | addButton = new JButton("Add"); |
| 9 | playsoundCheckBox = new CheckBoxWithMnemonic(MailResourceLoader.getString("dialog", "account", "play_sound_when_new_messages_arrive")); | ||||||||||||||||||||||||||
11 | addButton.addActionListener(this); |
| 11 | playsoundCheckBox.addActionListener(this); | ||||||||||||||||||||||||||
12 | addButton.setActionCommand("ADD"); |
| 10 | playsoundCheckBox.setActionCommand("PLAYSOUND"); | ||||||||||||||||||||||||||
13 | removeButton = new JButton("Remove"); |
| 8 | autodownloadCheckBox = new CheckBoxWithMnemonic(MailResourceLoader.getString("dialog", "account", IncomingItem.AUTOMATICALLY_DOWNLOAD_NEW_MESSAGES)); | ||||||||||||||||||||||||||
14 | removeButton.addActionListener(this); |
| 19 | chooseButton.addActionListener(this); | ||||||||||||||||||||||||||
15 | removeButton.setActionCommand("REMOVE"); |
| 18 | chooseButton.setActionCommand("CHOOSE"); | ||||||||||||||||||||||||||
16 | okButton = new ButtonWithMnemonic(AddressbookResourceLoader.getString("global", "ok")); |
| 5 | intervalCheckingCheckBox = new CheckBoxWithMnemonic(MailResourceLoader.getString("dialog", "account", "enable_interval_message_checking")); | ||||||||||||||||||||||||||
17 | okButton.setActionCommand("OK"); |
| 6 | intervalCheckingCheckBox.setActionCommand("ENABLE"); | ||||||||||||||||||||||||||
18 | okButton.addActionListener(this); |
| 7 | intervalCheckingCheckBox.addActionListener(this); | ||||||||||||||||||||||||||
19 | cancelButton = new ButtonWithMnemonic(AddressbookResourceLoader.getString("global", "cancel")); |
| 1 | intervalCheckingLabel = new LabelWithMnemonic(MailResourceLoader.getString("dialog", "account", "check_for_new_messages_every")); | ||||||||||||||||||||||||||
20 | cancelButton.setActionCommand("CANCEL"); | | ||||||||||||||||||||||||||||
21 | cancelButton.addActionListener(this); |
| 3 | intervalCheckingLabel.setLabelFor(intervalCheckingSpinner); | ||||||||||||||||||||||||||
| 14 | group.add(defaultRadioButton); | ||||||||||||||||||||||||||||
| 16 | group.add(chooseRadioButton); | ||||||||||||||||||||||||||||
22 | getRootPane().setDefaultButton(okButton); | | ||||||||||||||||||||||||||||
23 | getRootPane().registerKeyboardAction(this, "CANCEL", KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), JComponent.WHEN_IN_FOCUSED_WINDOW); | |
Row | Violation |
---|---|
1 | Expression nameLabel is a field being modified, and thus it cannot be parameterized |
2 | Expression chooseButton is a field being modified, and thus it cannot be parameterized |
3 | Expression nameTextField is a field being modified, and thus it cannot be parameterized |
4 | Expression intervalCheckingSpinner is a field being modified, and thus it cannot be parameterized |
5 | Expression descriptionLabel is a field being modified, and thus it cannot be parameterized |
6 | Expression intervalCheckingLabel2 is a field being modified, and thus it cannot be parameterized |
7 | Expression descriptionTextField is a field being modified, and thus it cannot be parameterized |
8 | Expression defaultRadioButton is a field being modified, and thus it cannot be parameterized |
9 | Expression addComboBox is a field being modified, and thus it cannot be parameterized |
10 | Expression chooseRadioButton is a field being modified, and thus it cannot be parameterized |
11 | Expression addButton is a field being modified, and thus it cannot be parameterized |
12 | Expression playsoundCheckBox is a field being modified, and thus it cannot be parameterized |
13 | Expression addButton cannot be parameterized, because it has dependencies to/from statements that will be extracted |
14 | Expression playsoundCheckBox cannot be parameterized, because it has dependencies to/from statements that will be extracted |
15 | Expression addButton cannot be parameterized, because it has dependencies to/from statements that will be extracted |
16 | Expression playsoundCheckBox cannot be parameterized, because it has dependencies to/from statements that will be extracted |
17 | Expression removeButton is a field being modified, and thus it cannot be parameterized |
18 | Expression autodownloadCheckBox is a field being modified, and thus it cannot be parameterized |
19 | Expression removeButton cannot be parameterized, because it has dependencies to/from statements that will be extracted |
20 | Expression chooseButton cannot be parameterized, because it has dependencies to/from statements that will be extracted |
21 | Expression removeButton cannot be parameterized, because it has dependencies to/from statements that will be extracted |
22 | Expression chooseButton cannot be parameterized, because it has dependencies to/from statements that will be extracted |
23 | Expression okButton is a field being modified, and thus it cannot be parameterized |
24 | Expression intervalCheckingCheckBox is a field being modified, and thus it cannot be parameterized |
25 | Expression okButton cannot be parameterized, because it has dependencies to/from statements that will be extracted |
26 | Expression intervalCheckingCheckBox cannot be parameterized, because it has dependencies to/from statements that will be extracted |
27 | Expression okButton cannot be parameterized, because it has dependencies to/from statements that will be extracted |
28 | Expression intervalCheckingCheckBox cannot be parameterized, because it has dependencies to/from statements that will be extracted |
29 | Expression cancelButton is a field being modified, and thus it cannot be parameterized |
30 | Expression intervalCheckingLabel is a field being modified, and thus it cannot be parameterized |
31 | Expression cancelButton.addActionListener(this) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
32 | Expression intervalCheckingLabel.setLabelFor(intervalCheckingSpinner) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
33 | Expression cancelButton.addActionListener(this) is a void method call, and thus it cannot be parameterized |
34 | Expression intervalCheckingLabel.setLabelFor(intervalCheckingSpinner) is a void method call, and thus it cannot be parameterized |
35 | Expression intervalCheckingSpinner cannot be parameterized, because it has dependencies to/from statements that will be extracted |
36 | Expression cancelButton cannot be parameterized, because it has dependencies to/from statements that will be extracted |
37 | Expression intervalCheckingLabel cannot be parameterized, because it has dependencies to/from statements that will be extracted |