File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/filter/FilterCompoundCommand.java | File path: /columba-1.4-src/core/src/main/java/org/columba/core/gui/externaltools/ExternalToolsDialog.java | |||
Method name: void FilterCompoundCommand(IFilter, IFolder, Object[])
|
Method name: void actionPerformed(ActionEvent)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | AbstractFilterAction instance = null;↵ | 1 | Abstract↵ | |
2 | // try to get instance of FilterAction↵ | 2 | ExternalToolsPlugin plugin = null;↵ | |
3 | try {↵ | 3 | try {↵ | |
4 | IExtension extension = pluginHandler.getExtension(name);↵ | 4 | IExtension extension = handler.getExtension(↵ | |
5 | instance = (AbstractFilterActio↵ | 5 | selection);↵ | |
6 | n) extension↵ | 6 | plugin = (AbstractExternalToolsPlugin) extension↵ | |
7 | .instanciateExtension(null);↵ | 7 | .instanciateExtension(null);↵ | |
8 | } catch (Exception ex) {↵ | 8 | } catch (Exception e1) {↵ | |
9 | ex.printStackTrace();↵ | 9 | e1.printStackTrace();↵ | |
10 | } | 10 |
| |
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 | 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) | 1.6 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 7 | AbstractExternalToolsPlugin plugin = null; | |||||||||||||||
7 | AbstractFilterAction instance = null; | | |||||||||||||||
8 | try |
| 8 | try | |||||||||||||
9 | IExtension extension = pluginHandler.getExtension(name); |
| 9 | IExtension extension = handler.getExtension(selection); | |||||||||||||
|
| 10 | plugin = (AbstractExternalToolsPlugin)extension.instanciateExtension(null); | ||||||||||||||
10 | instance = (AbstractFilterAction)extension.instanciateExtension(null); |
| |
Row | Violation |
---|---|
1 | Unmatched statement plugin=(AbstractExternalToolsPlugin)extension.instanciateExtension(null); 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 |
2 | Unmatched statement instance=(AbstractFilterAction)extension.instanciateExtension(null); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
3 | Unmatched statement instance=(AbstractFilterAction)extension.instanciateExtension(null); 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 |