for ( int i = 0; i < ids.length; i++ ) { // Need to use the identifier type of the collection owner // since the incoming is value is actually the owner's id. // Using the collection's key type causes problems with // property-ref keys... s.append( persister.getOwnerEntityPersister().getIdentifierType().toLoggableString( ids[i], factory ) ); if ( i < ids.length-1 ) { s.append( ", " ); } }
for ( int i=0; i<bytes.length; i++ ) { String hexStr = Integer.toHexString( bytes[i] - Byte.MIN_VALUE ); if ( hexStr.length()==1 ) buf.append('0'); buf.append(hexStr); }
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/pretty/MessageHelper.java File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/type/AbstractBynaryType.java
Method name: String collectionInfoString(CollectionPersister, Serializable[], SessionFactoryImplementor) Method name: String toString(Object)
Number of AST nodes: 4 Number of AST nodes: 5
1
for ( int i = 0; i < ids.length; i++ ) {
1
for ( int i=0; i<bytes.length; i++ ) {
2
				// Need to use the identifier type of the collection owner
2
			
3
				// since the incoming is value is actually the owner's id.
4
				// Using the collection's key type causes problems with
5
				// property-ref keys...
6
				s.append( persister.getOwnerEntityPersister().getIdentifierType().toLoggableString( ids[i], factory ) );
3
String hexStr = Integer.toHexString( bytes[i] - Byte.MIN_VALUE );
7
				if ( i < ids.length-1 ) {
4
			if ( hexStr.length()==1 ) buf.append('0');
8
					s.append( ", " );
5
			buf.append(
9
				}
10
	
6
hexStr);
11
		}
7
		}
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.2
Clones locationClones are in different classes
Number of node comparisons1