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