Buggy code:
public final class SQLReal extends NumberDataType { public int getInt ( ) throws StandardException { } public byte getByte ( ) throws StandardException { } public short getShort ( ) throws StandardException { } public long getLong ( ) throws StandardException { } public float getFloat ( ) { } public double getDouble ( ) { } public BigDecimal getBigDecimal ( ) { if ( isNull ( ) ) return null ; <START_BUG> return new BigDecimal ( value ) ; <END_BUG> } public boolean getBoolean ( ) { } public String getString ( ) { } public int getLength ( ) { } public Object getObject ( ) { } public String getTypeName ( ) { } public int getTypeFormatId ( ) { } public boolean isNull ( ) { } public void writeExternal ( ObjectOutput out ) throws IOException { } public void readExternal ( ObjectInput in ) throws IOException { } public void readExternalFromArray ( ArrayInputStream in ) throws IOException { } public void restoreToNull ( ) { } protected int typeCompare ( DataValueDescriptor arg ) throws StandardException { } public DataValueDescriptor getClone ( ) { } public DataValueDescriptor getNewNull ( ) { } public void setValueFromResultSet ( ResultSet resultSet , int colNumber , boolean isNullable ) throws SQLException , StandardException { } public final void setInto ( PreparedStatement ps , int position ) throws SQLException { } public final void setInto ( ResultSet rs , int position ) throws SQLException , StandardException { } public SQLReal ( ) { } public SQLReal ( float val ) throws StandardException { } public SQLReal ( Float obj ) throws StandardException { } public void setValue ( String theValue ) throws StandardException { } public void setValue ( Number theValue ) throws StandardException { } public void setBigDecimal ( Number bigDecimal ) throws StandardException { } public void setValue ( float theValue ) throws StandardException { } public void setValue ( short theValue ) { } public void setValue ( int theValue ) { } public void setValue ( byte theValue ) { } public void setValue ( long theValue ) { } public void setValue ( double theValue ) throws StandardException { } public void setValue ( boolean theValue ) { } public void setValue ( Object theValue ) throws StandardException { } protected void setFrom ( DataValueDescriptor theValue ) throws StandardException { } public int typePrecedence ( ) { } public BooleanDataValue equals ( DataValueDescriptor left , DataValueDescriptor right ) throws StandardException { } public BooleanDataValue notEquals ( DataValueDescriptor left , DataValueDescriptor right ) throws StandardException { } public BooleanDataValue lessThan ( DataValueDescriptor left , DataValueDescriptor right ) throws StandardException { } public BooleanDataValue greaterThan ( DataValueDescriptor left , DataValueDescriptor right ) throws StandardException { } public BooleanDataValue lessOrEquals ( DataValueDescriptor left , DataValueDescriptor right ) throws StandardException { } public BooleanDataValue greaterOrEquals ( DataValueDescriptor left , DataValueDescriptor right ) throws StandardException { } public NumberDataValue plus ( NumberDataValue addend1 , NumberDataValue addend2 , NumberDataValue result ) throws StandardException { } public NumberDataValue minus ( NumberDataValue left , NumberDataValue right , NumberDataValue result ) throws StandardException { } public NumberDataValue times ( NumberDataValue left , NumberDataValue right , NumberDataValue result ) throws StandardException { } public NumberDataValue divide ( NumberDataValue dividend , NumberDataValue divisor , NumberDataValue result ) throws StandardException { } public NumberDataValue minus ( NumberDataValue result ) throws StandardException { } protected boolean isNegative ( ) { } public String toString ( ) { } public int hashCode ( ) { } static final int REAL_LENGTH = 16 ; private static final int BASE_MEMORY_USAGE = ClassSize . estimateBaseFromCatalog ( SQLReal . class ) ; public int estimateMemoryUsage ( ) { } private float value ; private boolean isnull ; }

Fix:
return new BigDecimal ( Float . toString ( value ) ) ;