AbstractColumbaAction a = null;
try {
if (extension != null)
a = (AbstractColumbaAction) extension
.instanciateExtension(new Object[] { frameMediator });
} catch (PluginException e) {
LOG.severe(e.getMessage());
if (Logging.DEBUG)
e.printStackTrace();
}
return a;
AbstractColumbaAction a = null;
try {
if (extension != null)
a = (AbstractColumbaAction) extension
.instanciateExtension(new Object[] { controller });
} catch (Exception e) {
LOG.severe(e.getMessage());
if (Logging.DEBUG)
e.printStackTrace();
}
return a;
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/core/src/main/java/org/columba/core/gui/menu/MenuXMLDecoder.java
|
Method name: AbstractColumbaAction getAction(String, IFrameMediator)
|
|
Method name: AbstractColumbaAction getAction(String, IFrameMediator)
|
Number of AST nodes: 5
|
|
Number of AST nodes: 5
|
|
1 | AbstractColumbaAction a = null;↵ | | 1 | AbstractColumbaAction a = null;↵
|
|
2 | try {↵ | | 2 | try {↵
|
3 | if (extension != null)↵ | | 3 | if (extension != null)↵
|
4 | a = (AbstractColumbaAction) extension↵ | | 4 | a = (AbstractColumbaAction) extension↵
|
5 | .instanciateExtension(new Object[] { frameMediator });↵ | | 5 | .instanciateExtension(new Object[] { controller });↵
|
6 | } catch (PluginException e) {↵ | | 6 | } catch (Exception e) {↵
|
7 | LOG.severe(e.getMessage());↵ | | 7 | LOG.severe(e.getMessage());↵
|
8 | if (Logging.DEBUG)↵ | | 8 | if (Logging.DEBUG)↵
|
9 | e.printStackTrace();↵ | | 9 | e.printStackTrace();↵
|
|
10 | }↵ | | 10 | }↵
|
|
11 | return a; | | 11 | return a;
|
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 | 9 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 5 |
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.7 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
6 | AbstractColumbaAction a = null; | | 6 | AbstractColumbaAction a = null; |
7 | try | | 7 | try |
8 | | | 8 | |
9 | a = (AbstractColumbaAction)extension.instanciateExtension(new Object[] {frameMediator}); | | 9 | a = (AbstractColumbaAction)extension.instanciateExtension(new Object[] {controller}); |
10 | return a; | | 10 | return a; |
Precondition Violations (0)
Row |
Violation |