if ( !ignoreInitialJoin ) { JoinSequence ojf = q.getPathJoin( path.toString() ); try { joinSequence.addCondition( ojf.toJoinFragment( q.getEnabledFilters(), true ).toWhereFragmentString() ); //after reset! } catch ( MappingException me ) { throw new QueryException( me ); } // we don't need to worry about any condition in the ON clause // here (toFromFragmentString), since anything in the ON condition // is already applied to the whole query }
try { // check to see if the connection is in auto-commit // mode (no connection means aggressive connection // release outside a JTA transaction context, so MUST // be autocommit mode) boolean isAutocommit = connectionManager.isAutoCommit(); connectionManager.afterTransaction(); if ( isAutocommit ) { owner.afterTransactionCompletion(success, null); } } catch (SQLException sqle) { throw JDBCExceptionHelper.convert( owner.getFactory().getSQLExceptionConverter(), sqle, "could not inspect JDBC autocommit mode" ); }
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/hql/classic/PathExpressionParser.java File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/jdbc/JDBCContext.java
Method name: void token(String, QueryTranslatorImpl) Method name: void afterNontransactionalQuery(boolean)
Number of AST nodes: 4 Number of AST nodes: 5
1
if ( !ignoreInitialJoin ) {
2
				JoinSequence ojf = q.getPathJoin( path.toString() );
3
				try {
4
					joinSequence.addCondition( ojf.toJoinFragment( q.getEnabledFilters(), true ).toWhereFragmentString() ); //after reset!
5
	
1
try {
2
			// check to see if the connection is in auto-commit 
3
			// mode (no connection means aggressive connection
4
			// release outside a JTA transaction context, so MUST
5
			// be autocommit mode)
6
			boolean isAutocommit = connectionManager.isAutoCommit();
7
			connectionManager.afterTransaction();
8
			
9
			if ( isAutocommit ) {
10
				owner.afterTransactionCompletion(success, null);
6
			}
11
			}
7
		
12
		}
8
		catch ( MappingException me ) {
13
		catch (SQLException sqle) {
9
					throw new QueryException( me );
14
			throw 
10
				}
11
				// we don't need to worry about any condition in the ON clause
12
				// here (toFromFragmentString), since anything in the ON condition
13
				// is already applied to the whole query
14
	
15
JDBCExceptionHelper.convert( 
16
					owner.getFactory().getSQLExceptionConverter(),
17
					sqle,
18
					"could not inspect JDBC autocommit mode"
19
				);
15
		}
20
		}
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 comparisons1