public class ActivateIndexAction extends SquirrelAction implements ISessionAction { /** Current session. */ private ISession _session; /** Current plugin. */ private final IPlugin _plugin; /** * Ctor. * * @param app Application API. * @param rsrc Plugins resources. * @param plugin This plugin. * * @throws IllegalArgumentException * Thrown if a<TT>null</TT> <TT>IApplication</TT>, * <TT>Resources</TT> or <TT>IPlugin</TT> passed. */ public ActivateIndexAction(IApplication app, Resources rsrc, IPlugin plugin) { super(app, rsrc); if (app == null) { throw new IllegalArgumentException("IApplication == null"); } if (rsrc == null) { throw new IllegalArgumentException("Resources == null"); } if (plugin == null) { throw new IllegalArgumentException("IPlugin == null"); } _plugin = plugin; } public void actionPerformed(ActionEvent evt) { if (_session != null) { try { new AlterIndexCommand(_session, _plugin, true).execute(); } catch (Throwable th) { _session.showErrorMessage(th); } } } /** * Set the current session. * * @param session The current session. */ public void setSession(ISession session) { _session = session
public class ExplainTableAction extends SquirrelAction implements ISessionAction { /** Current session. */ private ISession _session; /** Current plugin. */ private final MysqlPlugin _plugin; /** * Ctor. * * @param app Application API. * @param rsrc Plugins resources. * @param plugin This plugin. * * @throws IllegalArgumentException * Thrown if a?<TT>null</TT> <TT>IApplication</TT>, * <TT>Resources</TT> or <TT>MysqlPlugin</TT> passed. */ public ExplainTableAction(IApplication app, Resources rsrc, MysqlPlugin plugin) { super(app, rsrc); if (app == null) { throw new IllegalArgumentException("IApplication == null"); } if (rsrc == null) { throw new IllegalArgumentException("Resources == null"); } if (plugin == null) { throw new IllegalArgumentException("MysqlPlugin == null"); } _plugin = plugin; } public void actionPerformed(ActionEvent evt) { if (_session != null) { try { new ExplainTableCommand(_session, _plugin).execute(); } catch (Throwable th) { _session.showErrorMessage(th); } } } /** * Set the current session. * * @param session The current session. */ public void setSession(ISession session) { _session = session
Clone fragments detected by clone detection tool
File path: /sql12/plugins/firebird/src/org/firebirdsql/squirrel/act/ActivateIndexAction.java File path: /sql12/plugins/mysql/src/net/sourceforge/squirrel_sql/plugins/mysql/action/ExplainTableAction.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
public class ActivateIndexAction extends SquirrelAction implements ISessionAction 
1
public class ExplainTableAction extends SquirrelAction implements ISessionAction 
2
{
2
{
3
	/** Current session. */
3
	/** Current session. */
4
	private ISession _session;
4
	private ISession _session;
5
	/** Current plugin. */
5
	/** Current plugin. */
6
	private final IPlugin _plugin;
6
	private final MysqlPlugin _plugin;
7
	/**
7
	/**
8
	 * Ctor.
8
	 * Ctor.
9
	 *
9
	 *
10
	 * @param	app			Application API.
10
	 * @param	app			Application API.
11
	 * @param	rsrc		Plugins resources.
11
	 * @param	rsrc		Plugins resources.
12
	 * @param	plugin		This plugin.
12
	 * @param	plugin		This plugin.
13
	 *
13
	 *
14
	 * @throws	IllegalArgumentException
14
	 * @throws	IllegalArgumentException
15
	 * 			Thrown if a<TT>null</TT> <TT>IApplication</TT>,
15
	 * 			Thrown if a?<TT>null</TT> <TT>IApplication</TT>,
16
	 * 			<TT>Resources</TT> or <TT>IPlugin</TT> passed.
16
	 * 			<TT>Resources</TT> or <TT>MysqlPlugin</TT> passed.
17
	 */
17
	 */
18
	public ActivateIndexAction(IApplication app, Resources rsrc,
18
	public ExplainTableAction(IApplication app, Resources rsrc,
19
							IPlugin plugin)
19
							MysqlPlugin plugin)
20
	{
20
	{
21
		super(app, rsrc);
21
		super(app, rsrc);
22
		if (app == null)
22
		if (app == null)
23
		{
23
		{
24
			throw new IllegalArgumentException("IApplication == null");
24
			throw new IllegalArgumentException("IApplication == null");
25
		}
25
		}
26
		if (rsrc == null)
26
		if (rsrc == null)
27
		{
27
		{
28
			throw new IllegalArgumentException("Resources == null");
28
			throw new IllegalArgumentException("Resources == null");
29
		}
29
		}
30
		if (plugin == null)
30
		if (plugin == null)
31
		{
31
		{
32
			throw new IllegalArgumentException("IPlugin == null");
32
			throw new IllegalArgumentException("MysqlPlugin == null");
33
		}
33
		}
34
		_plugin = plugin;
34
		_plugin = plugin;
35
	}
35
	}
36
	public void actionPerformed(ActionEvent evt)
36
	public void actionPerformed(ActionEvent evt)
37
	{
37
	{
38
		if (_session != null)
38
		if (_session != null)
39
		{
39
		{
40
			try
40
			try
41
			{
41
			{
42
				new AlterIndexCommand(_session, _plugin, true).execute();
42
				new ExplainTableCommand(_session, _plugin).execute();
43
			}
43
			}
44
			catch (Throwable th)
44
			catch (Throwable th)
45
			{
45
			{
46
				_session.showErrorMessage(th);
46
				_session.showErrorMessage(th);
47
			}
47
			}
48
		}
48
		}
49
	}
49
	}
50
	/**
50
	/**
51
	 * Set the current session.
51
	 * Set the current session.
52
	 * 
52
	 * 
53
	 * @param	session		The current session.
53
	 * @param	session		The current session.
54
	 */
54
	 */
55
	public void setSession(ISession session)
55
	public void setSession(ISession session)
56
	{
56
	{
57
		_session = session
57
		_session = session
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