Buggy code:
public boolean getUseSchemaName ( ) { } public void setUseSchemaName ( boolean useSchema ) { } public boolean getUseForeignKeyName ( ) { } public void setUseForeignKeyName ( boolean useFK ) { } public boolean getNullableAsObject ( ) { } public void setNullableAsObject ( boolean nullAsObj ) { } public boolean getBlobAsObject ( ) { } public void setBlobAsObject ( boolean blobAsObj ) { } public Properties getTypeMap ( ) { } public void setTypeMap ( Properties typeMap ) { } public boolean getPrimaryKeyOnJoin ( ) { } public void setPrimaryKeyOnJoin ( boolean pkOnJoin ) { } public boolean getUseDataStoreIdentity ( ) { } public void setUseDataStoreIdentity ( boolean datastore ) { } public boolean getUseBuiltinIdentityClass ( ) { } public void setUseBuiltinIdentityClass ( boolean builtin ) { } public boolean getInnerIdentityClasses ( ) { } public void setInnerIdentityClasses ( boolean inner ) { } public String getIdentityClassSuffix ( ) { } public void setIdentityClassSuffix ( String suffix ) { } public boolean getInverseRelations ( ) { } public void setInverseRelations ( boolean inverse ) { } public boolean getDetachable ( ) { } public void setDetachable ( boolean detachable ) { } public String getDiscriminatorStrategy ( ) { } public void setDiscriminatorStrategy ( String discStrat ) { } public String getVersionStrategy ( ) { } public void setVersionStrategy ( String versionStrat ) { } public CodeFormat getCodeFormat ( ) { } public void setCodeFormat ( CodeFormat format ) { } public ReverseCustomizer getCustomizer ( ) { } public void setCustomizer ( ReverseCustomizer customizer ) { } public MappingRepository getRepository ( ) { } public void setRepository ( MappingRepository repos ) { } public SchemaGroup getSchemaGroup ( ) { } public void setSchemaGroup ( SchemaGroup schema ) { } public ClassMapping [ ] getMappings ( ) { } public void run ( ) { } private void mapTable ( Table table , int type ) { } private static boolean isBuiltinIdentity ( ClassMapping cls ) { } private static void setColumnJavaType ( ValueMapping vm ) { } private static void setForeignKeyJavaType ( ForeignKey fk ) { } public List recordCode ( ) throws IOException { } public List recordCode ( Map output ) throws IOException { } public Collection recordMetaData ( boolean perClass ) throws IOException { } public Collection recordMetaData ( boolean perClass , Map output ) throws IOException { } private ApplicationIdTool newApplicationIdTool ( ClassMapping mapping ) { } public ClassMapping getClassMapping ( Table table ) { } public ClassMapping newClassMapping ( Class cls , Table table ) { } private void setObjectIdType ( ClassMapping cls ) { } public Class generateClass ( String name , Class parent ) { } public boolean isUnique ( ForeignKey fk ) { } public ForeignKey getUniqueForeignKey ( Table table ) { } public void addJoinConstraints ( FieldMapping field ) { } public void addConstraints ( ValueMapping vm ) { } private Index findIndex ( Column [ ] cols ) { } private Unique findUnique ( Column [ ] cols ) { } public boolean isBaseTable ( Table table ) { } private int getSecondaryType ( Table table , boolean maybeBase ) { } private void mapBaseClass ( Table table ) { ClassMapping cls = newClassMapping ( table , null ) ; if ( cls == null ) return ; Column [ ] pks = table . getPrimaryKey ( ) . getColumns ( ) ; cls . setPrimaryKeyColumns ( pks ) ; <START_BUG> if ( ( ( ( pks . length ) == 1 ) && ( _datastore ) ) && ( pks [ 0 ] . isCompatible ( Types . BIGINT , 0 ) ) ) { <END_BUG> cls . setObjectIdType ( null , false ) ; cls . setIdentityType ( ID_DATASTORE ) ; } else if ( ( ( pks . length ) == 1 ) && ( _builtin ) ) cls . setObjectIdType ( null , false ) ; cls . setStrategy ( new FullClassStrategy ( ) , null ) ; if ( ( _custom ) != null ) _custom . customize ( cls ) ; } private void mapSubclasses ( Set tables ) { } private void mapAssociationTable ( Table table ) { } private void mapSecondaryTable ( Table table , boolean outer ) { } private void mapColumns ( ClassMapping cls , Table table , ForeignKey join , boolean outer ) { } private static boolean isForeignKeyColumn ( Column col ) { } private void mapForeignKey ( ClassMapping cls , ForeignKey fk , ForeignKey join , boolean outer ) { } private void mapColumn ( ClassMapping cls , Column col , ForeignKey join , boolean outer ) { } private ClassMapping newClassMapping ( Table table , Class parent ) { } public FieldMapping newFieldMapping ( String name , Class type , Column col , ForeignKey fk , ClassMapping dec ) { } private String getClassName ( Table table ) { } public String getFieldName ( String name , ClassMapping dec ) { } private String getRelationName ( Class fieldType , boolean coll , ForeignKey fk , boolean inverse , ClassMapping dec ) { } private static boolean allUpperCase ( String str ) { } static String replaceInvalidCharacters ( String str ) { } private String getUniqueName ( String name , ClassMapping dec ) { } public Class getFieldType ( Column col , boolean forceObject ) { } public Object clone ( ) { } public static void main ( String [ ] args ) throws IOException , SQLException { } public static boolean run ( JDBCConfiguration conf , String [ ] args , Options opts ) throws IOException , SQLException { } public static void run ( JDBCConfiguration conf , String [ ] args , ReverseMappingTool . Flags flags , ClassLoader loader ) throws IOException , SQLException { } public static class Flags { public String packageName = null ; public File directory = null ; public boolean useSchemaName = false ; public boolean useForeignKeyName = false ; public boolean nullableAsObject = false ;

Fix:
if ( ( ( ( pks . length ) == 1 ) && ( _datastore ) ) && ( pks [ 0 ] . isCompatible ( Types . BIGINT , null , 0 , 0 ) ) ) {