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 ModifyColumnAction extends AbstractRefactoringAction { private static final long serialVersionUID = -9019844275238785508L; /** * Internationalized strings for this class. */ private static final StringManager s_stringMgr = StringManagerFactory.getStringManager(ModifyColumnAction.class); private static interface i18n { String ACTION_PART = s_stringMgr.getString("ModifyColumnAction.actionPart"); String OBJECT_PART = s_stringMgr.getString("Shared.tableObject"); String SINGLE_OBJECT_MESSAGE = s_stringMgr.getString("Shared.singleObjectMessage", OBJECT_PART, ACTION_PART); } public ModifyColumnAction(IApplication app, Resources rsrc) { super(app, rsrc); } @Override protected ICommand getCommand(IDatabaseObjectInfo[] info) { return new ModifyColumnCommand(_session, info); } @Override protected String getErrorMessage() { return i18n.SINGLE_OBJECT_MESSAGE; } @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/ModifyColumnAction.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
public class AddForeignKeyAction extends AbstractRefactoringAction
1
public class ModifyColumnAction extends AbstractRefactoringAction
2
{
2
{
3
	private static final long serialVersionUID = 1241265816376405505L;
3
	private static final long serialVersionUID = -9019844275238785508L;
4

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

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

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

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

21
	public AddForeignKeyAction(IApplication app, Resources rsrc)
16
	public ModifyColumnAction(IApplication app, Resources rsrc)
22
	{
17
	{
23
		super(app, rsrc);
18
		super(app, rsrc);
24
	}
19
	}
25
	/**
26
	 * @see net.sourceforge.squirrel_sql.plugins.refactoring.actions.AbstractRefactoringAction#getCommand(net.sourceforge.squirrel_sql.fw.sql.IDatabaseObjectInfo[])
27
	 */
28
	@Override
20
	@Override
29
	protected ICommand getCommand(IDatabaseObjectInfo[] info)
21
	protected ICommand getCommand(IDatabaseObjectInfo[] info)
30
	{
22
	{
31
		return new AddForeignKeyCommand(_session, info);
23
		return new ModifyColumnCommand(_session, info);
32
	}
24
	}
33
	/**
34
	 * @see net.sourceforge.squirrel_sql.plugins.refactoring.actions.AbstractRefactoringAction#getErrorMessage()
35
	 */
36
	@Override
25
	@Override
37
	protected String getErrorMessage()
26
	protected String getErrorMessage()
38
	{
27
	{
39
		return i18n.SINGLE_OBJECT_MESSAGE;
28
		return i18n.SINGLE_OBJECT_MESSAGE;
40
	}
29
	}
41
	/**
42
	 * @see net.sourceforge.squirrel_sql.plugins.refactoring.actions.AbstractRefactoringAction#isMultipleObjectAction()
43
	 */
44
	@Override
30
	@Override
45
	protected boolean isMultipleObjectAction()
31
	protected boolean isMultipleObjectAction()
46
	{
32
	{
47
		return false;
33
		return false;
48
	
34
	
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