boolean include = includeOldField[i] && isPropertyOfTable( i, j ) && versionability[i]; //TODO: is this really necessary???? if ( include ) { boolean[] settable = types[i].toColumnNullness( oldFields[i], getFactory() ); types[i].nullSafeSet( update, oldFields[i], index, settable, session ); index += ArrayHelper.countTrue(settable); }
for ( int i = 0; i < entityMetamodel.getPropertySpan(); i++ ) { if ( isPropertyOfTable( i, j ) && versionability[i] ) { // this property belongs to the table and it is not specifically // excluded from optimistic locking by optimistic-lock="false" boolean[] settable = types[i].toColumnNullness( loadedState[i], getFactory() ); types[i].nullSafeSet( delete, loadedState[i], index, settable, session ); index += ArrayHelper.countTrue( settable );
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/persister/entity/AbstractEntityPersister.java File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/persister/entity/AbstractEntityPersister.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
boolean include = includeOldField[i] &&
2
		
1
for ( int i = 0; i < entityMetamodel.getPropertySpan(); i++ ) {
3
						isPropertyOfTable( i, j ) &&
2
						if ( isPropertyOfTable( i, j ) &&
4
								versionability[i]; //TODO: is this really necessary????
3
 versionability[i]
5
						if ( include ) {
4
 ) {
5
							// this property belongs to the table and it is not specifically
6
							// excluded from optimistic locking by optimistic-lock="false"
6
							boolean[] settable = types[i].toColumnNullness( oldFields[i], getFactory() );
7
							boolean[] settable = types[i].toColumnNullness( loadedState[i], getFactory() );
7
							types[i].nullSafeSet(
8
							types[i].nullSafeSet(
8
									update,
9
									oldFields[i],
10
									index,
11
									settable,
12
									session
13
								);
9
 delete, loadedState[i], index, settable, session );
14
							index += ArrayHelper.countTrue(settable);
10
							index += ArrayHelper.countTrue( settable );
15
						}
11
						
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 location
Number of node comparisons0