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/util/PasswordDialog.java | |||
Method name: void actionPerformed(ActionEvent)
|
Method name: void actionPerformed(ActionEvent)
|
|||
Number of AST nodes: 9 | Number of AST nodes: 10 | |||
1 | if (!storePasswordC↵ | 1 | if (action.equals("SAVE")) {↵ | |
2 | heckBox.isSelected()) {↵ | 2 | if (!checkbox.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(dialog, MailResourceLoader↵ | 11 | .showMessageDialog(this, MailResourceLoader↵ | |
12 | .getString("dialog",↵ | 12 | .getString("dialog",↵ | |
13 | IncomingItem.PASSWORD,↵ | |||
14 | ↵ | 13 | "password",↵ | |
15 | "warn_save_msg"),↵ | 14 | "warn_save_msg"),↵ | |
16 | MailResourceLoader↵ | 15 | MailResourceLoader↵ | |
17 | .getString("dialog",↵ | 16 | .getString("dialog",↵ | |
18 | IncomingItem.PASSWORD,↵ | |||
19 | ↵ | 17 | "password",↵ | |
20 | "warn_save_title"),↵ | 18 | "warn_save_title"),↵ | |
21 | JOptionPane.WARNING_MESSAGE);↵ | 19 | JOptionPane.WARNING_MESSAGE);↵ | |
22 | return;↵ | 20 | return;↵ | |
23 | }↵ | 21 | }↵ | |
24 | }↵ | 22 | }↵ | |
25 | } | 23 | }↵ | |
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 | 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) | 1.8 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
42 | if (!storePasswordCheckBox.isSelected()) |
| 10 | if (!checkbox.isSelected()) | ||||||||||||||||
43 | return; |
| 11 | return; | ||||||||||||||||
else | else | |||||||||||||||||||
44 | File configPath = DefaultConfigDirectory.getInstance().getCurrentPath(); | 12 | File configPath = DefaultConfigDirectory.getInstance().getCurrentPath(); | |||||||||||||||||
45 | File defaultConfigPath = DefaultConfigDirectory.getDefaultPath(); | 13 | File defaultConfigPath = DefaultConfigDirectory.getDefaultPath(); | |||||||||||||||||
46 | while (!configPath.equals(defaultConfigPath)) | 14 | while (!configPath.equals(defaultConfigPath)) | |||||||||||||||||
47 | configPath = configPath.getParentFile(); | 15 | configPath = configPath.getParentFile(); | |||||||||||||||||
48 | if (configPath == null) | 16 | 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); |
| 17 | JOptionPane.showMessageDialog(this, MailResourceLoader.getString("dialog", "password", "warn_save_msg"), MailResourceLoader.getString("dialog", "password", "warn_save_title"), JOptionPane.WARNING_MESSAGE); | ||||||||||||||||
50 | return; |
| 18 | return; |
Row | Violation |
---|---|
1 | Conditional return; |
2 | Conditional return; |
3 | Conditional return; |
4 | Conditional return; |