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()
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/session/action/CommitCommand.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 CommitCommand implements ICommand
1
public class RefreshObjectTreeItemCommand implements ICommand
2
{
2
{
3
	/** Current session. */
3
	/** The object tree that is to be refreshed. */
4
	private ISession _session;
4
	private 
5
final IObjectTreeAPI _tree;
6

5
	/**
7
	/**
6
	 * Ctor.
8
	 * Ctor.
7
	 *
9
	 *
8
	 * @param	session		Current session.
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>ISession</TT> passed.
13
	 *			Thrown if a <TT>null</TT> <TT>IObjectTreeAPI</TT> passed.
12
	 */
14
	 */
13
	public CommitCommand(ISession session)
15
	public RefreshObjectTreeItemCommand(IObjectTreeAPI tree)
14
	{
16
	{
15
		super();
17
		super();
16
		if (session == null)
18
		if (tree == null)
17
		{
19
		{
18
			throw new IllegalArgumentException("Null ISession passed");
20
			throw new IllegalArgumentException("IObjectTreeAPI == null");
19
		}
21
		}
20
		_session = session;
22
		_
21
	}
23
tree = tree;
24
	}
25

22
	/**
26
	/**
23
	 * Commit the transaction.
27
	 * Refresh tree.
24
	 */
28
	 */
25
	public void execute()
29
	public void execute()
26
	{
30
	{
27
		_session.commit()
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