try {
if (extension != null)
a = (AbstractColumbaAction) extension
.instanciateExtension(new Object[] { frameMediator });
} catch (PluginException e) {
LOG.severe(e.getMessage());
if (Logging.DEBUG)
e.printStackTrace();
}
try {
if (extension != null)
a = (AbstractColumbaAction) extension
.instanciateExtension(new Object[] { controller });
} catch (PluginException e) {
LOG.severe(e.getMessage());
if (Logging.DEBUG)
e.printStackTrace();
}
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/core/src/main/java/org/columba/core/gui/toolbar/ToolBarXMLDecoder.java
|
|
File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/composer/html/HtmlToolbar.java
|
Method name: AbstractColumbaAction getAction(String, IFrameMediator)
|
|
Method name: AbstractColumbaAction getAction(String, IFrameMediator)
|
Number of AST nodes: 3
|
|
Number of AST nodes: 3
|
|
1 | try {↵ | | 1 | try {↵
|
2 | if (extension != null)↵ | | 2 | if (extension != null)↵
|
3 | a = (AbstractColumbaAction) extension↵ | | 3 | a = (AbstractColumbaAction) extension↵
|
4 | .instanciateExtension(new Object[] { frameMediator });↵ | | 4 | .instanciateExtension(new Object[] { controller });↵
|
5 | } catch (PluginException e) {↵ | | 5 | } catch (PluginException e) {↵
|
6 | LOG.severe(e.getMessage());↵ | | 6 | LOG.severe(e.getMessage());↵
|
7 | if (Logging.DEBUG)↵ | | 7 | if (Logging.DEBUG)↵
|
8 | e.printStackTrace();↵ | | 8 | e.printStackTrace();↵
|
|
9 | } | | 9 | }
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.3 |
Clones location | Clones are in different classes |
Number of node comparisons | 5 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 3 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 0.5 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
7 | try | | 7 | try |
8 | | | 8 | |
9 | a = (AbstractColumbaAction)extension.instanciateExtension(new Object[] {frameMediator}); | | 9 | a = (AbstractColumbaAction)extension.instanciateExtension(new Object[] {controller}); |
Precondition Violations (0)
Row |
Violation |