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 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)
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/CopyDriverCommand.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
public class CopyAliasCommand implements ICommand
1
public class CopyDriverCommand 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 copied. */
6
   private final SQLAlias _sqlAlias;
6
	private final ISQL
7
   
7
Driver _sqlDriver;
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 copied.
14
    *
15
   
13
	 *
16
 * @throws	IllegalArgumentException
14
	 * @throws	IllegalArgumentException
17
    *			Thrown if a <TT>null</TT> <TT>ISQLAlias</TT> or
15
	 *			Thrown if a <TT>null</TT> <TT>ISQLDriver</TT>
18
    *			<tt>IApplication</tt> passed.
16
 passed.
19
    */
17
	 */
20
   public CopyAliasCommand(IApplication app, SQLAlias sqlAlias)
18
	public CopyDriverCommand(IApplication app, ISQL
21
   {
22
      
19
Driver sqlDriver)
20
		throws IllegalArgumentException
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
      
26
		}
30
if (sqlAlias == null)
27
		if (sqlDriver == null)
31
      {
32
         
28
		{
33
throw new IllegalArgumentException("Null ISQLAlias passed");
29
			throw new IllegalArgumentException("
34
      }
35
      
30
ISQLDriver == null");
31
		}
36
_app = app;
32
		_app = app;
37
      _sqlAlias = sqlAlias;
38
   }
39
   
33
		_sqlDriver = sqlDriver;
34
	}
40
public void execute()
35
	public void execute()
41
   {
42
      
36
	{
43
_app.getWindowManager().showCopyAliasInternalFrame(_sqlAlias)
37
		_app.getWindowManager().showCopyDriverInternalFrame(_sqlDriver)
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