File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/config/account/OutgoingServerPanel.java | File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/util/PasswordDialog.java | |||
Method name: void actionPerformed(ActionEvent)
|
Method name: void actionPerformed(ActionEvent)
|
|||
Number of AST nodes: 12 | Number of AST nodes: 13 | |||
1 | if (action.equals("CHECK_AUTHMETHODS")) {↵ | 1 | if (action.equals("C↵ | |
2 | fetchSupportedAuthenticationMechanisms↵ | 2 | ANCEL")) {↵ | |
3 | bool = false;↵ | |||
3 | ();↵ | 4 | dispose();↵ | |
4 | } else if (action.equals("SAVE")) {↵ | 5 | } else if (action.equals("SAVE")) {↵ | |
5 | if (!storePasswordCheckBox.isSelected()) {↵ | 6 | if (!checkbox.isSelected()) {↵ | |
6 | return;↵ | 7 | return;↵ | |
7 | } else {↵ | 8 | } else {↵ | |
8 | File configPath = DefaultConfigDirectory.getInstance().getCurrentPath();↵ | 9 | File configPath = DefaultConfigDirectory.getInstance().getCurrentPath();↵ | |
9 | File defaultConfigPath = DefaultConfigDirectory.getDefaultPath();↵ | 10 | File defaultConfigPath = DefaultConfigDirectory.getDefaultPath();↵ | |
10 | while (!configPath.equals(defaultConfigPath)) {↵ | 11 | while (!configPath.equals(defaultConfigPath)) {↵ | |
11 | configPath = configPath.getParentFile();↵ | 12 | configPath = configPath.getParentFile();↵ | |
12 | if (configPath == null) {↵ | 13 | if (configPath == null) {↵ | |
13 | JOptionPane.showMessageDialog(dialog,↵ | 14 | JOptionPane.showMessageDialog(↵ | |
14 | MailResourceLoader↵ | 15 | this, MailResourceLoader↵ | |
15 | .getString("dialog",↵ | 16 | .getString("dialog",↵ | |
16 | "password", ↵ | 17 | "password",↵ | |
17 | "warn_save_msg"),↵ | 18 | "warn_save_msg"),↵ | |
18 | MailResourceLoader↵ | 19 | MailResourceLoader↵ | |
19 | .getString("dialog",↵ | 20 | .getString("dialog",↵ | |
20 | "password", ↵ | 21 | "password",↵ | |
21 | "warn_save_title"),↵ | 22 | "warn_save_title"),↵ | |
22 | JOptionPane.WARNING_MESSAGE);↵ | 23 | JOptionPane.WARNING_MESSAGE);↵ | |
23 | return;↵ | 24 | return;↵ | |
24 | }↵ | 25 | }↵ | |
25 | }↵ | 26 | }↵ | |
26 | }↵ | 27 | }↵ | |
27 | } | 28 |
| |
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.6 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 36 |
Number of mapped statements | 12 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 2.6 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
20 | else if (action.equals("CHECK_AUTHMETHODS")) |
| 6 | else if (action.equals("CANCEL")) | ||||||||||||
| 7 | bool = false; | ||||||||||||||
21 | fetchSupportedAuthenticationMechanisms(); |
| 8 | dispose(); | ||||||||||||
22 | else if (action.equals("SAVE")) | 9 | else if (action.equals("SAVE")) | |||||||||||||
23 | if (!storePasswordCheckBox.isSelected()) |
| 10 | if (!checkbox.isSelected()) | ||||||||||||
24 | return; |
| 11 | return; | ||||||||||||
else | else | |||||||||||||||
25 | File configPath = DefaultConfigDirectory.getInstance().getCurrentPath(); | 12 | File configPath = DefaultConfigDirectory.getInstance().getCurrentPath(); | |||||||||||||
26 | File defaultConfigPath = DefaultConfigDirectory.getDefaultPath(); | 13 | File defaultConfigPath = DefaultConfigDirectory.getDefaultPath(); | |||||||||||||
27 | while (!configPath.equals(defaultConfigPath)) | 14 | while (!configPath.equals(defaultConfigPath)) | |||||||||||||
28 | configPath = configPath.getParentFile(); | 15 | configPath = configPath.getParentFile(); | |||||||||||||
29 | if (configPath == null) | 16 | if (configPath == null) | |||||||||||||
30 | JOptionPane.showMessageDialog(dialog, MailResourceLoader.getString("dialog", "password", "warn_save_msg"), MailResourceLoader.getString("dialog", "password", "warn_save_title"), JOptionPane.WARNING_MESSAGE); |
| 17 | JOptionPane.showMessageDialog(this, MailResourceLoader.getString("dialog", "password", "warn_save_msg"), MailResourceLoader.getString("dialog", "password", "warn_save_title"), JOptionPane.WARNING_MESSAGE); | ||||||||||||
31 | return; |
| 18 | return; |
Row | Violation |
---|---|
1 | Expression fetchSupportedAuthenticationMechanisms() is a void method call, and thus it cannot be parameterized |
2 | Expression dispose() is a void method call, and thus it cannot be parameterized |
3 | Conditional return; |
4 | Conditional return; |
5 | Conditional return; |
6 | Conditional return; |