File path: /sql12/plugins/sqlscript/src/net/sourceforge/squirrel_sql/plugins/sqlscript/table_script/DropTableScriptCommand.java | File path: /sql12/plugins/sqlscript/src/net/sourceforge/squirrel_sql/plugins/sqlscript/table_script/CreateSelectScriptCommand.java | |||
Method name: void scriptTablesToSQLEntryArea(IDatabaseObjectInfo[])
|
Method name: void scriptSelectsToSQLEntryArea(IDatabaseObjectInfo[])
|
|||
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 | ↵ | 2 | {↵ | |
3 | public void run() {↵ | 3 | public void run()↵ | |
4 | ↵ | 4 | {↵ | |
5 | final String script = dropTableScriptString(dbObjs);↵ | 5 | final String script = createSelectScriptString(dbObjs);↵ | |
6 | if (script != null) {↵ | 6 | if (↵ | |
7 | null != script)↵ | |||
7 | ↵ | 8 | {↵ | |
8 | GUIUtils.processOnSwingEventThread(new Runnable() {↵ | 9 | GUIUtils.processOnSwingEventThread(new Runnable()↵ | |
9 | ↵ | 10 | {↵ | |
10 | public void run() {↵ | 11 | public void run()↵ | |
11 | ↵ | 12 | {↵ | |
12 | ISQLPanelAPI api = FrameWorkAcessor.getSQLPanelAPI(↵ | 13 | ISQLPanelAPI api = FrameWorkAcessor.getSQLPanelAPI(↵ | |
13 | _session, _plugin);↵ | 14 | _session, _plugin);↵ | |
14 | api.appendSQLScript(script, true);↵ | 15 | api.appendSQLScript(script, true);↵ | |
15 | int tabIdx = ISession.IMainPanelTabIndexes.SQL_TAB;↵ | 16 | _session.selectMainTab(ISession.IMainPanelTabIndexes.SQL_TAB);↵ | |
16 | _session.selectMainTab(tabIdx);↵ | |||
17 | }↵ | 17 | }↵ | |
18 | });↵ | 18 | });↵ | |
19 | }↵ | 19 | ↵ | |
20 | ↵ | 20 | }↵ | |
21 | }↵ | 21 | }↵ | |
22 | }); | 22 |
| |
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 |
Number of node comparisons | 1 |
Number of mapped statements | 1 |
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 | _session.getApplication().getThreadPool().addTask(new Runnable() {...}); |
| 1 | _session.getApplication().getThreadPool().addTask(new Runnable() {...}); |
Row | Violation |
---|---|
1 | Expression createSelectScriptString(dbObjs) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression script cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression script cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression new Runnable(){ public void run(){ ISQLPanelAPI api=FrameWorkAcessor.getSQLPanelAPI(_session,_plugin); api.appendSQLScript(script,true); int tabIdx=ISession.IMainPanelTabIndexes.SQL_TAB; _session.selectMainTab(tabIdx); } } cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression new Runnable(){ public void run(){ ISQLPanelAPI api=FrameWorkAcessor.getSQLPanelAPI(_session,_plugin); api.appendSQLScript(script,true); _session.selectMainTab(ISession.IMainPanelTabIndexes.SQL_TAB); } } cannot be parameterized, because it has dependencies to/from statements that will be extracted |