_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_SEQUENCE); 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/DropSequenceCommand.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
		{
3
			
2
 {
4
public void run()
3
            public void run()
5
			{
6
				
4
 {
7
GUIUtils.processOnSwingEventThread(new Runnable()
5
                GUIUtils.processOnSwingEventThread(new Runnable()
8
				{
9
					public void run()
10
					{
11
						
6
 {
7
                    public void run() {
12
customDialog = new RenameTableDialog(_info, RenameTableDialog.DIALOG_TYPE_VIEW);
8
                        customDialog = new DefaultDropDialog(_info, DefaultDropDialog.DIALOG_TYPE_
13
						
9
SEQUENCE);
14
customDialog.addExecuteListener(new ExecuteListener());
10
                        customDialog.addExecuteListener(new ExecuteListener());
15
						customDialog.addEditSQLListener(new EditSQLListener(customDialog));
11
                        customDialog.addEditSQLListener(new EditSQLListener(customDialog));
16
						customDialog.addShowSQLListener(new ShowSQLListener(i18n.SHOWSQL_DIALOG_TITLE, customDialog));
12
                        customDialog.addShowSQLListener(new ShowSQLListener(i18n.SHOWSQL_DIALOG_TITLE, customDialog));
17
						customDialog.setLocationRelativeTo(_session.getApplication().getMainFrame());
13
                        customDialog.setLocationRelativeTo(_session.getApplication().getMainFrame());
18
						customDialog.setVisible(true);
14
                        customDialog.setVisible(true);
19
					}
20
				});
21
			}
22
		
15
                    }
16
                });
17
            }
23
});
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
    DIALOG_TYPE_VIEWDIALOG_TYPE_SEQUENCEVARIABLE_NAME_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.DropSequenceCommand.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 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_SEQUENCE) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type net.sourceforge.squirrel_sql.plugins.refactoring.commands.RenameViewCommand.i18n does not match with type net.sourceforge.squirrel_sql.plugins.refactoring.commands.DropSequenceCommand.i18n
    • Make classes net.sourceforge.squirrel_sql.plugins.refactoring.commands.RenameViewCommand.i18n and net.sourceforge.squirrel_sql.plugins.refactoring.commands.DropSequenceCommand.i18n extend a common superclass
    1
    _session.getApplication().getThreadPool().addTask(new Runnable() {...});
    Precondition Violations (3)
    Row Violation
    1Expression new RenameTableDialog(_info,RenameTableDialog.DIALOG_TYPE_VIEW) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression new DefaultDropDialog(_info,DefaultDropDialog.DIALOG_TYPE_SEQUENCE) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Type net.sourceforge.squirrel_sql.plugins.refactoring.commands.RenameViewCommand.i18n does not match with type net.sourceforge.squirrel_sql.plugins.refactoring.commands.DropSequenceCommand.i18n