if (_panel != null) { if (_cmd == null) { _cmd = new GotoPreviousResultsTabCommand(_panel); } try { _cmd.execute(); } catch (Throwable ex) { final String msg = "Error occured seting current results tab"; _panel.getSession().showErrorMessage(msg + ": " + ex); s_log.error(msg, ex); } }
if (_panel != null) { if (_cmd == null) { _cmd = new GotoNextResultsTabCommand(_panel); } try { _cmd.execute(); } catch (Throwable ex) { final String msg = "Error occured seting current results tab"; _panel.getSession().showErrorMessage(msg + ": " + ex); s_log.error(msg, ex); } }
Clone fragments detected by clone detection tool
File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/session/action/GotoPreviousResultsTabAction.java File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/session/action/GotoNextResultsTabAction.java
Method name: void actionPerformed(ActionEvent) Method name: void actionPerformed(ActionEvent)
Number of AST nodes: 5 Number of AST nodes: 5
1
if (_panel != null)
1
if (_panel != null)
2
		{
2
		{
3
			if (_cmd == null)
3
			if (_cmd == null)
4
			{
4
			{
5
				_cmd = new GotoPreviousResultsTabCommand(_panel);
5
				_cmd = new GotoNextResultsTabCommand(_panel);
6
			}
6
			}
7
			try
7
			try
8
			{
8
			{
9
				_cmd.execute();
9
				_cmd.execute();
10
			}
10
			}
11
			catch (Throwable ex)
11
			catch (Throwable ex)
12
			{
12
			{
13
				final String msg = "Error occured seting current results tab";
13
				final String msg = "Error occured seting current results tab";
14
				_panel.getSession().showErrorMessage(msg + ": " + ex);
14
				_panel.getSession().showErrorMessage(msg + ": " + ex);
15
				s_log.error(msg, ex);
15
				s_log.error(msg, ex);
16
			}
16
			}
17
		}
17
		}
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.7
Clones locationClones are in different classes having the same super class
Number of node comparisons11
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements5
    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.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (_panel != null)
    1
    if (_panel != null)
    2
    if (_cmd == null)
    2
    if (_cmd == null)
    3
    _cmd = new GotoPreviousResultsTabCommand(_panel);
    3
    _cmd = new GotoPreviousResultsTabCommand(_panel);
    3
    _cmd = new GotoNextResultsTabCommand(_panel);
    Differences
    Expression1Expression2Difference
    net.sourceforge.squirrel_sql.client.session.action.GotoPreviousResultsTabCommandnet.sourceforge.squirrel_sql.client.session.action.GotoNextResultsTabCommandSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression new GotoPreviousResultsTabCommand(_panel) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression new GotoNextResultsTabCommand(_panel) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3
    _cmd = new GotoNextResultsTabCommand(_panel);
    4
    try
    4
    try
    5
    _cmd.execute();
    5
    _cmd.execute();
    Precondition Violations (2)
    Row Violation
    1Expression new GotoPreviousResultsTabCommand(_panel) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression new GotoNextResultsTabCommand(_panel) cannot be parameterized, because it has dependencies to/from statements that will be extracted