File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/config/account/IncomingServerPanel.java | File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/config/account/OutgoingServerPanel.java | |||
Method name: void actionPerformed(ActionEvent)
|
Method name: void actionPerformed(ActionEvent)
|
|||
Number of AST nodes: 10 | Number of AST nodes: 12 | |||
1 | if (action.equals("CHECK_AUTHMETHODS")) {↵ | |||
2 | fetchSupportedAuthenticationMechanisms();↵ | |||
1 | if (action.equals("SAVE")) {↵ | 3 | } else if (action.equals("SAVE")) {↵ | |
2 | if (!storePasswordCheckBox.isSelected()) {↵ | 4 | if (!storePasswordCheckBox.isSelected()) {↵ | |
3 | return;↵ | 5 | return;↵ | |
4 | } else {↵ | 6 | } else {↵ | |
5 | File configPath = DefaultConfigDirectory.getInstance().getCurrentPath();↵ | 7 | File configPath = DefaultConfigDirectory.getInstance().getCurrentPath();↵ | |
6 | File defaultConfigPath = DefaultConfigDirectory.getDefaultPath();↵ | 8 | File defaultConfigPath = DefaultConfigDirectory.getDefaultPath();↵ | |
7 | while (!configPath.equals(defaultConfigPath)) {↵ | 9 | while (!configPath.equals(defaultConfigPath)) {↵ | |
8 | configPath = configPath.getParentFile();↵ | 10 | configPath = configPath.getParentFile();↵ | |
9 | if (configPath == null) {↵ | 11 | if (configPath == null) {↵ | |
10 | JOptionPane↵ | 12 | JOptionPane↵ | |
11 | .showMessageDialog(dialog, ↵ | 13 | .showMessageDialog(dialog,↵ | |
12 | MailResourceLoader↵ | 14 | MailResourceLoader↵ | |
13 | .getString("dialog",↵ | 15 | .getString("dialog",↵ | |
14 | IncomingItem.PASSWORD,↵ | 16 | ↵ | |
15 | "warn_save_msg"),↵ | 17 | "password", "warn_save_msg"),↵ | |
16 | MailResourceLoader.getString("dialog",↵ | 18 | MailResourceLoader.getString("dialog",↵ | |
17 | IncomingItem.PASSWORD,↵ | 19 | ↵ | |
18 | "warn_save_title"),↵ | 20 | "password", "warn_save_title"),↵ | |
19 | JOptionPane.WARNING_MESSAGE);↵ | 21 | JOptionPane.WARNING_MESSAGE);↵ | |
20 | return;↵ | 22 | return;↵ | |
21 | }↵ | 23 | }↵ | |
22 | }↵ | 24 | }↵ | |
23 | }↵ | 25 | }↵ | |
24 | } | 26 |
| |
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.5 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 30 |
Number of mapped statements | 9 |
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) | 5.6 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
42 | if (!storePasswordCheckBox.isSelected()) | 23 | if (!storePasswordCheckBox.isSelected()) | ||||||||||||||
43 | return; |
| 24 | return; | |||||||||||||
else | else | ||||||||||||||||
44 | File configPath = DefaultConfigDirectory.getInstance().getCurrentPath(); | 25 | File configPath = DefaultConfigDirectory.getInstance().getCurrentPath(); | ||||||||||||||
45 | File defaultConfigPath = DefaultConfigDirectory.getDefaultPath(); | 26 | File defaultConfigPath = DefaultConfigDirectory.getDefaultPath(); | ||||||||||||||
46 | while (!configPath.equals(defaultConfigPath)) | 27 | while (!configPath.equals(defaultConfigPath)) | ||||||||||||||
47 | configPath = configPath.getParentFile(); | 28 | configPath = configPath.getParentFile(); | ||||||||||||||
48 | if (configPath == null) | 29 | if (configPath == null) | ||||||||||||||
49 | JOptionPane.showMessageDialog(dialog, MailResourceLoader.getString("dialog", IncomingItem.PASSWORD, "warn_save_msg"), MailResourceLoader.getString("dialog", IncomingItem.PASSWORD, "warn_save_title"), JOptionPane.WARNING_MESSAGE); |
| 30 | JOptionPane.showMessageDialog(dialog, MailResourceLoader.getString("dialog", "password", "warn_save_msg"), MailResourceLoader.getString("dialog", "password", "warn_save_title"), JOptionPane.WARNING_MESSAGE); | |||||||||||||
50 | return; |
| 31 | return; |
Row | Violation |
---|---|
1 | Conditional return; |
2 | Conditional return; |
3 | Conditional return; |
4 | Conditional return; |