File path: /columba-1.4-src/core/src/main/java/org/columba/core/help/HelpManager.java | File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/util/PasswordDialog.java | |||
Method name: void HelpManager()
|
Method name: void actionPerformed(ActionEvent)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | if (url == null) {↵ | |||
2 | url = HelpSet.findHelpSet(loader, helpsetName, ".hs", Locale↵ | |||
3 | .getDefault↵ | 1 | while (!configPath.equals(defaultConfigPath)) {↵ | |
4 | ());↵ | 2 | configPath = configPath.getParentFile();↵ | |
5 | if (url == null) {↵ | 3 | if (configPath == null) {↵ | |
6 | // could not find it!↵ | 4 | ↵ | |
7 | JOptionPane.showMessageDialog(FrameManager.getInstance()↵ | 5 | JOptionPane.showMessageDialog(this, MailResourceLoader↵ | |
6 | .getString("dialog", "password",↵ | |||
7 | "warn_save_msg"), MailResourceLoader↵ | |||
8 | .getActiveFrame(), "HelpSet not found",↵ | 8 | .get↵ | |
9 | "Error", ↵ | 9 | String("dialog", "password",↵ | |
10 | "warn_save_title"),↵ | |||
10 | JOptionPane.ERROR_MESSAGE);↵ | 11 | JOptionPane.WARNING_MESSAGE);↵ | |
11 | return;↵ | 12 | return;↵ | |
12 | }↵ | 13 | ↵ | |
14 | }↵ | |||
13 | } | 15 | } | |
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.1 |
Clones location | Clones are in different classes |
Number of node comparisons | 11 |
Number of mapped statements | 3 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 0.8 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4 | url = HelpSet.findHelpSet(loader, helpsetName, ".hs", Locale.getDefault()); | | |||||||||||||||||||||
|
| 15 | configPath = configPath.getParentFile(); | ||||||||||||||||||||
5 | if (url == null) |
| 16 | if (configPath == null) | |||||||||||||||||||
6 | JOptionPane.showMessageDialog(FrameManager.getInstance().getActiveFrame(), "HelpSet not found", "Error", JOptionPane.ERROR_MESSAGE); |
| 17 | JOptionPane.showMessageDialog(this, MailResourceLoader.getString("dialog", "password", "warn_save_msg"), MailResourceLoader.getString("dialog", "password", "warn_save_title"), JOptionPane.WARNING_MESSAGE); | |||||||||||||||||||
7 | return; |
| 18 | return; |
Row | Violation |
---|---|
1 | Unmatched statement configPath=configPath.getParentFile(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Type java.net.URL of variable url does not match with type java.io.File of variable configPath |
3 | Conditional return; |
4 | Conditional return; |