public class CopyAliasCommand implements ICommand { /** Application API. */ private final IApplication _app; /** <TT>ISQLAlias</TT> to be copied. */ private final SQLAlias _sqlAlias; /** * Ctor. * * @param app Application API. * @param sqlAlias <TT>ISQLAlias</TT> to be copied. * * @throws IllegalArgumentException * Thrown if a <TT>null</TT> <TT>ISQLAlias</TT> or * <tt>IApplication</tt> passed. */ public CopyAliasCommand(IApplication app, SQLAlias sqlAlias) { super(); if (app == null) { throw new IllegalArgumentException("IApplication == null"); } if (sqlAlias == null) { throw new IllegalArgumentException("Null ISQLAlias passed"); } _app = app; _sqlAlias = sqlAlias; } public void execute() { _app.getWindowManager().showCopyAliasInternalFrame(_sqlAlias)
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/CopyAliasCommand.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 CopyAliasCommand 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>ISQLAlias</TT> to be copied. */
5
	/** <TT>ISQLDriver</TT> to be modified. */
6
   private final SQLAlias _sqlAlias;
6
	private 
7
   
7
ISQLDriver _driver;
8
/**
8
	/**
9
    * Ctor.
9
	 * Ctor.
10
    *
11
   
10
	 *
12
 * @param	app			Application API.
11
	 * @param	app			Application API.
13
    * @param	sqlAlias	<TT>ISQLAlias</TT> to be copied.
12
	 * @param	sqlDriver	<TT>ISQLDriver</TT> to be 
14
    *
15
   
13
modified.
14
	 *
16
 * @throws	IllegalArgumentException
15
	 * @throws	IllegalArgumentException
17
    *			Thrown if a <TT>null</TT> <TT>ISQLAlias</TT> or
16
	 *			Thrown if a <TT>null</TT> <IApplication</tt> or
18
    *			<tt>IApplication</tt> passed.
17
	 *			<TT>ISQLDriver</TT> passed.
19
    */
18
	 */
20
   public CopyAliasCommand(IApplication app, SQLAlias sqlAlias)
19
	public ModifyDriverCommand(IApplication app, ISQL
21
   {
22
      
20
Driver driver)
21
	{
23
super();
22
		super();
24
      if (app == null)
23
		if (app == null)
25
      {
26
         
24
		{
27
throw new IllegalArgumentException("IApplication == null");
25
			throw new IllegalArgumentException("IApplication == null");
28
      }
29
      if (sqlAlias == null)
30
      {
31
         
26
		}
27
		if (driver == null)
28
		{
32
throw new IllegalArgumentException("Null ISQLAlias passed");
29
			throw new IllegalArgumentException("
33
      }
34
      _app = app;
35
      _sqlAlias = sqlAlias;
36
   }
37
   
30
ISQLDriver == null");
31
		}
32
		_app = app;
33
		_driver = driver;
34
	}
35
	/**
36
	 * Display a dialog allowing user to maintain the <TT>ISQLDriver</TT>.
37
	 */
38
public void execute()
38
	public void execute()
39
   {
40
      
39
	{
41
_app.getWindowManager().showCopyAliasInternalFrame(_sqlAlias)
40
		_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