File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/jdbc/ConnectionManager.java | File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/jdbc/AbstractBatcher.java | |||
Method name: void closeConnection()
|
Method name: void closeConnection(Connection)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 3 | |||
1 | if ( !connection.isClosed() ) {↵ | 1 | if ( !conn.isClosed() ) {↵ | |
2 | JDBCExceptionReporter.logAndClearWarnings( connection );↵ | 2 | JDBCExceptionReporter.logAndClearWarnings( conn );↵ | |
3 | }↵ | 3 | }↵ | |
4 | factory.getConnectionProvider().closeConnection( connection );↵ | 4 | factory.getConnectionProvider().closeConnection( conn↵ | |
5 | connection = null; | 5 | ); | |
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 |
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) | 2.2 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4 | if (!connection.isClosed()) |
| 7 | if (!conn.isClosed()) | ||||||||||
5 | JDBCExceptionReporter.logAndClearWarnings(connection); |
| 8 | JDBCExceptionReporter.logAndClearWarnings(conn); | ||||||||||
6 | factory.getConnectionProvider().closeConnection(connection); |
| 9 | factory.getConnectionProvider().closeConnection(conn); |
Row | Violation |
---|