_session.getApplication().getThreadPool().addTask(new Runnable() { public void run() { GUIUtils.processOnSwingEventThread(new Runnable() { public void run() { customDialog = new DefaultDropDialog(_dropIndexInfo, DefaultDropDialog.DIALOG_TYPE_INDEX); 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/DropIndexTableCommand.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
            public void run() {
2
            public void run() {
3
                GUIUtils.processOnSwingEventThread(new Runnable() {
3
                GUIUtils.processOnSwingEventThread(new Runnable() {
4
                    public void run() {
4
                    public void run() {
5
                        customDialog = new DefaultDropDialog(_dropIndexInfo, DefaultDropDialog.DIALOG_TYPE_INDEX);
5
                        customDialog = new DefaultDropDialog(_info, DefaultDropDialog.DIALOG_TYPE_SEQUENCE);
6
                        customDialog.addExecuteListener(new ExecuteListener());
6
                        customDialog.addExecuteListener(new ExecuteListener());
7
                        customDialog.addEditSQLListener(new EditSQLListener(customDialog));
7
                        customDialog.addEditSQLListener(new EditSQLListener(customDialog));
8
                        customDialog.addShowSQLListener(new ShowSQLListener(i18n.SHOWSQL_DIALOG_TITLE, customDialog));
8
                        customDialog.addShowSQLListener(new ShowSQLListener(i18n.SHOWSQL_DIALOG_TITLE, customDialog));
9
                        customDialog.setLocationRelativeTo(_session.getApplication().getMainFrame());
9
                        customDialog.setLocationRelativeTo(_session.getApplication().getMainFrame());
10
                        customDialog.setVisible(true);
10
                        customDialog.setVisible(true);
11
                    }
11
                    }
12
                });
12
                });
13
            }
13
            }
14
        });
14
        });
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
    _dropIndexInfo_infoVARIABLE_NAME_MISMATCH
    net.sourceforge.squirrel_sql.fw.sql.IndexInfo[]net.sourceforge.squirrel_sql.fw.sql.IDatabaseObjectInfo[]VARIABLE_TYPE_MISMATCH
    DIALOG_TYPE_INDEXDIALOG_TYPE_SEQUENCEVARIABLE_NAME_MISMATCH
    net.sourceforge.squirrel_sql.plugins.refactoring.commands.DropIndexTableCommand.i18nnet.sourceforge.squirrel_sql.plugins.refactoring.commands.DropSequenceCommand.i18nVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type net.sourceforge.squirrel_sql.fw.sql.IndexInfo[] of variable _dropIndexInfo does not match with type net.sourceforge.squirrel_sql.fw.sql.IDatabaseObjectInfo[] of variable _info
    • Make classes net.sourceforge.squirrel_sql.fw.sql.IndexInfo[] and net.sourceforge.squirrel_sql.fw.sql.IDatabaseObjectInfo[] extend a common superclass
    Type net.sourceforge.squirrel_sql.plugins.refactoring.commands.DropIndexTableCommand.i18n does not match with type net.sourceforge.squirrel_sql.plugins.refactoring.commands.DropSequenceCommand.i18n
    • Make classes net.sourceforge.squirrel_sql.plugins.refactoring.commands.DropIndexTableCommand.i18n and net.sourceforge.squirrel_sql.plugins.refactoring.commands.DropSequenceCommand.i18n extend a common superclass
    1
    _session.getApplication().getThreadPool().addTask(new Runnable() {...});
    Precondition Violations (2)
    Row Violation
    1Type net.sourceforge.squirrel_sql.fw.sql.IndexInfo[] of variable _dropIndexInfo does not match with type net.sourceforge.squirrel_sql.fw.sql.IDatabaseObjectInfo[] of variable _info
    2Type net.sourceforge.squirrel_sql.plugins.refactoring.commands.DropIndexTableCommand.i18n does not match with type net.sourceforge.squirrel_sql.plugins.refactoring.commands.DropSequenceCommand.i18n