if (_session != null) { try { //new InQuotesCommand(_session.getSQLPanelAPI(_plugin)).execute(); new InQuotesCommand(FrameWorkAcessor.getSQLPanelAPI(_session, _plugin)).execute(); } catch (Throwable ex) { // i18n[editextras.errorQuoteSql=Error processing Quote SQL command: {0}] final String msg = s_stringMgr.getString("editextras.errorQuoteSql", ex); _session.showErrorMessage(msg); s_log.error(msg, ex); } }
if (_session != null) { 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/InQuotesAction.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: 3 Number of AST nodes: 3
1
if (_session != null)
1
if (_session != null)
2
		{
2
		{
3
			try
3
			try
4
			{
4
			{
5
				//new InQuotesCommand(_session.getSQLPanelAPI(_plugin)).execute();
5
				//new RemoveQuotesCommand(_session.getSQLPanelAPI(_plugin)).execute();
6
				new InQuotesCommand(FrameWorkAcessor.getSQLPanelAPI(_session, _plugin)).execute();
6
				new RemoveQuotesCommand(FrameWorkAcessor.getSQLPanelAPI(_session, _plugin)).execute();
7
			}
7
			}
8
			catch (Throwable ex)
8
			catch (Throwable ex)
9
			{
9
			{
10
				// i18n[editextras.errorQuoteSql=Error processing Quote SQL command: {0}]
10
				// i18n[editextras.errorRemoveQuotes=Error processing Remove Quotes SQL command: {0}]
11
				final String msg = s_stringMgr.getString("editextras.errorQuoteSql", ex);
11
				final String msg = s_stringMgr.getString("editextras.errorRemoveQuotes", ex);
12
				_session.showErrorMessage(msg);
12
				_session.showErrorMessage(msg);
13
				s_log.error(msg, ex);
13
				s_log.error(msg, ex);
14
			}
14
			}
15
		}
15
		}
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.4
Clones locationClones are in different classes having the same super class
Number of node comparisons5
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements3
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)7.4
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (_session != null)
    1
    if (_session != null)
    2
    try
    2
    try
    2
    try
    Differences
    Expression1Expression2Difference
    "editextras.errorQuoteSql""editextras.errorRemoveQuotes"LITERAL_VALUE_MISMATCH
    2
    try
    3
    new InQuotesCommand(FrameWorkAcessor.getSQLPanelAPI(_session, _plugin)).execute();
    3
    new InQuotesCommand(FrameWorkAcessor.getSQLPanelAPI(_session, _plugin)).execute();
    3
    new RemoveQuotesCommand(FrameWorkAcessor.getSQLPanelAPI(_session, _plugin)).execute();
    Differences
    Expression1Expression2Difference
    net.sourceforge.squirrel_sql.plugins.editextras.InQuotesCommandnet.sourceforge.squirrel_sql.plugins.editextras.RemoveQuotesCommandSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression new InQuotesCommand(FrameWorkAcessor.getSQLPanelAPI(_session,_plugin)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression new RemoveQuotesCommand(FrameWorkAcessor.getSQLPanelAPI(_session,_plugin)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3
    new RemoveQuotesCommand(FrameWorkAcessor.getSQLPanelAPI(_session, _plugin)).execute();
    Precondition Violations (2)
    Row Violation
    1Expression new InQuotesCommand(FrameWorkAcessor.getSQLPanelAPI(_session,_plugin)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression new RemoveQuotesCommand(FrameWorkAcessor.getSQLPanelAPI(_session,_plugin)) cannot be parameterized, because it has dependencies to/from statements that will be extracted