Buggy code:
abstract class BinaryDecimal extends NumberDataType implements VariableSizeDataValue { private static final byte [ ] ONE_2C = new byte [ ] { ( ( byte ) ( 1 ) ) } ; protected byte [ ] data2c ; protected int sqlScale ; BinaryDecimal ( ) { } public final int typeToBigDecimal ( ) { } public final int typePrecedence ( ) { } public final String getTypeName ( ) { } public final int getTypeFormatId ( ) { } public boolean isNull ( ) { } public void restoreToNull ( ) { } protected boolean isNegative ( ) { } public void setValue ( long theValue ) { } public final void setValue ( int theValue ) { } public final void setValue ( double theValue ) throws StandardException { } public final void setValue ( float theValue ) throws StandardException { } private void setCoreValue ( double theValue ) throws StandardException { } public void setValue ( Number theValue ) throws StandardException { } protected void setFrom ( DataValueDescriptor dvd ) throws StandardException { } public final int getInt ( ) throws StandardException { } public final byte getByte ( ) throws StandardException { } public final short getShort ( ) throws StandardException { } public final NumberDataValue plus ( NumberDataValue addend1 , NumberDataValue addend2 , NumberDataValue result ) throws StandardException { } public final NumberDataValue times ( NumberDataValue left , NumberDataValue right , NumberDataValue result ) throws StandardException { } public NumberDataValue divide ( NumberDataValue dividend , NumberDataValue divisor , NumberDataValue result ) throws StandardException { } public final NumberDataValue divide ( NumberDataValue dividend , NumberDataValue divisor , NumberDataValue result , int scale ) throws StandardException { } public final NumberDataValue minus ( NumberDataValue left , NumberDataValue right , NumberDataValue result ) throws StandardException { } public NumberDataValue minusNN ( NumberDataValue left , NumberDataValue right , NumberDataValue result ) throws StandardException { } public abstract NumberDataValue timesNN ( NumberDataValue left , NumberDataValue right , NumberDataValue result ) throws StandardException { } public abstract NumberDataValue plusNN ( NumberDataValue addend1 , NumberDataValue addend2 , NumberDataValue result ) throws StandardException { } public abstract NumberDataValue divideNN ( NumberDataValue dividend , NumberDataValue divisor , NumberDataValue result , int scale ) throws StandardException { } private static byte [ ] reduceBytes2c ( byte [ ] rd , int offset , int dataLength ) { } public int getDecimalValueScale ( ) { } public void writeExternal ( ObjectOutput out ) throws IOException { } public void readExternal ( ObjectInput in ) throws IOException { } public void readExternalFromArray ( ArrayInputStream in ) throws IOException { } public final int getLength ( ) { } public DataValueDescriptor getClone ( ) { } public void setValueFromResultSet ( ResultSet resultSet , int colNumber , boolean isNullable ) throws SQLException , StandardException { } public int estimateMemoryUsage ( ) { } public int hashCode ( ) { if ( isNull ( ) ) return 0 ; try { <START_BUG> return ( ( int ) ( Double . doubleToLongBits ( getDouble ( ) ) ) ) ; <END_BUG> } catch ( StandardException se ) { return 0 ; } } }

Fix:
return ( ( int ) ( getLong ( ) ) ) ;