if ( connection != null ) { if ( transacted && wasAutoCommit ) { try { connection.setAutoCommit( true ); } catch( Throwable ignore ) { log.trace( "was unable to reset connection back to auto-commit" ); } } session.getBatcher().closeConnection( connection ); }
try { if ( statement != null ) { statement.close(); } if ( connection != null ) { connectionHelper.release(); } } catch ( Exception e ) { exceptions.add( e ); log.error( "Could not close connection", e ); }
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/engine/transaction/Isolater.java File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/tool/hbm2ddl/SchemaExport.java
Method name: void delegateWork(IsolatedWork, boolean) Method name: void execute(boolean, boolean, boolean, boolean)
Number of AST nodes: 5 Number of AST nodes: 5
1
if ( connection != null ) {
2
					if ( transacted && wasAutoCommit ) {
3
						try
1
try {
2
				if ( statement != null ) {
3
					statement.close();
4
				}
4
 {
5
				if ( connection != null ) {
5
							connection.setAutoCommit( true );
6
					connectionHelper.release();
6
						}
7
				}
7
			
8
			}
8
			catch( Throwable ignore ) {
9
			catch ( 
9
							log.trace( "was unable to reset connection back to auto-commit" );
10
						}
11
					}
12
					session.getBatcher().closeConnection(
10
Exception e ) {
11
				exceptions.add( e );
13
 connection );
12
				log.error( "Could not close connection", e );
14
				}
13
			}
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones locationClones are in different classes
Number of node comparisons0