CommandExecHandler handler = new CommandExecHandler(_session); SQLExecuterTask executer = new SQLExecuterTask(_session, script, handler); executer.run(); // Execute the sql synchronously _session.getApplication().getThreadPool().addTask(new Runnable() { public void run() { GUIUtils.processOnSwingEventThread(new Runnable() { public void run() { customDialog.setVisible(false); for (IDatabaseObjectInfo dbinfo : _info) { _session.getSchemaInfo().reload(dbinfo); } } }); } });
CommandExecHandler handler = new CommandExecHandler(_session); SQLExecuterTask executer = new SQLExecuterTask(_session, script, handler); executer.run(); // Execute the sql synchronously _session.getApplication().getThreadPool().addTask(new Runnable() { public void run() { GUIUtils.processOnSwingEventThread(new Runnable() { public void run() { customDialog.setVisible(false); _session.getSchemaInfo().reloadAll(); } }); } });
Clone fragments detected by clone detection tool
File path: /sql12/plugins/refactoring/src/net/sourceforge/squirrel_sql/plugins/refactoring/commands/DropForeignKeyCommand.java File path: /sql12/plugins/refactoring/src/net/sourceforge/squirrel_sql/plugins/refactoring/commands/DropSequenceCommand.java
Method name: void executeScript(String) Method name: void executeScript(String)
Number of AST nodes: 4 Number of AST nodes: 4
1
CommandExecHandler handler = new CommandExecHandler(_session);
1
CommandExecHandler handler = new CommandExecHandler(_session);
2
		SQLExecuterTask executer = new SQLExecuterTask(_session, script, handler);
2
        SQLExecuterTask executer = new SQLExecuterTask(_session, script, handler);
3
		executer.run(); // Execute the sql synchronously
3
        executer.run(); // Execute the sql synchronously
4
		_session.getApplication().getThreadPool().addTask(new Runnable()
4
        _session.getApplication().getThreadPool().addTask(new Runnable()
5
		{
6
			
5
 {
7
public void run()
6
            public void run()
8
			{
9
				
7
 {
10
GUIUtils.processOnSwingEventThread(new Runnable()
8
                GUIUtils.processOnSwingEventThread(new Runnable()
11
				{
12
					public void run()
13
					{
14
						customDialog.setVisible(false);
15
						for (IDatabaseObjectInfo dbinfo : _info)
16
						{
17
							_session.getSchemaInfo().reload(dbinfo);
18
						}
19
					}
20
				});
21
			}
22
		
9
 {
10
                    public void run() {
11
                        customDialog.setVisible(false);
12
                        _session.getSchemaInfo().reloadAll();
13
                    }
14
                });
15
            }
23
});
16
        });
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 comparisons6
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements4
    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
    CommandExecHandler handler = new CommandExecHandler(_session);
    1
    CommandExecHandler handler = new CommandExecHandler(_session);
    2
    SQLExecuterTask executer = new SQLExecuterTask(_session, script, handler);
    2
    SQLExecuterTask executer = new SQLExecuterTask(_session, script, handler);
    3
    executer.run();
    3
    executer.run();
    4
    _session.getApplication().getThreadPool().addTask(new Runnable() {...});
    4
    _session.getApplication().getThreadPool().addTask(new Runnable() {...});
    4
    _session.getApplication().getThreadPool().addTask(new Runnable() {...});
    Differences
    Expression1Expression2Difference
    { public void run(){ customDialog.setVisible(false); for ( IDatabaseObjectInfo dbinfo : _info) { _session.getSchemaInfo().reload(dbinfo); } } } { public void run(){ customDialog.setVisible(false); _session.getSchemaInfo().reloadAll(); } } ANONYMOUS_CLASS_DECLARATION_MISMATCH
    Preondition Violations
    Expression new Runnable(){ public void run(){ customDialog.setVisible(false); for ( IDatabaseObjectInfo dbinfo : _info) { _session.getSchemaInfo().reload(dbinfo); } } } cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4
    _session.getApplication().getThreadPool().addTask(new Runnable() {...});
    Precondition Violations (1)
    Row Violation
    1Expression new Runnable(){ public void run(){ customDialog.setVisible(false); for ( IDatabaseObjectInfo dbinfo : _info) { _session.getSchemaInfo().reload(dbinfo); } } } cannot be parameterized, because it has dependencies to/from statements that will be extracted