Buggy code:
abstract class SQLBinary extends DataType implements BitDataValue { static final byte PAD = ( ( byte ) ( 32 ) ) ; private static final int BASE_MEMORY_USAGE = ClassSize . estimateBaseFromCatalog ( SQLBinary . class ) ; public int estimateMemoryUsage ( ) { } abstract int getMaxMemoryUsage ( ) { } byte [ ] dataValue ; InputStream stream ; int streamValueLength ; SQLBinary ( ) { } SQLBinary ( byte [ ] val ) { } public final void setValue ( byte [ ] theValue ) { } public final String getString ( ) throws StandardException { } public final InputStream getStream ( ) { } public final byte [ ] getBytes ( ) throws StandardException { } byte [ ] getValue ( ) throws StandardException { } public final int getLength ( ) throws StandardException { } private void throwStreamingIOException ( IOException ioe ) throws StandardException { } public final boolean isNull ( ) { } public final void writeExternal ( ObjectOutput out ) throws IOException { } public final void readExternal ( ObjectInput in ) throws IOException { } public final void readExternalFromArray ( ArrayInputStream in ) throws IOException { } private static int readBinaryLength ( ObjectInput in ) throws IOException { } private void readFromStream ( InputStream in ) throws IOException { } public final void restoreToNull ( ) { } public final boolean compare ( int op , DataValueDescriptor other , boolean orderedNulls , boolean unknownRV ) throws StandardException { } public final int compare ( DataValueDescriptor other ) throws StandardException { } public final Object cloneObject ( ) { } public final DataValueDescriptor getClone ( ) { } public final InputStream returnStream ( ) { } public final void setStream ( InputStream newStream ) { } public final void loadStream ( ) throws StandardException { } boolean objectNull ( Object o ) { } public final void setValue ( InputStream theStream , int valueLength ) { } protected final void setFrom ( DataValueDescriptor theValue ) throws StandardException { } public final BooleanDataValue equals ( DataValueDescriptor left , DataValueDescriptor right ) throws StandardException { } public final BooleanDataValue notEquals ( DataValueDescriptor left , DataValueDescriptor right ) throws StandardException { } public final BooleanDataValue lessThan ( DataValueDescriptor left , DataValueDescriptor right ) throws StandardException { } public final BooleanDataValue greaterThan ( DataValueDescriptor left , DataValueDescriptor right ) throws StandardException { } public final BooleanDataValue lessOrEquals ( DataValueDescriptor left , DataValueDescriptor right ) throws StandardException { } public final BooleanDataValue greaterOrEquals ( DataValueDescriptor left , DataValueDescriptor right ) throws StandardException { } public final NumberDataValue charLength ( NumberDataValue result ) throws StandardException { } public final BitDataValue concatenate ( BitDataValue left , BitDataValue right , BitDataValue result ) throws StandardException { } public final ConcatableDataValue substring ( NumberDataValue start , NumberDataValue length , ConcatableDataValue result , int maxLen ) throws StandardException { } public final void checkHostVariable ( int declaredLength ) throws StandardException { int variableLength = - 1 ; if ( ( stream ) == null ) { if ( ( dataValue ) != null ) variableLength = dataValue . length ; } else { variableLength = streamValueLength ; } if ( ( variableLength != ( - 1 ) ) && ( variableLength > declaredLength ) ) <START_BUG> throw StandardException . newException ( LANG_STRING_TRUNCATION , getTypeName ( ) , "XX-RESOLVE-XX" , String . valueOf ( declaredLength ) ) ; <END_BUG> } public final String toString ( ) { } public final int hashCode ( ) { } private static int compare ( byte [ ] left , byte [ ] right ) { } public void setInto ( PreparedStatement ps , int position ) throws SQLException , StandardException { } public final String getTraceString ( ) throws StandardException { } }

Fix:
throw StandardException . newException ( LANG_STRING_TRUNCATION , getTypeName ( ) , "(Binary<seq2seq4repair_space>data<seq2seq4repair_space>value<seq2seq4repair_space>not<seq2seq4repair_space>displayed)" , String . valueOf ( declaredLength ) ) ;