File path: /sql12/plugins/editextras/src/net/sourceforge/squirrel_sql/plugins/editextras/RemoveNewLlinesAction.java | File path: /sql12/plugins/editextras/src/net/sourceforge/squirrel_sql/plugins/editextras/RemoveQuotesAction.java | |||
Method name: void actionPerformed(ActionEvent)
|
Method name: void actionPerformed(ActionEvent)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 3 | |||
1 | if (_session != null) {↵ | 1 | if (_session != null)↵ | |
2 | try {↵ | |||
3 | ↵ | |||
2 | {↵ | |||
3 | try↵ | |||
4 | {↵ | |||
4 | RemoveNewLinesCommand command = ↵ | 5 | //new RemoveQuotesCommand(_session.getSQLPanelAPI(_plugin)).execute();↵ | |
5 | new RemoveNewLinesCommand(↵ | 6 | new RemoveQuotesCommand(↵ | |
6 | FrameWorkAcessor.getSQLPanelAPI(_session, _plugin));↵ | 7 | FrameWorkAcessor.getSQLPanelAPI(_session, _plugin))↵ | |
7 | command.execute();↵ | |||
8 | } ↵ | 8 | .execute();↵ | |
9 | }↵ | |||
9 | catch (Throwable ex) {↵ | 10 | catch (Throwable ex)↵ | |
10 | ↵ | |||
11 | {↵ | |||
11 | // i18n[editextras.errorRemoveNewLines=Error processing Remove↵ | 12 | // i18n[editextras.errorRemoveQuotes=Error processing Remove↵ | |
12 | // NewLines SQL command: {0}]↵ | 13 | Quotes SQL command: {0}]↵ | |
13 | final String msg = s_stringMgr.getString(↵ | 14 | final String msg = s_stringMgr.getString(↵ | |
14 | "editextras.errorRemoveNewLines", ex);↵ | 15 | "editextras.errorRemoveQuotes", ex);↵ | |
15 | _session.showErrorMessage(msg);↵ | 16 | _session.showErrorMessage(msg);↵ | |
16 | s_log.error(msg, ex);↵ | 17 | s_log.error(msg, ex);↵ | |
17 | }↵ | |||
18 | ↵ | 18 | }↵ | |
19 | } | 19 | } | |
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.4 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 7 |
Number of mapped statements | 3 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 7.2 |
Clone type | Type 3 |
ID | Statement | ID | Statement | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (_session != null) | 1 | if (_session != null) | ||||||||||||||||
2 | try |
| 2 | try | |||||||||||||||
3 | RemoveNewLinesCommand command = new RemoveNewLinesCommand(FrameWorkAcessor.getSQLPanelAPI(_session, _plugin)); |
| | ||||||||||||||||
4 | command.execute(); |
| 3 | new RemoveQuotesCommand(FrameWorkAcessor.getSQLPanelAPI(_session, _plugin)).execute(); |
Row | Violation |
---|---|
1 | Unmatched statement RemoveNewLinesCommand command=new RemoveNewLinesCommand(FrameWorkAcessor.getSQLPanelAPI(_session,_plugin)); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
2 | Expression command cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression new RemoveQuotesCommand(FrameWorkAcessor.getSQLPanelAPI(_session,_plugin)) cannot be parameterized, because it has dependencies to/from statements that will be extracted |