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);
}
try
{
//new RemoveQuotesCommand(_session.getSQLPanelAPI(_plugin)).execute();
new RemoveQuotesCommand(FrameWorkAcessor.getSQLPanelAPI(_session, _plugin)).execute();
}
catch (Throwable ex)
{
// i18n[editextras.errorRemoveQuotes=Error processing Remove Quotes SQL command: {0}]
final String msg = s_stringMgr.getString("editextras.errorRemoveQuotes", ex);
_session.showErrorMessage(msg);
s_log.error(msg, ex);
}
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/editextras/src/net/sourceforge/squirrel_sql/plugins/editextras/RemoveQuotesAction.java
|
Method name: void actionPerformed(ActionEvent)
|
|
Method name: void actionPerformed(ActionEvent)
|
Number of AST nodes: 2
|
|
Number of AST nodes: 2
|
|
1 | try↵ | | 1 | try↵
|
2 | {↵ | | 2 | {↵
|
|
3 | //new ConvertToStringBufferCommand(_session.getSQLPanelAPI(_plugin)).execute();↵ | | 3 | //new RemoveQuotesCommand(_session.getSQLPanelAPI(_plugin)).execute();↵
|
4 | new ConvertToStringBufferCommand(FrameWorkAcessor.getSQLPanelAPI(_session, _plugin)).execute();↵ | | 4 | new RemoveQuotesCommand(FrameWorkAcessor.getSQLPanelAPI(_session, _plugin)).execute();↵
|
5 | }↵ | | 5 | }↵
|
6 | catch (Throwable ex)↵ | | 6 | catch (Throwable ex)↵
|
7 | {↵ | | 7 | {↵
|
8 | // i18n[editextras.convertStringBufErr=Error executing convert to StringBuffer command: {0}]↵ | | 8 | // i18n[editextras.errorRemoveQuotes=Error processing Remove Quotes SQL command: {0}]↵
|
9 | final String msg = s_stringMgr.getString("editextras.convertStringBufErr", ex);↵ | | 9 | final String msg = s_stringMgr.getString("editextras.errorRemoveQuotes", ex);↵
|
|
10 | _session.showErrorMessage(msg);↵ | | 10 | _session.showErrorMessage(msg);↵
|
11 | s_log.error(msg, ex);↵ | | 11 | s_log.error(msg, ex);↵
|
12 | } | | 12 | }
|
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.4 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 5 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 2 |
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) | 7.1 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
2 | try | | 2 | try |
3 | new ConvertToStringBufferCommand(FrameWorkAcessor.getSQLPanelAPI(_session, _plugin)).execute(); | | 3 | new RemoveQuotesCommand(FrameWorkAcessor.getSQLPanelAPI(_session, _plugin)).execute(); |
Precondition Violations (0)
Row |
Violation |