public class AnalyzeTableAction 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. * * @throws IllegalArgumentException * Thrown if an invalid <TT>checktype</TT> passed. */ public AnalyzeTableAction(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 AnalyzeTableCommand(_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
public class ExplainSelectTableAction 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 ExplainSelectTableAction(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 ExplainSelectTableCommand(_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/mysql/src/net/sourceforge/squirrel_sql/plugins/mysql/action/AnalyzeTableAction.java File path: /sql12/plugins/mysql/src/net/sourceforge/squirrel_sql/plugins/mysql/action/ExplainSelectTableAction.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
public class AnalyzeTableAction extends SquirrelAction implements ISessionAction 
1
public class ExplainSelectTableAction 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 MysqlPlugin _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>MysqlPlugin</TT> passed.
16
	 * 			<TT>Resources</TT> or <TT>MysqlPlugin</TT> passed.
17
	 *
17
	 *
18
	 * @throws	IllegalArgumentException
19
	 * 			Thrown if an invalid <TT>checktype</TT> passed.
20
	 */
21
	public Analyze
18
/
22
TableAction(IApplication app, Resources rsrc,
19
	public ExplainSelectTableAction(IApplication app, Resources rsrc,
23
							MysqlPlugin plugin)
20
							MysqlPlugin plugin)
24
	{
21
	{
25
		super(app, rsrc);
22
		super(app, rsrc);
26
		if (app == null)
23
		if (app == null)
27
		{
24
		{
28
			throw new IllegalArgumentException("IApplication == null");
25
			throw new IllegalArgumentException("IApplication == null");
29
		}
26
		}
30
		if (rsrc == null)
27
		if (rsrc == null)
31
		{
28
		{
32
			throw new IllegalArgumentException("Resources == null");
29
			throw new IllegalArgumentException("Resources == null");
33
		}
30
		}
34
		if (plugin == null)
31
		if (plugin == null)
35
		{
32
		{
36
			throw new IllegalArgumentException("MysqlPlugin == null");
33
			throw new IllegalArgumentException("MysqlPlugin == null");
37
		}
34
		}
38
		_plugin = plugin;
35
		_plugin = plugin;
39
	}
36
	}
40
	public void actionPerformed(ActionEvent evt)
37
	public void actionPerformed(ActionEvent evt)
41
	{
38
	{
42
		if (_session != null)
39
		if (_session != null)
43
		{
40
		{
44
			try
41
			try
45
			{
42
			{
46
				new AnalyzeTableCommand(_session, _plugin).execute();
43
				new ExplainSelectTableCommand(_session, _plugin).execute();
47
			}
44
			}
48
			catch (Throwable th)
45
			catch (Throwable th)
49
			{
46
			{
50
				_session.showErrorMessage(th);
47
				_session.showErrorMessage(th);
51
			}
48
			}
52
		}
49
		}
53
	}
50
	}
54
	/**
51
	/**
55
	 * Set the current session.
52
	 * Set the current session.
56
	 * 
53
	 * 
57
	 * @param	session		The current session.
54
	 * @param	session		The current session.
58
	 */
55
	 */
59
	public void setSession(ISession session)
56
	public void setSession(ISession session)
60
	{
57
	{
61
		_session = session
58
		_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