File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/pgp/JSCFController.java | File path: /columba-1.4-src/core/src/main/java/org/columba/core/desktop/JDICDesktop.java | |||
Method name: void registerDrivers()
|
Method name: void browse(URL)
|
|||
Number of AST nodes: 2 | Number of AST nodes: 2 | |||
1 | try {↵ | 1 | try {↵ | |
2 | // at the moment we are only supporting gpg. So let us code hard↵ | 2 | ↵ | |
3 | // here the gpg driver↵ | |||
4 | JSCFDriverManager.registerJSCFDriver(new GPGDriver());↵ | |||
5 | } catch (JSCFException e) {↵ | |||
6 | e.printStackTrace(↵ | 3 | Desktop.browse(url);↵ | |
4 | } catch (DesktopException e) {↵ | |||
5 | JOptionPane.showMessageDialog(FrameManager.getInstance()↵ | |||
6 | .getActiveFrame(), GlobalResourceLoader.getString(↵ | |||
7 | "org.columba.core.i18n.dialog", "error", "no_browser"),↵ | |||
7 | );↵ | 8 | "Error", JOptionPane.ERROR_MESSAGE);↵ | |
8 | } | 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.4 |
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 | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 25.6 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | try |
| 1 | try | |||||||||||||||||||||||||||||||||
|
| 2 | Desktop.browse(url); | ||||||||||||||||||||||||||||||||||
2 | JSCFDriverManager.registerJSCFDriver(new GPGDriver()); |
| |
Row | Violation |
---|---|
1 | Expression e.printStackTrace() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression e.printStackTrace() is a void method call, and thus it cannot be parameterized |
3 | Expression JOptionPane.showMessageDialog(FrameManager.getInstance().getActiveFrame(),GlobalResourceLoader.getString("org.columba.core.i18n.dialog","error","no_browser"),"Error",JOptionPane.ERROR_MESSAGE) is a void method call, and thus it cannot be parameterized |
4 | Expression e cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Type org.waffel.jscf.JSCFException of variable e does not match with type javax.swing.JOptionPane of variable JOptionPane |
6 | Expression e.printStackTrace() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Expression e.printStackTrace() is a void method call, and thus it cannot be parameterized |
8 | Expression JOptionPane.showMessageDialog(FrameManager.getInstance().getActiveFrame(),GlobalResourceLoader.getString("org.columba.core.i18n.dialog","error","no_browser"),"Error",JOptionPane.ERROR_MESSAGE) is a void method call, and thus it cannot be parameterized |
9 | Unmatched statement Desktop.browse(url); 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 |
10 | Unmatched statement JSCFDriverManager.registerJSCFDriver(new GPGDriver()); 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 |