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 | 230 |
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")); |
| 8 | autodownloadCheckBox = new CheckBoxWithMnemonic(MailResourceLoader.getString("dialog", "account", IncomingItem.AUTOMATICALLY_DOWNLOAD_NEW_MESSAGES)); | |||||||||||||||||||||||||||||
2 | nameTextField = new JTextField(); |
| 1 | intervalCheckingLabel = new LabelWithMnemonic(MailResourceLoader.getString("dialog", "account", "check_for_new_messages_every")); | |||||||||||||||||||||||||||||
3 | descriptionLabel = new JLabel(AddressbookResourceLoader.getString("dialog", "editgroupdialog", "description_2")); |
| 5 | intervalCheckingCheckBox = new CheckBoxWithMnemonic(MailResourceLoader.getString("dialog", "account", "enable_interval_message_checking")); | |||||||||||||||||||||||||||||
4 | descriptionTextField = new JTextField(); |
| 2 | intervalCheckingSpinner = new JSpinner(new SpinnerNumberModel(5, 1, 100, 1)); | |||||||||||||||||||||||||||||
5 | addComboBox = new DefaultAddressComboBox(parentFolder.getId(), false); |
| 4 | intervalCheckingLabel2 = new JLabel(MailResourceLoader.getString("dialog", "account", "minutes")); | |||||||||||||||||||||||||||||
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"); |
| 13 | defaultRadioButton = new JRadioButton(MailResourceLoader.getString("dialog", "account", "default_soundfile")); | |||||||||||||||||||||||||||||
14 | removeButton.addActionListener(this); |
| 7 | intervalCheckingCheckBox.addActionListener(this); | |||||||||||||||||||||||||||||
15 | removeButton.setActionCommand("REMOVE"); |
| 6 | intervalCheckingCheckBox.setActionCommand("ENABLE"); | |||||||||||||||||||||||||||||
| 12 | ButtonGroup group = new ButtonGroup(); | |||||||||||||||||||||||||||||||
|
| 14 | group.add(defaultRadioButton); | ||||||||||||||||||||||||||||||
16 | okButton = new ButtonWithMnemonic(AddressbookResourceLoader.getString("global", "ok")); |
| 15 | chooseRadioButton = new JRadioButton(MailResourceLoader.getString("dialog", "account", "choose_soundfile")); | |||||||||||||||||||||||||||||
|
| 16 | group.add(chooseRadioButton); | ||||||||||||||||||||||||||||||
17 | okButton.setActionCommand("OK"); | | |||||||||||||||||||||||||||||||
18 | okButton.addActionListener(this); |
| | ||||||||||||||||||||||||||||||
19 | cancelButton = new ButtonWithMnemonic(AddressbookResourceLoader.getString("global", "cancel")); |
| 17 | chooseButton = new JButton(".."); | |||||||||||||||||||||||||||||
20 | cancelButton.setActionCommand("CANCEL"); |
| 18 | chooseButton.setActionCommand("CHOOSE"); | |||||||||||||||||||||||||||||
21 | cancelButton.addActionListener(this); |
| 19 | chooseButton.addActionListener(this); | |||||||||||||||||||||||||||||
22 | getRootPane().setDefaultButton(okButton); |
| 3 | intervalCheckingLabel.setLabelFor(intervalCheckingSpinner); | |||||||||||||||||||||||||||||
23 | getRootPane().registerKeyboardAction(this, "CANCEL", KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), JComponent.WHEN_IN_FOCUSED_WINDOW); | |
Row | Violation |
---|---|
1 | Expression new JLabel(AddressbookResourceLoader.getString("dialog","editgroupdialog","name")) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression new CheckBoxWithMnemonic(MailResourceLoader.getString("dialog","account",IncomingItem.AUTOMATICALLY_DOWNLOAD_NEW_MESSAGES)) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression nameTextField is a field being modified, and thus it cannot be parameterized |
4 | Expression intervalCheckingLabel is a field being modified, and thus it cannot be parameterized |
5 | Expression new LabelWithMnemonic(MailResourceLoader.getString("dialog","account","check_for_new_messages_every")) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression new LabelWithMnemonic(MailResourceLoader.getString("dialog","account","check_for_new_messages_every")) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Expression descriptionLabel is a field being modified, and thus it cannot be parameterized |
8 | Expression intervalCheckingCheckBox is a field being modified, and thus it cannot be parameterized |
9 | Expression new JLabel(AddressbookResourceLoader.getString("dialog","editgroupdialog","description_2")) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
10 | Expression new CheckBoxWithMnemonic(MailResourceLoader.getString("dialog","account","enable_interval_message_checking")) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
11 | Expression descriptionTextField is a field being modified, and thus it cannot be parameterized |
12 | Expression intervalCheckingSpinner is a field being modified, and thus it cannot be parameterized |
13 | Expression new JSpinner(new SpinnerNumberModel(5,1,100,1)) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
14 | Expression new JSpinner(new SpinnerNumberModel(5,1,100,1)) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
15 | Expression new JLabel(MailResourceLoader.getString("dialog","account","minutes")) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
16 | Expression new JLabel(MailResourceLoader.getString("dialog","account","minutes")) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
17 | Unmatched statement members=new AddressbookListModel(); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
18 | Unmatched statement list=new AddressbookDNDListView(members); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
19 | Unmatched statement list.setMinimumSize(new Dimension(200,300)); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
20 | Expression new CheckBoxWithMnemonic(MailResourceLoader.getString("dialog","account","play_sound_when_new_messages_arrive")) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
21 | Expression MailResourceLoader.getString("dialog","account","play_sound_when_new_messages_arrive") cannot be parameterized, because it has dependencies to/from statements that will be extracted |
22 | Expression removeButton is a field being modified, and thus it cannot be parameterized |
23 | Expression defaultRadioButton is a field being modified, and thus it cannot be parameterized |
24 | Expression new JRadioButton(MailResourceLoader.getString("dialog","account","default_soundfile")) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
25 | Expression MailResourceLoader.getString("dialog","account","default_soundfile") cannot be parameterized, because it has dependencies to/from statements that will be extracted |
26 | Unmatched statement group.add(defaultRadioButton); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
27 | Expression okButton is a field being modified, and thus it cannot be parameterized |
28 | Expression chooseRadioButton is a field being modified, and thus it cannot be parameterized |
29 | Expression new ButtonWithMnemonic(AddressbookResourceLoader.getString("global","ok")) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
30 | Expression new JRadioButton(MailResourceLoader.getString("dialog","account","choose_soundfile")) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
31 | Expression AddressbookResourceLoader cannot be unified with expression MailResourceLoader , because common superclass org.columba.core.resourceloader.GlobalResourceLoader does not declare member(s) public static java.lang.String getString(java.lang.String, java.lang.String) |
32 | Expression AddressbookResourceLoader.getString("global","ok") cannot be parameterized, because it has dependencies to/from statements that will be extracted |
33 | Expression MailResourceLoader.getString("dialog","account","choose_soundfile") cannot be parameterized, because it has dependencies to/from statements that will be extracted |
34 | Unmatched statement group.add(chooseRadioButton); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
35 | Unmatched statement okButton.addActionListener(this); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
36 | Expression new ButtonWithMnemonic(AddressbookResourceLoader.getString("global","cancel")) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
37 | Expression AddressbookResourceLoader.getString("global","cancel") cannot be parameterized, because it has dependencies to/from statements that will be extracted |
38 | Expression getRootPane().setDefaultButton(okButton) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
39 | Expression intervalCheckingLabel.setLabelFor(intervalCheckingSpinner) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
40 | Expression getRootPane().setDefaultButton(okButton) is a void method call, and thus it cannot be parameterized |
41 | Expression intervalCheckingLabel.setLabelFor(intervalCheckingSpinner) is a void method call, and thus it cannot be parameterized |
42 | Expression intervalCheckingLabel cannot be parameterized, because it has dependencies to/from statements that will be extracted |
43 | Expression getRootPane() cannot be unified with expression intervalCheckingLabel , because common superclass javax.swing.JComponent does not declare member(s) public void setDefaultButton(javax.swing.JButton) , public void setLabelFor(java.awt.Component) |
44 | The refactoring of the clones is infeasible, because classes org.columba.addressbook.gui.dialog.group.EditGroupDialog and org.columba.mail.gui.config.account.ReceiveOptionsPanel do not have a common superclass |