public class CopyDriverCommand implements ICommand { /** Application API. */ private final IApplication _app; /** <TT>ISQLDriver</TT> to be copied. */ private final ISQLDriver _sqlDriver; /** * Ctor. * * @param app Application API. * @param sqlDriver <TT>ISQLDriver</TT> to be copied. * * @throws IllegalArgumentException * Thrown if a <TT>null</TT> <TT>ISQLDriver</TT> passed. */ public CopyDriverCommand(IApplication app, ISQLDriver sqlDriver) throws IllegalArgumentException { super(); if (app == null) { throw new IllegalArgumentException("IApplication == null"); } if (sqlDriver == null) { throw new IllegalArgumentException("ISQLDriver == null"); } _app = app; _sqlDriver = sqlDriver; } public void execute() { _app.getWindowManager().showCopyDriverInternalFrame(_sqlDriver)
public class ModifyDriverCommand implements ICommand { /** Application API. */ private final IApplication _app; /** <TT>ISQLDriver</TT> to be modified. */ private ISQLDriver _driver; /** * Ctor. * * @param app Application API. * @param sqlDriver <TT>ISQLDriver</TT> to be modified. * * @throws IllegalArgumentException * Thrown if a <TT>null</TT> <IApplication</tt> or * <TT>ISQLDriver</TT> passed. */ public ModifyDriverCommand(IApplication app, ISQLDriver driver) { super(); if (app == null) { throw new IllegalArgumentException("IApplication == null"); } if (driver == null) { throw new IllegalArgumentException("ISQLDriver == null"); } _app = app; _driver = driver; } /** * Display a dialog allowing user to maintain the <TT>ISQLDriver</TT>. */ public void execute() { _app.getWindowManager().showModifyDriverInternalFrame(_driver)
Clone fragments detected by clone detection tool
File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/mainframe/action/CopyDriverCommand.java File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/mainframe/action/ModifyDriverCommand.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
public class CopyDriverCommand implements ICommand
1
public class ModifyDriverCommand implements ICommand
2
{
2
{
3
	/** Application API. */
3
	/** Application API. */
4
	private final IApplication _app;
4
	private final IApplication _app;
5
	/** <TT>ISQLDriver</TT> to be copied. */
5
	/** <TT>ISQLDriver</TT> to be modified. */
6
	private final ISQLDriver _sqlDriver;
6
	private ISQLDriver _driver;
7
	/**
7
	/**
8
	 * Ctor.
8
	 * Ctor.
9
	 *
9
	 *
10
	 * @param	app			Application API.
10
	 * @param	app			Application API.
11
	 * @param	sqlDriver	<TT>ISQLDriver</TT> to be copied.
11
	 * @param	sqlDriver	<TT>ISQLDriver</TT> to be modified.
12
	 *
12
	 *
13
	 * @throws	IllegalArgumentException
13
	 * @throws	IllegalArgumentException
14
	 *			Thrown if a <TT>null</TT> 
14
	 *			Thrown if a <TT>null</TT> <IApplication</tt> or
15
<TT>ISQLDriver</TT> passed.
15
	 *			<TT>ISQLDriver</TT> passed.
16
	 */
16
	 */
17
	public CopyDriverCommand(IApplication app, ISQLDriver sqlDriver)
17
	public ModifyDriverCommand(IApplication app, ISQLDriver driver)
18
		throws IllegalArgumentException
18
	
19
	{
19
{
20
		super();
20
		super();
21
		if (app == null)
21
		if (app == null)
22
		{
22
		{
23
			throw new IllegalArgumentException("IApplication == null");
23
			throw new IllegalArgumentException("IApplication == null");
24
		}
24
		}
25
		if (sqlDriver == null)
25
		if (driver == null)
26
		{
26
		{
27
			throw new IllegalArgumentException("ISQLDriver == null");
27
			throw new IllegalArgumentException("ISQLDriver == null");
28
		}
28
		}
29
		_app = app;
29
		_app = app;
30
		_sqlDriver = sqlDriver;
30
		_driver = 
31
	}
31
driver;
32
	}
33
	/**
34
	 * Display a dialog allowing user to maintain the <TT>ISQLDriver</TT>.
35
	 */
32
	public void execute()
36
	public void execute()
33
	{
37
	{
34
		_app.getWindowManager().showCopyDriverInternalFrame(_sqlDriver)
38
		_app.getWindowManager().showModifyDriverInternalFrame(_driver)
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