public class CloseAllSessionsCommand 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 CloseAllSessionsCommand(IApplication app) throws IllegalArgumentException { super(); if (app == null) { throw new IllegalArgumentException("IApplication == null"); } _app = app; } /** * Close all sessions. */ public void execute() { _app.getSessionManager().closeAllSessions()
public class CloseAllSQLResultTabsCommand implements ICommand { private final ISQLPanelAPI _api; /** * Ctor. * * @param api * * @throws IllegalArgumentException * Thrown if a <TT>null</TT> <TT>ISQLPanelAPI</TT> passed. */ public CloseAllSQLResultTabsCommand(ISQLPanelAPI api) { super(); if (api == null) { throw new IllegalArgumentException("ISQLPanelAPI == null"); } _api = api; } public void execute() { _api.closeAllSQLResultTabs()
Clone fragments detected by clone detection tool
File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/mainframe/action/CloseAllSessionsCommand.java File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/session/action/CloseAllSQLResultTabsCommand.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
public class CloseAllSessionsCommand implements ICommand
1
public class CloseAllSQLResultTabsCommand implements ICommand
2
{
2
{
3
	/** Application API. */
3
	
4
	private final IApplication _app;
4
private final ISQLPanelAPI _api;
5
	/**
5
	/**
6
	 * Ctor.
6
	 * Ctor.
7
	 *
7
	 *
8
	 * @param	app	Application API.
8
	 * @param	api
9
	 *
9
	 *
10
	 * @throws	IllegalArgumentException
10
	 * @throws	IllegalArgumentException
11
	 *			Thrown if a <TT>null</TT> <TT>IApplication</TT> passed.
11
	 *			Thrown if a <TT>null</TT> <TT>ISQLPanelAPI</TT> passed.
12
	 */
12
	 */
13
	public CloseAllSessionsCommand(IApplication app)
13
	public CloseAllS
14
		throws IllegalArgumentException
14
QLResultTabsCommand(ISQLPanelAPI api)
15
	{
15
	{
16
		super();
16
		super();
17
		if (app == null)
17
		if (api == null)
18
		{
18
		{
19
			throw new IllegalArgumentException("IApplication == null");
19
			throw new IllegalArgumentException("ISQLPanelAPI == null");
20
		}
20
		}
21
		_app = app;
21
		_api = api;
22
	}
22
	}
23
	/**
24
	 * Close all sessions.
25
	 */
26
	public void execute()
23
	public void execute()
27
	{
24
	{
28
		_app.getSessionManager().closeAllSessions()
25
		_api.closeAllSQLResultTabs()
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