public class CreateDriverCommand implements ICommand { /** Application API. */ private final IApplication _app; /** * Ctor. * * @param app Application API. */ public CreateDriverCommand(IApplication app) { super(); if (app == null) { throw new IllegalArgumentException("IApplication == null"); } _app = app; } public void execute() { _app.getWindowManager().showNewDriverInternalFrame()
public class CommitCommand implements ICommand { /** Current session. */ private ISession _session; /** * Ctor. * * @param session Current session. * * @throws IllegalArgumentException * Thrown if a <TT>null</TT> <TT>ISession</TT> passed. */ public CommitCommand(ISession session) { super(); if (session == null) { throw new IllegalArgumentException("Null ISession passed"); } _session = session; } /** * Commit the transaction. */ public void execute() { _session.commit()
Clone fragments detected by clone detection tool
File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/mainframe/action/CreateDriverCommand.java File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/session/action/CommitCommand.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
public class CreateDriverCommand implements ICommand
1
public class CommitCommand implements ICommand
2
{
2
{
3
	/** Application API. */
3
	/** 
4
	private final IApplication _app;
5
	/**
6
	 * Ctor.
7
	 *
8
	 * @param	app			Application API
4
Current session. */
5
	private ISession _session;
6
	/**
7
	 * Ctor.
8
	 *
9
	 * @param	session		Current session.
10
	 *
11
	 * @throws	IllegalArgumentException
9
.
12
	 *			Thrown if a <TT>null</TT> <TT>ISession</TT> passed.
10
	 */
13
	 */
11
	public CreateDriverCommand(IApplication app)
14
	public CommitCommand(ISession session)
12
	{
15
	{
13
		super();
16
		super();
14
		if (app == null)
17
		if (session == null)
15
		{
18
		{
16
			throw new IllegalArgumentException("IApplication == null");
19
			throw new IllegalArgumentException("
17
		}
18
		_app = app;
19
	}
20
	public void execute()
21
	{
22
		_app.getWindowManager().showNewDriverInternalFrame
20
Null ISession passed");
21
		}
22
		_session = session;
23
	}
24
	/**
25
	 * Commit the transaction.
26
	 */
27
	public void execute()
28
	{
23
()
29
		_session.commit()
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