File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/session/mainpanel/SQLResultExecuterPanel.java | File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/session/mainpanel/SQLPanel.java | |||
Method name: void run()
|
Method name: void run()
|
|||
Number of AST nodes: 8 | Number of AST nodes: 8 | |||
1 | final ISQLConnection conn = _session.getSQLConnection();↵ | 1 | final ISQLConnection conn = _session.getSQLConnection();↵ | |
2 | final SessionProperties props = _session.getProperties();↵ | 2 | final SessionProperties props = _session.getProperties();↵ | |
3 | if (conn != null)↵ | 3 | if (conn != null)↵ | |
4 | {↵ | 4 | {↵ | |
5 | boolean auto = true;↵ | 5 | boolean auto = true;↵ | |
6 | try↵ | 6 | try↵ | |
7 | {↵ | 7 | {↵ | |
8 | auto = conn.getAutoCommit();↵ | 8 | auto = conn.getAutoCommit();↵ | |
9 | }↵ | 9 | }↵ | |
10 | catch (SQLException ex)↵ | 10 | catch (SQLException ex)↵ | |
11 | {↵ | 11 | {↵ | |
12 | s_log.error("Error with transaction control", ex);↵ | 12 | s_log.error("Error with transaction control", ex);↵ | |
13 | _session.showErrorMessage(ex);↵ | 13 | _session.showErrorMessage(ex);↵ | |
14 | }↵ | 14 | }↵ | |
15 | try↵ | 15 | try↵ | |
16 | {↵ | 16 | {↵ | |
17 | conn.setAutoCommit(props.getAutoCommit());↵ | 17 | conn.setAutoCommit(props.getAutoCommit());↵ | |
18 | }↵ | 18 | }↵ | |
19 | catch (SQLException ex)↵ | 19 | catch (SQLException ex)↵ | |
20 | {↵ | 20 | {↵ | |
21 | props.setAutoCommit(auto);↵ | 21 | props.setAutoCommit(auto);↵ | |
22 | _session.showErrorMessage(ex);↵ | 22 | _session.showErrorMessage(ex);↵ | |
23 | }↵ | 23 | }↵ | |
24 | } | 24 |
| |
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) | 1.7 |
Clones location | Clones are in different classes |
Number of node comparisons | 21 |
Number of mapped statements | 8 |
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) | 7.0 |
Clone type | Type 1 |
ID | Statement | ID | Statement | |
---|---|---|---|---|
1 | final ISQLConnection conn = _session.getSQLConnection(); | 1 | final ISQLConnection conn = _session.getSQLConnection(); | |
2 | final SessionProperties props = _session.getProperties(); | 2 | final SessionProperties props = _session.getProperties(); | |
3 | if (conn != null) | 3 | if (conn != null) | |
4 | boolean auto = true; | 4 | boolean auto = true; | |
5 | try | 5 | try | |
6 | auto = conn.getAutoCommit(); | 6 | auto = conn.getAutoCommit(); | |
7 | try | 7 | try | |
8 | conn.setAutoCommit(props.getAutoCommit()); | 8 | conn.setAutoCommit(props.getAutoCommit()); |
Row | Violation |
---|