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 RefreshObjectTreeItemCommand implements ICommand { /** The object tree that is to be refreshed. */ private final IObjectTreeAPI _tree; /** * Ctor. * * @param tree The object tree to be refreshed. * * @throws IllegalArgumentException * Thrown if a <TT>null</TT> <TT>IObjectTreeAPI</TT> passed. */ public RefreshObjectTreeItemCommand(IObjectTreeAPI tree) { super(); if (tree == null) { throw new IllegalArgumentException("IObjectTreeAPI == null"); } _tree = tree; } /** * Refresh tree. */ public void execute() { _tree.refreshSelectedNodes()
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/RefreshObjectTreeItemCommand.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
public class CloseAllButCurrentSessionsCommand implements ICommand
1
public class RefreshObjectTreeItemCommand implements ICommand
2
{
2
{
3
	/** Application API. */
3
	/** The object tree that is to be refreshed. */
4
	private final IApplication _app;
4
	private final I
5
ObjectTreeAPI _tree;
6

5
	/**
7
	/**
6
	 * Ctor.
8
	 * Ctor.
7
	 *
9
	 *
8
	 * @param	app	Application API.
10
	 * @param	tree	The object tree to be refreshed.
9
	 *
11
	 *
10
	 * @throws	IllegalArgumentException
12
	 * @throws	IllegalArgumentException
11
	 *			Thrown if a <TT>null</TT> <TT>IApplication</TT> passed.
13
	 *			Thrown if a <TT>null</TT> <TT>IObjectTreeAPI</TT> passed.
12
	 */
14
	 */
13
	public CloseAllButCurrentSessionsCommand(IApplication app)
15
	public 
14
		throws IllegalArgumentException
16
RefreshObjectTreeItemCommand(IObjectTreeAPI tree)
15
	{
17
	{
16
		super();
18
		super();
17
		if (app == null)
19
		if (tree == null)
18
		{
20
		{
19
			throw new IllegalArgumentException("IApplication == null");
21
			throw new IllegalArgumentException("IObjectTreeAPI == null");
20
		}
22
		}
23

21
		_app = app;
24
		_
22
	}
25
tree = tree;
26
	}
27

23
	/**
28
	/**
24
	 * Close all sessions.
29
	 * Refresh tree.
25
	 */
30
	 */
26
	public void execute()
31
	public void execute()
27
	{
32
	{
28
      _app.getSessionManager().closeAllButCurrentSession
29
s()
33
		_tree.refreshSelectedNodes()
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