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/config/account/IncomingServerPanel.java | |||
Method name: void HelpManager()
|
Method name: void actionPerformed(ActionEvent)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 4 | |||
1 | if (url == null) {↵ | |||
2 | url = HelpSet.findHelpSet(loader, helpsetName, ".hs", Locale↵ | |||
3 | .getDefault());↵ | 1 | configPath = configPath.getParentFile();↵ | |
4 | if (url == null) {↵ | 2 | if (configPath == null) {↵ | |
5 | // could not find it!↵ | 3 | ↵ | |
6 | JOptionPane↵ | 4 | JOptionPane↵ | |
7 | .showMessageDialog(FrameManager.getInstance()↵ | 5 | .showMessageDialog(↵ | |
8 | .getActiveFrame(), "HelpSet not found"↵ | 6 | dialog, MailResourceLoader↵ | |
7 | .getString("dialog",↵ | |||
8 | IncomingItem.PASSWORD,↵ | |||
9 | "warn_save_msg"),↵ | |||
10 | MailResourceLoader.getString("dialog",↵ | |||
9 | ,↵ | 11 | IncomingItem.PASSWORD,↵ | |
10 | "Error", ↵ | 12 | "warn_save_title"),↵ | |
11 | JOptionPane.ERROR_MESSAGE);↵ | 13 | JOptionPane.WARNING_MESSAGE);↵ | |
12 | return;↵ | 14 | return;↵ | |
13 | }↵ | 15 | ↵ | |
14 | } | 16 |
| |
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 | 2 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 17.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4 | url = HelpSet.findHelpSet(loader, helpsetName, ".hs", Locale.getDefault()); | | ||||||||||||||||
|
| 47 | configPath = configPath.getParentFile(); | |||||||||||||||
5 | if (url == null) |
| 48 | if (configPath == null) | ||||||||||||||
6 | JOptionPane.showMessageDialog(FrameManager.getInstance().getActiveFrame(), "HelpSet not found", "Error", JOptionPane.ERROR_MESSAGE); |
| | |||||||||||||||
|
| 49 | JOptionPane.showMessageDialog(dialog, MailResourceLoader.getString("dialog", IncomingItem.PASSWORD, "warn_save_msg"), MailResourceLoader.getString("dialog", IncomingItem.PASSWORD, "warn_save_title"), JOptionPane.WARNING_MESSAGE); | |||||||||||||||
7 | return; |
| 50 | 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 | Unmatched statement JOptionPane.showMessageDialog(FrameManager.getInstance().getActiveFrame(),"HelpSet not found","Error",JOptionPane.ERROR_MESSAGE); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted |
4 | Unmatched statement JOptionPane.showMessageDialog(dialog,MailResourceLoader.getString("dialog",IncomingItem.PASSWORD,"warn_save_msg"),MailResourceLoader.getString("dialog",IncomingItem.PASSWORD,"warn_save_title"),JOptionPane.WARNING_MESSAGE); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
5 | Unmatched statement JOptionPane.showMessageDialog(dialog,MailResourceLoader.getString("dialog",IncomingItem.PASSWORD,"warn_save_msg"),MailResourceLoader.getString("dialog",IncomingItem.PASSWORD,"warn_save_title"),JOptionPane.WARNING_MESSAGE); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted |
6 | Conditional return; |
7 | Conditional return; |