public class GotoNextResultsTabAction extends SquirrelAction implements ISQLPanelAction { /** Logger for this class. */ private final static ILogger s_log = LoggerController.createLogger(GotoNextResultsTabAction.class); /** Current panel. */ private ISQLPanelAPI _panel; /** Command that will be executed by this action. */ private ICommand _cmd; /** * Ctor specifying Application API. * * @param app Application API. */ public GotoNextResultsTabAction(IApplication app) { super(app); } public void setSQLPanel(ISQLPanelAPI panel) { _panel = panel; _cmd = null; setEnabled(null != _panel); } /** * Display the next results tab. * * @param evt Event being executed. */ public synchronized void actionPerformed(ActionEvent evt) { 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);
public class GotoPreviousResultsTabAction extends SquirrelAction implements ISQLPanelAction { /** Logger for this class. */ private final static ILogger s_log = LoggerController.createLogger(GotoPreviousResultsTabAction.class); /** Current panel. */ private ISQLPanelAPI _panel; /** Command that will be executed by this action. */ private ICommand _cmd; /** * Ctor specifying Application API. * * @param app Application API. */ public GotoPreviousResultsTabAction(IApplication app) { super(app); } public void setSQLPanel(ISQLPanelAPI panel) { _panel = panel; _cmd = null; setEnabled(null != _panel); } /** * Display the previous results tab. * * @param evt Event being executed. */ public synchronized void actionPerformed(ActionEvent evt) { 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);
Clone fragments detected by clone detection tool
File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/session/action/GotoNextResultsTabAction.java File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/session/action/GotoPreviousResultsTabAction.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
public class GotoNextResultsTabAction extends SquirrelAction
1
public class GotoPreviousResultsTabAction extends SquirrelAction
2
										implements ISQLPanelAction
2
											implements ISQLPanelAction
3
{
3
{
4
	/** Logger for this class. */
4
	/** Logger for this class. */
5
	private final static ILogger s_log =
5
	private final static ILogger s_log =
6
		LoggerController.createLogger(GotoNextResultsTabAction.class);
6
		LoggerController.createLogger(GotoPreviousResultsTabAction.class);
7
	/** Current panel. */
7
	/** Current panel. */
8
	private ISQLPanelAPI _panel;
8
	private ISQLPanelAPI _panel;
9
	/** Command that will be executed by this action. */
9
	/** Command that will be executed by this action. */
10
	private ICommand _cmd;
10
	private ICommand _cmd;
11
	/**
11
	/**
12
	 * Ctor specifying Application API.
12
	 * Ctor specifying Application API.
13
	 *
13
	 *
14
	 * @param	app	Application API.
14
	 * @param	app	Application API.
15
	 */
15
	 */
16
	public GotoNextResultsTabAction(IApplication app)
16
	public GotoPreviousResultsTabAction(IApplication app)
17
	{
17
	{
18
		super(app);
18
		super(app);
19
	}
19
	}
20
	public void setSQLPanel(ISQLPanelAPI panel)
20
	public void setSQLPanel(ISQLPanelAPI panel)
21
	{
21
	{
22
		_panel = panel;
22
		_panel = panel;
23
		_cmd = null;
23
		_cmd = null;
24
      setEnabled(null != _panel);
24
      setEnabled(null != _panel);
25
	}
25
	}
26
	/**
26
	/**
27
	 * Display the next results tab.
27
	 * Display the previous results tab.
28
	 *
28
	 *
29
	 * @param	evt		Event being executed.
29
	 * @param	evt		Event being executed.
30
	 */
30
	 */
31
	public synchronized void actionPerformed(ActionEvent evt)
31
	public synchronized void actionPerformed(ActionEvent evt)
32
	{
32
	{
33
		if (_panel != null)
33
		if (_panel != null)
34
		{
34
		{
35
			if (_cmd == null)
35
			if (_cmd == null)
36
			{
36
			{
37
				_cmd = new GotoNextResultsTabCommand(_panel);
37
				_cmd = new GotoPreviousResultsTabCommand(_panel);
38
			}
38
			}
39
			try
39
			try
40
			{
40
			{
41
				_cmd.execute();
41
				_cmd.execute();
42
			}
42
			}
43
			catch (Throwable ex)
43
			catch (Throwable ex)
44
			{
44
			{
45
				final String msg = "Error occured seting current results tab";
45
				final String msg = "Error occured seting current results tab";
46
				_panel.getSession().showErrorMessage(msg + ": " + ex);
46
				_panel.getSession().showErrorMessage(msg + ": " + ex);
47
				s_log.error(msg, ex);
47
				s_log.error(msg, ex);
48
			
48
			
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones location
Number of node comparisons0