public class ExportAliasesAction extends SquirrelAction { private static final StringManager s_stringMgr = StringManagerFactory.getStringManager(ExportAliasesAction.class); /** Application API. */ private final IApplication _app; /** Current plugin. */ private final ExportConfigPlugin _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 ExportAliasesAction(IApplication app, Resources rsrc, ExportConfigPlugin 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("ExportConfigPlugin == null"); } _app = app; _plugin = plugin; } public void actionPerformed(ActionEvent evt) { try { new ExportAliasesCommand(getParentFrame(evt), _plugin).execute(); } catch (BaseException ex) { // i18n[exportconfig.errorSavingAlials=Error saving aliases] _app.showErrorDialog(s_stringMgr.getString("exportconfig.errorSavingAlials"), ex)
public class ExportDriversAction extends SquirrelAction { private static final StringManager s_stringMgr = StringManagerFactory.getStringManager(ExportDriversAction.class); /** Application API. */ private final IApplication _app; /** Current plugin. */ private final ExportConfigPlugin _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 ExportDriversAction(IApplication app, Resources rsrc, ExportConfigPlugin 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("ExportConfigPlugin == null"); } _app = app; _plugin = plugin; } public void actionPerformed(ActionEvent evt) { try { new ExportDriversCommand(getParentFrame(evt), _plugin).execute(); } catch (BaseException ex) { // i18n[exportconfig.errorSavingDrivers=Error saving drivers] _app.showErrorDialog(s_stringMgr.getString("exportconfig.errorSavingDrivers"), ex)
Clone fragments detected by clone detection tool
File path: /sql12/plugins/exportconfig/src/net/sourceforge/squirrel_sql/plugins/exportconfig/action/ExportAliasesAction.java File path: /sql12/plugins/exportconfig/src/net/sourceforge/squirrel_sql/plugins/exportconfig/action/ExportDriversAction.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
public class ExportAliasesAction extends SquirrelAction 
1
public class ExportDriversAction extends SquirrelAction 
2
{
2
{
3
	private static final StringManager s_stringMgr =
3
	private static final StringManager s_stringMgr =
4
		StringManagerFactory.getStringManager(ExportAliasesAction.class);
4
		StringManagerFactory.getStringManager(ExportDriversAction.class);
5
	/** Application API. */
5
	/** Application API. */
6
	private final IApplication _app;
6
	private final IApplication _app;
7
	/** Current plugin. */
7
	/** Current plugin. */
8
	private final ExportConfigPlugin _plugin;
8
	private final ExportConfigPlugin _plugin;
9
	/**
9
	/**
10
	 * Ctor.
10
	 * Ctor.
11
	 *
11
	 *
12
	 * @param	app			Application API.
12
	 * @param	app			Application API.
13
	 * @param	rsrc		Plugins resources.
13
	 * @param	rsrc		Plugins resources.
14
	 * @param	plugin		This plugin.
14
	 * @param	plugin		This plugin.
15
	 *
15
	 *
16
	 * @throws	IllegalArgumentException
16
	 * @throws	IllegalArgumentException
17
	 * 			Thrown if a�<TT>null</TT> <TT>IApplication</TT>,
17
	 * 			Thrown if a�<TT>null</TT> <TT>IApplication</TT>,
18
	 * 			<TT>Resources</TT> or <TT>MysqlPlugin</TT> passed.
18
	 * 			<TT>Resources</TT> or <TT>MysqlPlugin</TT> passed.
19
	 *
19
	 *
20
	 * @throws	IllegalArgumentException
20
	 * @throws	IllegalArgumentException
21
	 * 			Thrown if an invalid <TT>checktype</TT> passed.
21
	 * 			Thrown if an invalid <TT>checktype</TT> passed.
22
	 */
22
	 */
23
	public ExportAliasesAction(IApplication app, Resources rsrc,
23
	public ExportDriversAction(IApplication app, Resources rsrc,
24
							ExportConfigPlugin plugin)
24
							ExportConfigPlugin plugin)
25
	{
25
	{
26
		super(app, rsrc);
26
		super(app, rsrc);
27
		if (app == null)
27
		if (app == null)
28
		{
28
		{
29
			throw new IllegalArgumentException("IApplication == null");
29
			throw new IllegalArgumentException("IApplication == null");
30
		}
30
		}
31
		if (rsrc == null)
31
		if (rsrc == null)
32
		{
32
		{
33
			throw new IllegalArgumentException("Resources == null");
33
			throw new IllegalArgumentException("Resources == null");
34
		}
34
		}
35
		if (plugin == null)
35
		if (plugin == null)
36
		{
36
		{
37
			throw new IllegalArgumentException("ExportConfigPlugin == null");
37
			throw new IllegalArgumentException("ExportConfigPlugin == null");
38
		}
38
		}
39
		_app = app;
39
		_app = app;
40
		_plugin = plugin;
40
		_plugin = plugin;
41
	}
41
	}
42
	public void actionPerformed(ActionEvent evt)
42
	public void actionPerformed(ActionEvent evt)
43
	{
43
	{
44
		try
44
		try
45
		{
45
		{
46
			new ExportAliasesCommand(getParentFrame(evt), _plugin).execute();
46
			new ExportDriversCommand(getParentFrame(evt), _plugin).execute();
47
		}
47
		}
48
		catch (BaseException ex)
48
		catch (BaseException ex)
49
		{
49
		{
50
			// i18n[exportconfig.errorSavingAlials=Error saving aliases]
50
			// i18n[exportconfig.errorSavingDrivers=Error saving drivers]
51
			_app.showErrorDialog(s_stringMgr.getString("exportconfig.errorSavingAlials"), ex)
51
			_app.showErrorDialog(s_stringMgr.getString("exportconfig.errorSavingDrivers"), 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