try
{
//new ConvertToStringBufferCommand(_session.getSQLPanelAPI(_plugin)).execute();
new ConvertToStringBufferCommand(FrameWorkAcessor.getSQLPanelAPI(_session, _plugin)).execute();
}
catch (Throwable ex)
{
// i18n[editextras.convertStringBufErr=Error executing convert to StringBuffer command: {0}]
final String msg = s_stringMgr.getString("editextras.convertStringBufErr", ex);
_session.showErrorMessage(msg);
s_log.error(msg, ex);
}
if (Dialogs.showYesNo(_session.getSessionSheet(), MSG, TITLE))
{
try
{
new DropDatabaseCommand(_session, _plugin, dbs).execute();
treeAPI.removeNodes(nodes);
}
catch (Throwable th)
{
_session.showErrorMessage(th);
}
}
Clone fragments detected by clone detection tool
File path: /sql12/plugins/editextras/src/net/sourceforge/squirrel_sql/plugins/editextras/ConvertToStringBufferAction.java
|
|
File path: /sql12/plugins/mysql/src/net/sourceforge/squirrel_sql/plugins/mysql/action/DropDatabaseAction.java
|
Method name: void actionPerformed(ActionEvent)
|
|
Method name: void actionPerformed(ActionEvent)
|
Number of AST nodes: 2
|
|
Number of AST nodes: 4
|
|
1 | try↵ | | |
|
2 | {↵ | | |
|
|
3 | //new ConvertToStringBufferCommand(_session.getSQLPanelAPI(_plugin)).execute();↵ | | |
|
4 | new ConvertToStringBufferCommand(FrameWorkAcessor.getSQLPanelAPI↵ | | 1 | if (Dialogs.showYesNo(_session.getSessionSheet(), MSG, TITLE))↵
|
| | | 2 | {↵
|
| | | 3 | try↵
|
| | | 4 | {↵
|
5 | (_session, _plugin)).execute();↵ | | 5 | new DropDatabaseCommand(_session, _plugin, dbs).execute();↵
|
6 | }↵ | | 6 | ↵
|
7 | catch (Throwable ex)↵ | | 7 | ↵
|
8 | {↵ | | |
|
9 | // i18n[editextras.convertStringBufErr=Error executing convert to StringBuffer command: {0}]↵ | | |
|
10 | final String msg = s_stringMgr.getString("editextras.convertStringBufErr", ex);↵ | | |
|
| | | 8 | treeAPI.removeNodes(nodes);↵
|
| | | 9 | }↵
|
| | | 10 | catch (Throwable th)↵
|
| | | 11 | {↵
|
11 | _session.showErrorMessage(msg);↵ | | 12 | _session.showErrorMessage(th);↵
|
12 | s_log.error(msg, ex);↵ | | 13 | ↵
|
| | | 14 | }↵
|
13 | } | | 15 | }
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 0 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.1 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 1 |