public class AddPrimaryKeyAction extends AbstractRefactoringAction { private static final long serialVersionUID = 488082040428357799L; /** * Internationalized strings for this class. */ private static final StringManager s_stringMgr = StringManagerFactory.getStringManager(AddPrimaryKeyAction.class); private static interface i18n { String ACTION_PART = s_stringMgr.getString("AddPrimaryKeyAction.actionPart"); String OBJECT_PART = s_stringMgr.getString("Shared.tableObject"); String SINGLE_OBJECT_MESSAGE = s_stringMgr.getString("Shared.singleObjectMessage", OBJECT_PART, ACTION_PART); } public AddPrimaryKeyAction(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 AddPrimaryKeyCommand(_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 DropForeignKeyAction extends AbstractRefactoringAction { private static final long serialVersionUID = 3393741031225773340L; /** * Internationalized strings for this class. */ private static final StringManager s_stringMgr = StringManagerFactory.getStringManager(DropForeignKeyAction.class); private static interface i18n { String ACTION_PART = s_stringMgr.getString("DropForeignKeyAction.actionPart"); String OBJECT_PART = s_stringMgr.getString("Shared.tableObject"); String SINGLE_OBJECT_MESSAGE = s_stringMgr.getString("Shared.singleObjectMessage", OBJECT_PART, ACTION_PART); } public DropForeignKeyAction(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 DropForeignKeyCommand(_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/AddPrimaryKeyAction.java File path: /sql12/plugins/refactoring/src/net/sourceforge/squirrel_sql/plugins/refactoring/actions/DropForeignKeyAction.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
public class AddPrimaryKeyAction extends AbstractRefactoringAction
1
public class DropForeignKeyAction extends AbstractRefactoringAction
2
{
2
{
3
	private static final long serialVersionUID = 488082040428357799L;
3
	private static final long serialVersionUID = 3393741031225773340L;
4

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

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

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

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

16
	public AddPrimaryKeyAction(IApplication app, Resources rsrc)
21
	public DropForeignKeyAction(IApplication app, Resources rsrc)
17
	{
22
	{
18
		super(app, rsrc);
23
		super(app, rsrc);
19
	}
24
	}
25

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

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

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