_session.getApplication().getThreadPool().addTask(new Runnable() { public void run() { GUIUtils.processOnSwingEventThread(new Runnable() { public void run() { customDialog = new RenameTableDialog(_info, RenameTableDialog.DIALOG_TYPE_VIEW); customDialog.addExecuteListener(new ExecuteListener()); customDialog.addEditSQLListener(new EditSQLListener(customDialog)); customDialog.addShowSQLListener(new ShowSQLListener(i18n.SHOWSQL_DIALOG_TITLE, customDialog)); customDialog.setLocationRelativeTo(_session.getApplication().getMainFrame()); customDialog.setVisible(true); } }); } });
_session.getApplication().getThreadPool().addTask(new Runnable() { public void run() { GUIUtils.processOnSwingEventThread(new Runnable() { public void run() { customDialog = new DefaultDropDialog(_info, DefaultDropDialog.DIALOG_TYPE_VIEW); customDialog.addExecuteListener(new ExecuteListener()); customDialog.addEditSQLListener(new EditSQLListener(customDialog)); customDialog.addShowSQLListener(new ShowSQLListener(i18n.SHOWSQL_DIALOG_TITLE, customDialog)); customDialog.setLocationRelativeTo(_session.getApplication().getMainFrame()); customDialog.setVisible(true); } }); } });
Clone fragments detected by clone detection tool
File path: /sql12/plugins/refactoring/src/net/sourceforge/squirrel_sql/plugins/refactoring/commands/RenameViewCommand.java File path: /sql12/plugins/refactoring/src/net/sourceforge/squirrel_sql/plugins/refactoring/commands/DropViewCommand.java
Method name: void showCustomDialog() Method name: void showCustomDialog()
Number of AST nodes: 1 Number of AST nodes: 1
1
_session.getApplication().getThreadPool().addTask(new Runnable()
1
_session.getApplication().getThreadPool().addTask(new Runnable()
2
		{
2
		{
3
			public void run()
3
			public void run()
4
			{
4
			{
5
				GUIUtils.processOnSwingEventThread(new Runnable()
5
				GUIUtils.processOnSwingEventThread(new Runnable()
6
				{
6
				{
7
					public void run()
7
					public void run()
8
					{
8
					{
9
						customDialog = new RenameTableDialog(_info, RenameTableDialog.DIALOG_TYPE_VIEW);
9
						customDialog = new DefaultDropDialog(_info, DefaultDropDialog.DIALOG_TYPE_VIEW);
10
						customDialog.addExecuteListener(new ExecuteListener());
10
						customDialog.addExecuteListener(new ExecuteListener());
11
						customDialog.addEditSQLListener(new EditSQLListener(customDialog));
11
						customDialog.addEditSQLListener(new EditSQLListener(customDialog));
12
						customDialog.addShowSQLListener(new ShowSQLListener(i18n.SHOWSQL_DIALOG_TITLE, customDialog));
12
						customDialog.addShowSQLListener(new ShowSQLListener(i18n.SHOWSQL_DIALOG_TITLE, customDialog));
13
						customDialog.setLocationRelativeTo(_session.getApplication().getMainFrame());
13
						customDialog.setLocationRelativeTo(_session.getApplication().getMainFrame());
14
						customDialog.setVisible(true);
14
						customDialog.setVisible(true);
15
					}
15
					}
16
				});
16
				});
17
			}
17
			}
18
		});
18
		});
Summary
Number of common nesting structure subtrees1
Number of refactorable cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones locationClones are in different classes having the same super class
Number of node comparisons1
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements1
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    _session.getApplication().getThreadPool().addTask(new Runnable() {...});
    1
    _session.getApplication().getThreadPool().addTask(new Runnable() {...});
    1
    _session.getApplication().getThreadPool().addTask(new Runnable() {...});
    Differences
    Expression1Expression2Difference
    net.sourceforge.squirrel_sql.plugins.refactoring.gui.RenameTableDialognet.sourceforge.squirrel_sql.plugins.refactoring.gui.DefaultDropDialogSUBCLASS_TYPE_MISMATCH
    net.sourceforge.squirrel_sql.plugins.refactoring.gui.RenameTableDialognet.sourceforge.squirrel_sql.plugins.refactoring.gui.DefaultDropDialogSUBCLASS_TYPE_MISMATCH
    net.sourceforge.squirrel_sql.plugins.refactoring.gui.RenameTableDialognet.sourceforge.squirrel_sql.plugins.refactoring.gui.DefaultDropDialogSUBCLASS_TYPE_MISMATCH
    net.sourceforge.squirrel_sql.plugins.refactoring.gui.RenameTableDialognet.sourceforge.squirrel_sql.plugins.refactoring.gui.DefaultDropDialogSUBCLASS_TYPE_MISMATCH
    net.sourceforge.squirrel_sql.plugins.refactoring.gui.RenameTableDialognet.sourceforge.squirrel_sql.plugins.refactoring.gui.DefaultDropDialogSUBCLASS_TYPE_MISMATCH
    net.sourceforge.squirrel_sql.plugins.refactoring.gui.RenameTableDialognet.sourceforge.squirrel_sql.plugins.refactoring.gui.DefaultDropDialogSUBCLASS_TYPE_MISMATCH
    net.sourceforge.squirrel_sql.plugins.refactoring.commands.RenameViewCommand.i18nnet.sourceforge.squirrel_sql.plugins.refactoring.commands.DropViewCommand.i18nVARIABLE_TYPE_MISMATCH
    net.sourceforge.squirrel_sql.plugins.refactoring.gui.RenameTableDialognet.sourceforge.squirrel_sql.plugins.refactoring.gui.DefaultDropDialogSUBCLASS_TYPE_MISMATCH
    net.sourceforge.squirrel_sql.plugins.refactoring.gui.RenameTableDialognet.sourceforge.squirrel_sql.plugins.refactoring.gui.DefaultDropDialogSUBCLASS_TYPE_MISMATCH
    net.sourceforge.squirrel_sql.plugins.refactoring.gui.RenameTableDialognet.sourceforge.squirrel_sql.plugins.refactoring.gui.DefaultDropDialogSUBCLASS_TYPE_MISMATCH
    net.sourceforge.squirrel_sql.plugins.refactoring.gui.RenameTableDialognet.sourceforge.squirrel_sql.plugins.refactoring.gui.DefaultDropDialogSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression customDialog cannot be unified with expression customDialog , because common superclass net.sourceforge.squirrel_sql.plugins.refactoring.gui.AbstractRefactoringDialog does not declare member(s) public static final int DIALOG_TYPE_VIEW
    Expression new RenameTableDialog(_info,RenameTableDialog.DIALOG_TYPE_VIEW) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression new DefaultDropDialog(_info,DefaultDropDialog.DIALOG_TYPE_VIEW) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression new RenameTableDialog(_info,RenameTableDialog.DIALOG_TYPE_VIEW) cannot be unified with expression new DefaultDropDialog(_info,DefaultDropDialog.DIALOG_TYPE_VIEW) , because common superclass net.sourceforge.squirrel_sql.plugins.refactoring.gui.AbstractRefactoringDialog does not declare member(s) public static final int DIALOG_TYPE_VIEW
    Expression RenameTableDialog cannot be unified with expression DefaultDropDialog , because common superclass net.sourceforge.squirrel_sql.plugins.refactoring.gui.AbstractRefactoringDialog does not declare member(s) public static final int DIALOG_TYPE_VIEW
    Expression customDialog cannot be unified with expression customDialog , because common superclass net.sourceforge.squirrel_sql.plugins.refactoring.gui.AbstractRefactoringDialog does not declare member(s) public static final int DIALOG_TYPE_VIEW
    Expression customDialog cannot be unified with expression customDialog , because common superclass net.sourceforge.squirrel_sql.plugins.refactoring.gui.AbstractRefactoringDialog does not declare member(s) public static final int DIALOG_TYPE_VIEW
    Expression customDialog cannot be unified with expression customDialog , because common superclass net.sourceforge.squirrel_sql.plugins.refactoring.gui.AbstractRefactoringDialog does not declare member(s) public static final int DIALOG_TYPE_VIEW
    Type net.sourceforge.squirrel_sql.plugins.refactoring.commands.RenameViewCommand.i18n does not match with type net.sourceforge.squirrel_sql.plugins.refactoring.commands.DropViewCommand.i18n
    • Make classes net.sourceforge.squirrel_sql.plugins.refactoring.commands.RenameViewCommand.i18n and net.sourceforge.squirrel_sql.plugins.refactoring.commands.DropViewCommand.i18n extend a common superclass
    Expression customDialog cannot be unified with expression customDialog , because common superclass net.sourceforge.squirrel_sql.plugins.refactoring.gui.AbstractRefactoringDialog does not declare member(s) public static final int DIALOG_TYPE_VIEW
    Expression customDialog cannot be unified with expression customDialog , because common superclass net.sourceforge.squirrel_sql.plugins.refactoring.gui.AbstractRefactoringDialog does not declare member(s) public static final int DIALOG_TYPE_VIEW
    Expression customDialog cannot be unified with expression customDialog , because common superclass net.sourceforge.squirrel_sql.plugins.refactoring.gui.AbstractRefactoringDialog does not declare member(s) public static final int DIALOG_TYPE_VIEW
    Expression customDialog cannot be unified with expression customDialog , because common superclass net.sourceforge.squirrel_sql.plugins.refactoring.gui.AbstractRefactoringDialog does not declare member(s) public static final int DIALOG_TYPE_VIEW
    1
    _session.getApplication().getThreadPool().addTask(new Runnable() {...});
    Precondition Violations (13)
    Row Violation
    1Expression customDialog cannot be unified with expression customDialog , because common superclass net.sourceforge.squirrel_sql.plugins.refactoring.gui.AbstractRefactoringDialog does not declare member(s) public static final int DIALOG_TYPE_VIEW
    2Expression new RenameTableDialog(_info,RenameTableDialog.DIALOG_TYPE_VIEW) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression new DefaultDropDialog(_info,DefaultDropDialog.DIALOG_TYPE_VIEW) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Expression new RenameTableDialog(_info,RenameTableDialog.DIALOG_TYPE_VIEW) cannot be unified with expression new DefaultDropDialog(_info,DefaultDropDialog.DIALOG_TYPE_VIEW) , because common superclass net.sourceforge.squirrel_sql.plugins.refactoring.gui.AbstractRefactoringDialog does not declare member(s) public static final int DIALOG_TYPE_VIEW
    5Expression RenameTableDialog cannot be unified with expression DefaultDropDialog , because common superclass net.sourceforge.squirrel_sql.plugins.refactoring.gui.AbstractRefactoringDialog does not declare member(s) public static final int DIALOG_TYPE_VIEW
    6Expression customDialog cannot be unified with expression customDialog , because common superclass net.sourceforge.squirrel_sql.plugins.refactoring.gui.AbstractRefactoringDialog does not declare member(s) public static final int DIALOG_TYPE_VIEW
    7Expression customDialog cannot be unified with expression customDialog , because common superclass net.sourceforge.squirrel_sql.plugins.refactoring.gui.AbstractRefactoringDialog does not declare member(s) public static final int DIALOG_TYPE_VIEW
    8Expression customDialog cannot be unified with expression customDialog , because common superclass net.sourceforge.squirrel_sql.plugins.refactoring.gui.AbstractRefactoringDialog does not declare member(s) public static final int DIALOG_TYPE_VIEW
    9Type net.sourceforge.squirrel_sql.plugins.refactoring.commands.RenameViewCommand.i18n does not match with type net.sourceforge.squirrel_sql.plugins.refactoring.commands.DropViewCommand.i18n
    10Expression customDialog cannot be unified with expression customDialog , because common superclass net.sourceforge.squirrel_sql.plugins.refactoring.gui.AbstractRefactoringDialog does not declare member(s) public static final int DIALOG_TYPE_VIEW
    11Expression customDialog cannot be unified with expression customDialog , because common superclass net.sourceforge.squirrel_sql.plugins.refactoring.gui.AbstractRefactoringDialog does not declare member(s) public static final int DIALOG_TYPE_VIEW
    12Expression customDialog cannot be unified with expression customDialog , because common superclass net.sourceforge.squirrel_sql.plugins.refactoring.gui.AbstractRefactoringDialog does not declare member(s) public static final int DIALOG_TYPE_VIEW
    13Expression customDialog cannot be unified with expression customDialog , because common superclass net.sourceforge.squirrel_sql.plugins.refactoring.gui.AbstractRefactoringDialog does not declare member(s) public static final int DIALOG_TYPE_VIEW