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: 7 | Number of AST nodes: 7 | |||
1 | File configPath = DefaultConfigDirectory.getInstance().getCurrentPath();↵ | 1 | File configPath = DefaultConfigDirectory.getInstance().getCurrentPath();↵ | |
2 | File defaultConfigPath = DefaultConfigDirectory.getDefaultPath();↵ | 2 | File defaultConfigPath = DefaultConfigDirectory.getDefaultPath();↵ | |
3 | while (!configPath.equals(defaultConfigPath)) {↵ | 3 | while (!configPath.equals(defaultConfigPath)) {↵ | |
4 | configPath = configPath.getParentFile();↵ | 4 | configPath = configPath.getParentFile();↵ | |
5 | if (configPath == null) {↵ | 5 | if (configPath == null) {↵ | |
6 | JOptionPane.showMessageDialog(dialog,↵ | 6 | JOptionPane.showMessageDialog(↵ | |
7 | MailResourceLoader↵ | 7 | this, MailResourceLoader↵ | |
8 | .getString("dialog",↵ | 8 | .getString("dialog",↵ | |
9 | "password", ↵ | 9 | "password",↵ | |
10 | "warn_save_msg"),↵ | 10 | "warn_save_msg"),↵ | |
11 | MailResourceLoader↵ | 11 | MailResourceLoader↵ | |
12 | .getString("dialog",↵ | 12 | .getString("dialog",↵ | |
13 | "password", ↵ | 13 | "password",↵ | |
14 | "warn_save_title"),↵ | 14 | "warn_save_title"),↵ | |
15 | JOptionPane.WARNING_MESSAGE);↵ | 15 | JOptionPane.WARNING_MESSAGE);↵ | |
16 | return;↵ | 16 | return;↵ | |
17 | }↵ | 17 | }↵ | |
18 | } | 18 |
| |
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 | 18 |
Number of mapped statements | 7 |
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) | 4.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
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 | The refactoring of the clones is infeasible, because classes org.columba.mail.gui.config.account.OutgoingServerPanel and org.columba.mail.gui.util.PasswordDialog do not have a common superclass |