public class AddForeignKeyAction extends AbstractRefactoringAction { private static final long serialVersionUID = 1241265816376405505L; /** * Internationalized strings for this class. */ private static final StringManager s_stringMgr = StringManagerFactory.getStringManager(AddForeignKeyAction.class); private static interface i18n { String ACTION_PART = s_stringMgr.getString("AddForeignKeyAction.actionPart"); String OBJECT_PART = s_stringMgr.getString("Shared.tableObject"); String SINGLE_OBJECT_MESSAGE = s_stringMgr.getString("Shared.singleObjectMessage", OBJECT_PART, ACTION_PART); } public AddForeignKeyAction(IApplication app, Resources rsrc) { super(app, rsrc); } /** * @see net.sourceforge.squirrel_sql.plugins.refactoring.actions.AbstractRefactoringAction#getCommand(net.sourceforge.squirrel_sql.fw.sql.IDatabaseObjectInfo[]) */ @Override protected ICommand getCommand(IDatabaseObjectInfo[] info) { return new AddForeignKeyCommand(_session, info); } /** * @see net.sourceforge.squirrel_sql.plugins.refactoring.actions.AbstractRefactoringAction#getErrorMessage() */ @Override protected String getErrorMessage() { return i18n.SINGLE_OBJECT_MESSAGE; } /** * @see net.sourceforge.squirrel_sql.plugins.refactoring.actions.AbstractRefactoringAction#isMultipleObjectAction() */ @Override protected boolean isMultipleObjectAction() { return false
public class DropColumnAction extends AbstractRefactoringAction { private static final long serialVersionUID = 481746871206634214L; /** * Internationalized strings for this class. */ private static final StringManager s_stringMgr = StringManagerFactory.getStringManager(DropColumnAction.class); private static interface i18n { String ACTION_PART = s_stringMgr.getString("DropColumnAction.actionPart"); String OBJECT_PART = s_stringMgr.getString("Shared.tableObject"); String SINGLE_OBJECT_MESSAGE = s_stringMgr.getString("Shared.singleObjectMessage", OBJECT_PART, ACTION_PART); } public DropColumnAction(IApplication app, Resources rsrc) { super(app, rsrc); } /** * @see net.sourceforge.squirrel_sql.plugins.refactoring.actions.AbstractRefactoringAction#getCommand(net.sourceforge.squirrel_sql.fw.sql.IDatabaseObjectInfo[]) */ @Override protected ICommand getCommand(IDatabaseObjectInfo[] info) { return new DropColumnCommand(_session, info); } /** * @see net.sourceforge.squirrel_sql.plugins.refactoring.actions.AbstractRefactoringAction#getErrorMessage() */ @Override protected String getErrorMessage() { return i18n.SINGLE_OBJECT_MESSAGE; } /** * @see net.sourceforge.squirrel_sql.plugins.refactoring.actions.AbstractRefactoringAction#isMultipleObjectAction() */ @Override protected boolean isMultipleObjectAction() { return false
Clone fragments detected by clone detection tool
File path: /sql12/plugins/refactoring/src/net/sourceforge/squirrel_sql/plugins/refactoring/actions/AddForeignKeyAction.java File path: /sql12/plugins/refactoring/src/net/sourceforge/squirrel_sql/plugins/refactoring/actions/DropColumnAction.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
public class AddForeignKeyAction extends AbstractRefactoringAction
1
public class DropColumnAction extends AbstractRefactoringAction
2
{
2
{
3
	private static final long serialVersionUID = 1241265816376405505L;
3
	private static final long serialVersionUID = 
4

4
481746871206634214L;
5
	/**
5
	/**
6
	 * Internationalized strings for this class.
6
	 * Internationalized strings for this class.
7
	 */
7
	 */
8
	private static final StringManager s_stringMgr =
8
	private static final StringManager s_stringMgr =
9
		StringManagerFactory.getStringManager(AddForeignKeyAction.class);
9
		StringManagerFactory.getStringManager(DropColumnAction.class);
10

11
	private static interface i18n
10
	private static interface i18n
12
	{
11
	{
13
		String ACTION_PART = s_stringMgr.getString("AddForeignKeyAction.actionPart");
12
		String ACTION_PART = s_stringMgr.getString("DropColumnAction.actionPart");
14

15
		String OBJECT_PART = s_stringMgr.getString("Shared.tableObject");
13
		String OBJECT_PART = s_stringMgr.getString("Shared.tableObject");
16

17
		String SINGLE_OBJECT_MESSAGE =
14
		String SINGLE_OBJECT_MESSAGE =
18
			s_stringMgr.getString("Shared.singleObjectMessage", OBJECT_PART, ACTION_PART);
15
			s_stringMgr.getString("Shared.singleObjectMessage", OBJECT_PART, ACTION_PART);
19
	}
16
	}
20

21
	public AddForeignKeyAction(IApplication app, Resources rsrc)
17
	public DropColumnAction(IApplication app, Resources rsrc)
22
	{
18
	{
23
		super(app, rsrc);
19
		super(app, rsrc);
24
	}
20
	}
25

26
	/**
21
	/**
27
	 * @see net.sourceforge.squirrel_sql.plugins.refactoring.actions.AbstractRefactoringAction#getCommand(net.sourceforge.squirrel_sql.fw.sql.IDatabaseObjectInfo[])
22
	 * @see net.sourceforge.squirrel_sql.plugins.refactoring.actions.AbstractRefactoringAction#getCommand(net.sourceforge.squirrel_sql.fw.sql.IDatabaseObjectInfo[])
28
	 */
23
	 */
29
	@Override
24
	@Override
30
	protected ICommand getCommand(IDatabaseObjectInfo[] info)
25
	protected ICommand getCommand(IDatabaseObjectInfo[] info)
31
	{
26
	{
32
		return new AddForeignKeyCommand(_session, info);
27
		return new DropColumnCommand(_session, info);
33
	}
28
	}
34

35
	/**
29
	/**
36
	 * @see net.sourceforge.squirrel_sql.plugins.refactoring.actions.AbstractRefactoringAction#getErrorMessage()
30
	 * @see net.sourceforge.squirrel_sql.plugins.refactoring.actions.AbstractRefactoringAction#getErrorMessage()
37
	 */
31
	 */
38
	@Override
32
	@Override
39
	protected String getErrorMessage()
33
	protected String getErrorMessage()
40
	{
34
	{
41
		return i18n.SINGLE_OBJECT_MESSAGE;
35
		return i18n.SINGLE_OBJECT_MESSAGE;
42
	}
36
	}
43

44
	/**
37
	/**
45
	 * @see net.sourceforge.squirrel_sql.plugins.refactoring.actions.AbstractRefactoringAction#isMultipleObjectAction()
38
	 * @see net.sourceforge.squirrel_sql.plugins.refactoring.actions.AbstractRefactoringAction#isMultipleObjectAction()
46
	 */
39
	 */
47
	@Override
40
	@Override
48
	protected boolean isMultipleObjectAction()
41
	protected boolean isMultipleObjectAction()
49
	{
42
	{
50
		return false
43
		return false
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