File path: /columba-1.4-src/core/src/main/java/org/columba/core/desktop/JDICDesktop.java | File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/config/account/IdentityPanel.java | |||
Method name: boolean open(File)
|
Method name: boolean isFinished()
|
|||
Number of AST nodes: 3 | Number of AST nodes: 2 | |||
1 | try {↵ | 1 | try {↵ | |
2 | Desktop.open(file);↵ | |||
3 | ↵ | 2 | Address.parse(address);↵ | |
4 | } catch (DesktopException e) {↵ | 3 | } catch (ParserException pe) {↵ | |
5 | JOptionPane.showMessageDialog(FrameManager.getInstance()↵ | 4 | JOptionPane.showMessageDialog(↵ | |
6 | .getActiveFrame(), GlobalResourceLoader.getString(↵ | |||
7 | "org.columba.core.i18n.↵ | 5 | this,↵ | |
8 | dialog", "error", "no_viewer"),↵ | 6 | MailResourceLoader.getString("dialog", "↵ | |
9 | "Error", JOptionPane.ERROR_MESSAGE);↵ | |||
10 | return false;↵ | |||
11 | }↵ | |||
12 | return true; | 7 | account", "invalidaddress"));↵ | |
8 | return false;↵ | |||
9 |
| |||
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.2 |
Clones location | Clones are in different classes |
Number of node comparisons | 4 |
Number of mapped statements | 1 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 18.3 |
Clone type | Type 3 |
ID | Statement | ID | Statement | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | try |
| 8 | try | |||||||||||||||||||||
2 | Desktop.open(file); |
| | ||||||||||||||||||||||
|
| 9 | Address.parse(address); | ||||||||||||||||||||||
3 | return true; |
| |
Row | Violation |
---|---|
1 | Expression JOptionPane.showMessageDialog(FrameManager.getInstance().getActiveFrame(),GlobalResourceLoader.getString("org.columba.core.i18n.dialog","error","no_viewer"),"Error",JOptionPane.ERROR_MESSAGE) is a void method call, and thus it cannot be parameterized |
2 | Expression JOptionPane.showMessageDialog(this,MailResourceLoader.getString("dialog","account","invalidaddress")) is a void method call, and thus it cannot be parameterized |
3 | Unmatched statement Desktop.open(file); 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 Address.parse(address); 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 |
5 | Unmatched return true; |