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().reload(_info[0]); } }); } });
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/ModifyColumnCommand.java File path: /sql12/plugins/refactoring/src/net/sourceforge/squirrel_sql/plugins/refactoring/commands/MergeTableCommand.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

2
		SQLExecuterTask executer = new SQLExecuterTask(_session, script, handler);
3
		SQLExecuterTask executer = new SQLExecuterTask(_session, script, handler);
3
		executer.run(); // Execute the sql synchronously
4
		executer.run(); // Execute the sql synchronously
5

4
		_session.getApplication().getThreadPool().addTask(new Runnable()
6
		_session.getApplication().getThreadPool().addTask(new Runnable()
5
		{
7
		{
6
			public void run()
8
			public void run()
7
			{
9
			{
8
				GUIUtils.processOnSwingEventThread(new Runnable()
10
				GUIUtils.processOnSwingEventThread(new Runnable()
9
				{
11
				{
10
					public void run()
12
					public void run()
11
					{
13
					{
12
						customDialog.setVisible(false);
14
						customDialog.setVisible(false);
13
						_session.getSchemaInfo().reload(_info[0]);
15
						_session.getSchemaInfo().reloadAll();
14
					}
16
					}
15
				});
17
				});
16
			}
18
			}
17
		});
19
		});
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
    net.sourceforge.squirrel_sql.client.gui.db.ColumnDetailDialognet.sourceforge.squirrel_sql.plugins.refactoring.gui.IMergeTableDialogSUBCLASS_TYPE_MISMATCH
    reloadreloadAllMETHOD_INVOCATION_NAME_MISMATCH
    _session.getSchemaInfo().reload(_info[0])_session.getSchemaInfo().reloadAll()ARGUMENT_NUMBER_MISMATCH
    Preondition Violations
    Expression customDialog cannot be unified with expression customDialog , because common superclass net.sourceforge.squirrel_sql.client.gui.db.IDisposableDialog does not declare member(s) public void setVisible(boolean)
    Expression _session.getSchemaInfo().reload(_info[0]) is a void method call, and thus it cannot be parameterized
    Expression _session.getSchemaInfo().reloadAll() is a void method call, and thus it cannot be parameterized
    Expression _session.getSchemaInfo().reload(_info[0]) is a void method call, and thus it cannot be parameterized
    Expression _session.getSchemaInfo().reloadAll() is a void method call, and thus it cannot be parameterized
    4
    _session.getApplication().getThreadPool().addTask(new Runnable() {...});
    Precondition Violations (5)
    Row Violation
    1Expression customDialog cannot be unified with expression customDialog , because common superclass net.sourceforge.squirrel_sql.client.gui.db.IDisposableDialog does not declare member(s) public void setVisible(boolean)
    2Expression _session.getSchemaInfo().reload(_info[0]) is a void method call, and thus it cannot be parameterized
    3Expression _session.getSchemaInfo().reloadAll() is a void method call, and thus it cannot be parameterized
    4Expression _session.getSchemaInfo().reload(_info[0]) is a void method call, and thus it cannot be parameterized
    5Expression _session.getSchemaInfo().reloadAll() is a void method call, and thus it cannot be parameterized