public class CloseAllButCurrentSessionsCommand implements ICommand { /** Application API. */ private final IApplication _app; /** * Ctor. * * @param app Application API. * * @throws IllegalArgumentException * Thrown if a <TT>null</TT> <TT>IApplication</TT> passed. */ public CloseAllButCurrentSessionsCommand(IApplication app) throws IllegalArgumentException { super(); if (app == null) { throw new IllegalArgumentException("IApplication == null"); } _app = app; } /** * Close all sessions. */ public void execute() { _app.getSessionManager().closeAllButCurrentSessions()
public class GotoNextResultsTabCommand implements ICommand { /** The current panel. */ private final ISQLPanelAPI _panel; /** * Ctor. * * @param panel The SQL Panel we want to display the next results * tab for. * * @throws IllegalArgumentException * Thrown if a <TT>null</TT> <TT>ISQLPanelAPI</TT> passed. */ public GotoNextResultsTabCommand(ISQLPanelAPI panel) { super(); if (panel == null) { throw new IllegalArgumentException("ISQLPanelAPI == null"); } _panel = panel; } /** * Display the next results tab. */ public void execute() { _panel.gotoNextResultsTab()
Clone fragments detected by clone detection tool
File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/mainframe/action/CloseAllButCurrentSessionsCommand.java File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/session/action/GotoNextResultsTabCommand.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
public class CloseAllButCurrentSessionsCommand implements ICommand
1
public class GotoNextResultsTabCommand implements ICommand
2
{
2
{
3
	/** Application API. */
3
	/** The current panel. */
4
	private final IApplication _app;
4
	private final I
5
SQLPanelAPI _panel;
6

5
	/**
7
	/**
6
	 * Ctor.
8
	 * Ctor.
7
	 *
9
	 *
8
	 * @param	app	Application API.
10
	 * @param	panel	The SQL Panel we want to display the next results
11
	 *					tab for.
9
	 *
12
	 *
10
	 * @throws	IllegalArgumentException
13
	 * @throws	IllegalArgumentException
11
	 *			Thrown if a <TT>null</TT> <TT>IApplication</TT> passed.
14
	 *			Thrown if a <TT>null</TT> <TT>ISQLPanelAPI</TT> passed.
12
	 */
15
	 */
13
	public CloseAllButCurrentSessionsCommand(IApplication app)
16
	public 
14
		throws IllegalArgumentException
17
GotoNextResultsTabCommand(ISQLPanelAPI panel)
15
	{
18
	{
16
		super();
19
		super();
17
		if (app == null)
20
		if (panel == null)
18
		{
21
		{
19
			throw new IllegalArgumentException("IApplication == null");
22
			throw new IllegalArgumentException("ISQLPanelAPI == null");
20
		}
23
		}
24

21
		_app = app;
25
		_
22
	}
26
panel = panel;
27
	}
28

23
	/**
29
	/**
24
	 * Close all sessions.
30
	 * Display the next results tab.
25
	 */
31
	 */
26
	public void execute()
32
	public void execute()
27
	{
33
	{
28
      _app.getSessionManager().closeAllButCurrentSessions
29
()
34
		_panel.gotoNextResultsTab()
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