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: 9 | Number of AST nodes: 9 | |||
1 | if (!storePasswordCheckBox.isSelected()) {↵ | 1 | if (!checkbox.isSelected()) {↵ | |
2 | return;↵ | 2 | return;↵ | |
3 | } else {↵ | 3 | } else {↵ | |
4 | File configPath = DefaultConfigDirectory.getInstance().getCurrentPath();↵ | 4 | File configPath = DefaultConfigDirectory.getInstance().getCurrentPath();↵ | |
5 | File defaultConfigPath = DefaultConfigDirectory.getDefaultPath();↵ | 5 | File defaultConfigPath = DefaultConfigDirectory.getDefaultPath();↵ | |
6 | while (!configPath.equals(defaultConfigPath)) {↵ | 6 | while (!configPath.equals(defaultConfigPath)) {↵ | |
7 | configPath = configPath.getParentFile();↵ | 7 | configPath = configPath.getParentFile();↵ | |
8 | if (configPath == null) {↵ | 8 | if (configPath == null) {↵ | |
9 | JOptionPane.showMessageDialog(dialog,↵ | 9 | JOptionPane.showMessageDialog(↵ | |
10 | MailResourceLoader↵ | 10 | this, MailResourceLoader↵ | |
11 | .getString("dialog",↵ | 11 | .getString("dialog",↵ | |
12 | "password", ↵ | 12 | "password",↵ | |
13 | "warn_save_msg"),↵ | 13 | "warn_save_msg"),↵ | |
14 | MailResourceLoader↵ | 14 | MailResourceLoader↵ | |
15 | .getString("dialog",↵ | 15 | .getString("dialog",↵ | |
16 | "password", ↵ | 16 | "password",↵ | |
17 | "warn_save_title"),↵ | 17 | "warn_save_title"),↵ | |
18 | JOptionPane.WARNING_MESSAGE);↵ | 18 | JOptionPane.WARNING_MESSAGE);↵ | |
19 | return;↵ | 19 | return;↵ | |
20 | }↵ | 20 | }↵ | |
21 | }↵ | 21 | }↵ | |
22 | } | 22 |
| |
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.5 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
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 | Conditional return; |
2 | Conditional return; |
3 | Conditional return; |
4 | Conditional return; |