public class CloseSessionAction extends SquirrelAction implements ISessionAction { /** Logger for this class. */ private final static ILogger s_log = LoggerController.createLogger(DumpSessionAction.class); private ISession _session; public CloseSessionAction(IApplication app) { super(app); } public void setSession(ISession session) { _session = session; } public void actionPerformed(ActionEvent evt) { if (_session != null) { try { new CloseSessionCommand(_session).execute(); } catch (Throwable ex) { final String msg = "Error occured closing session"; _session.showErrorMessage(msg + ": " + ex); s_log.error(msg, ex)
public class CloseSessionWindowAction extends SquirrelAction implements ISessionAction { /** Logger for this class. */ private final static ILogger s_log = LoggerController.createLogger(DumpSessionAction.class); private ISession _session; public CloseSessionWindowAction(IApplication app) { super(app); } public void setSession(ISession session) { _session = session; } public void actionPerformed(ActionEvent evt) { if (_session != null) { try { new CloseSessionWindowCommand(_session).execute(); } catch (Throwable ex) { final String msg = "Error occured closing session"; _session.showErrorMessage(msg + ": " + ex); s_log.error(msg, ex)
Clone fragments detected by clone detection tool
File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/session/action/CloseSessionAction.java File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/session/action/CloseSessionWindowAction.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
public class CloseSessionAction extends SquirrelAction
1
public class CloseSessionWindowAction extends SquirrelAction
2
									implements ISessionAction
2
									implements ISessionAction
3
{
3
{
4
	/** Logger for this class. */
4
	/** Logger for this class. */
5
	private final static ILogger s_log =
5
	private final static ILogger s_log =
6
		LoggerController.createLogger(DumpSessionAction.class);
6
		LoggerController.createLogger(DumpSessionAction.class);
7
	private ISession _session;
7
	private ISession _session;
8
	public CloseSessionAction(IApplication app)
8
	public CloseSessionWindowAction(IApplication app)
9
	{
9
	{
10
		super(app);
10
		super(app);
11
	}
11
	}
12
	public void setSession(ISession session)
12
	public void setSession(ISession session)
13
	{
13
	{
14
		_session = session;
14
		_session = session;
15
	}
15
	}
16
	public void actionPerformed(ActionEvent evt)
16
	public void actionPerformed(ActionEvent evt)
17
	{
17
	{
18
		if (_session != null)
18
		if (_session != null)
19
		{
19
		{
20
			try
20
			try
21
			{
21
			{
22
				new CloseSessionCommand(_session).execute();
22
            new CloseSessionWindowCommand(_session).execute();
23
			}
23
			}
24
			catch (Throwable ex)
24
			catch (Throwable ex)
25
			{
25
			{
26
				final String msg = "Error occured closing session";
26
				final String msg = "Error occured closing session";
27
				_session.showErrorMessage(msg + ": " + ex);
27
				_session.showErrorMessage(msg + ": " + ex);
28
				s_log.error(msg, ex)
28
				s_log.error(msg, ex)
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