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/DropIndexTableCommand.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 | }); | |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.0 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 6 |
Number of mapped statements | 4 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 2 |
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() {...}); |
Row | Violation |
---|---|
1 | 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 |