File path: /sql12/plugins/mssql/src/net/sourceforge/squirrel_sql/plugins/mssql/action/GenerateSqlAction.java | File path: /sql12/plugins/mssql/src/net/sourceforge/squirrel_sql/plugins/mssql/action/ScriptProcedureAction.java | |||
Method name: void actionPerformed(ActionEvent)
|
Method name: void actionPerformed(ActionEvent)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | if (_session != null) {↵ | |||
2 | IObjectTreeAPI treeAPI = _session.getSessionInternalFrame().getObjectTreeAPI();↵ | 1 | IObjectTreeAPI treeAPI = _session.getSessionInternalFrame().getObjectTreeAPI();↵ | |
3 | IDatabaseObjectInfo[] dbObjs = treeAPI.getSelectedDatabaseObjects();↵ | 2 | final IDatabaseObjectInfo[] dbObjs = treeAPI.getSelectedDatabaseObjects();↵ | |
4 | ↵ | 3 | ↵ | |
4 | if (dbObjs.length > 0) {↵ | |||
5 | try {↵ | 5 | try {↵ | |
6 | new GenerateSqlCommand(_session, _plugin, dbObjs).execute();↵ | 6 | new ScriptProcedureCommand(_session, _plugin, dbObjs).execute();↵ | |
7 | }↵ | 7 | ↵ | |
8 | }↵ | |||
8 | catch (Throwable th) {↵ | 9 | catch (Throwable th) {↵ | |
9 | _session.showErrorMessage(th);↵ | 10 | _session.showErrorMessage(th);↵ | |
10 | }↵ | 11 | ↵ | |
11 | ↵ | 12 | }↵ | |
12 | } | 13 | } | |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.3 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 5 |
Number of mapped statements | 2 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 1.8 |
Clone type | Type 3 |
ID | Statement | ID | Statement | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2 | IObjectTreeAPI treeAPI = _session.getSessionInternalFrame().getObjectTreeAPI(); | | |||||||||||||
3 | IDatabaseObjectInfo[] dbObjs = treeAPI.getSelectedDatabaseObjects(); | | |||||||||||||
4 | try | 5 | try | ||||||||||||
5 | new GenerateSqlCommand(_session, _plugin, dbObjs).execute(); |
| 6 | new ScriptProcedureCommand(_session, _plugin, dbObjs).execute(); |
Row | Violation |
---|---|
1 | Expression new GenerateSqlCommand(_session,_plugin,dbObjs) cannot be parameterized, because it has dependencies to/from statements that will be extracted |