public class CreateAliasCommand 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 CreateAliasCommand(IApplication app) { super(); if (app == null) { throw new IllegalArgumentException("IApplication == null"); } _app = app; } /** * Execute command. */ public void execute() { _app.getWindowManager().showNewAliasInternalFrame()
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/CreateAliasCommand.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 CreateAliasCommand 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 CreateAliasCommand(IApplication app)
15
	public RefreshObjectTreeItemCommand(IObjectTreeAPI tree)
14
	{
16
	{
15
		super();
17
		super();
16
		if (app == null)
18
		if (tree == null)
17
		{
19
		{
18
			throw new IllegalArgumentException("IApplication == null");
20
			throw new IllegalArgumentException("IObjectTreeAPI == null");
19
		}
21
		}
20
		_app = app;
22
		_
21
	}
23
tree = tree;
24
	}
25

22
	/**
26
	/**
23
	 * Execute command.
27
	 * Refresh tree.
24
	 */
28
	 */
25
	public void execute()
29
	public void execute()
26
	{
30
	{
27
		_app.getWindowManager().showNewAliasInternalFrame()
31
		_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