try
{
_setHandled.invoke(applicationEvent, new Object[]{Boolean.TRUE});
_app.getMainFrame().dispose();
}
catch (Exception e)
{
throw new RuntimeException(e);
}
try
{
_setHandled.invoke(applicationEvent, new Object[]{Boolean.TRUE});
new AboutCommand(_app).execute();
}
catch (Exception e)
{
throw new RuntimeException(e);
}
Clone fragments detected by clone detection tool
File path: /sql12/plugins/macosx/src/net/sourceforge/squirrel_sql/plugins/macosx/ApplicationListenerInvocationHandler.java
|
|
File path: /sql12/plugins/macosx/src/net/sourceforge/squirrel_sql/plugins/macosx/ApplicationListenerInvocationHandler.java
|
Method name: void handleQuit(Object)
|
|
Method name: void handleAbout(Object)
|
Number of AST nodes: 3
|
|
Number of AST nodes: 3
|
|
1 | try↵ | | 1 | try↵
|
2 | {↵ | | 2 | {↵
|
3 | _setHandled.invoke(applicationEvent, new Object[]{Boolean.TRUE});↵ | | 3 | _setHandled.invoke(applicationEvent, new Object[]{Boolean.TRUE});↵
|
4 | _app.getMainFrame().dispose();↵ | | 4 | new AboutCommand(_app).execute();↵
|
5 | }↵ | | 5 | }↵
|
6 | catch (Exception e)↵ | | 6 | catch (Exception e)↵
|
7 | {↵ | | 7 | {↵
|
8 | throw new RuntimeException(e);↵ | | 8 | throw new RuntimeException(e);↵
|
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.1 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 9 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 2 |
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) | 13.8 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | try | | 1 | try |
2 | _setHandled.invoke(applicationEvent, new Object[] {Boolean.TRUE}); | | 2 | _setHandled.invoke(applicationEvent, new Object[] {Boolean.TRUE}); |
| | | 3 | new AboutCommand(_app).execute(); |
3 | _app.getMainFrame().dispose(); | | | |
Precondition Violations (0)
Row |
Violation |