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 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/mysql/src/net/sourceforge/squirrel_sql/plugins/mysql/action/AnalyzeTableAction.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 AnalyzeTableAction 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 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
	 */
18
 */
21
	public AnalyzeTableAction(IApplication app, Resources rsrc,
19
	public ExplainTableAction(IApplication app, Resources rsrc,
22
							MysqlPlugin plugin)
20
							MysqlPlugin plugin)
23
	{
21
	{
24
		super(app, rsrc);
22
		super(app, rsrc);
25
		if (app == null)
23
		if (app == null)
26
		{
24
		{
27
			throw new IllegalArgumentException("IApplication == null");
25
			throw new IllegalArgumentException("IApplication == null");
28
		}
26
		}
29
		if (rsrc == null)
27
		if (rsrc == null)
30
		{
28
		{
31
			throw new IllegalArgumentException("Resources == null");
29
			throw new IllegalArgumentException("Resources == null");
32
		}
30
		}
33
		if (plugin == null)
31
		if (plugin == null)
34
		{
32
		{
35
			throw new IllegalArgumentException("MysqlPlugin == null");
33
			throw new IllegalArgumentException("MysqlPlugin == null");
36
		}
34
		}
37
		_plugin = plugin;
35
		_plugin = plugin;
38
	}
36
	}
39
	public void actionPerformed(ActionEvent evt)
37
	public void actionPerformed(ActionEvent evt)
40
	{
38
	{
41
		if (_session != null)
39
		if (_session != null)
42
		{
40
		{
43
			try
41
			try
44
			{
42
			{
45
				new AnalyzeTableCommand(_session, _plugin).execute();
43
				new ExplainTableCommand(_session, _plugin).execute();
46
			}
44
			}
47
			catch (Throwable th)
45
			catch (Throwable th)
48
			{
46
			{
49
				_session.showErrorMessage(th);
47
				_session.showErrorMessage(th);
50
			}
48
			}
51
		}
49
		}
52
	}
50
	}
53
	/**
51
	/**
54
	 * Set the current session.
52
	 * Set the current session.
55
	 * 
53
	 * 
56
	 * @param	session		The current session.
54
	 * @param	session		The current session.
57
	 */
55
	 */
58
	public void setSession(ISession session)
56
	public void setSession(ISession session)
59
	{
57
	{
60
		_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