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

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

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

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

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

16
	public DropColumnAction(IApplication app, Resources rsrc)
22
	public DropUniqueConstraintAction(IApplication app, Resources rsrc)
17
	{
23
	{
18
		super(app, rsrc);
24
		super(app, rsrc);
19
	}
25
	}
26

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

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

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