Buggy code:
public void writeOpenQuery ( NetStatement materialStatement , Section section , int fetchSize , int resultSetType ) throws SqlException { } public void writeDescribeInput ( NetPreparedStatement materialPreparedStatement , Section section ) throws SqlException { } public void writeDescribeOutput ( NetPreparedStatement materialPreparedStatement , Section section ) throws SqlException { } public void writeExecuteCall ( NetStatement materialStatement , boolean outputExpected , String procedureName , Section section , int fetchSize , boolean suppressResultSets , int resultSetType , ColumnMetaData parameterMetaData , Object [ ] inputs ) throws SqlException { } void buildOPNQRY ( Section section , boolean sendQueryRowSet , int fetchSize ) throws SqlException { } void buildEXCSQLIMM ( Section section , boolean sendQryinsid , long qryinsid ) throws SqlException { } void buildPRPSQLSTT ( Section section , String sql , boolean sendRtnsqlda , boolean sendTypsqlda , int typsqlda ) throws SqlException { } void buildEXCSQLSET ( Section section ) throws SqlException { } void buildEXCSQLSTT ( Section section , boolean sendOutexp , boolean outexp , boolean sendPrcnam , String prcnam , boolean sendQryblksz , boolean sendMaxrslcnt , int maxrslcnt , boolean sendMaxblkext , int maxblkext , boolean sendRslsetflg , int resultSetFlag , boolean sendQryrowset , int qryrowset ) throws SqlException { } void buildDSCSQLSTT ( Section section , boolean sendTypsqlda , int typsqlda ) throws SqlException { } boolean buildSQLDTAcommandData ( int numInputColumns , ColumnMetaData parameterMetaData , Object [ ] inputRow ) throws SqlException { } private void buildFDODSC ( int numColumns , int [ ] [ ] protocolTypesAndLengths , boolean overrideExists , Hashtable overrideMap , ArrayList overrideArray ) throws SqlException { } protected void buildSQLDTA ( int numColumns , int [ ] [ ] lidAndLengthOverrides , boolean overrideExists , Hashtable overrideMap , ArrayList overrideArray ) throws SqlException { } protected void buildSQLDTAGRP ( int numVars , int [ ] [ ] lidAndLengthOverrides , boolean mddRequired , Hashtable overrideMap ) throws SqlException { } protected void buildOUTOVR ( ResultSet resultSet , ColumnMetaData resultSetMetaData ) throws SqlException { } private int [ ] [ ] calculateOUTOVRLidAndLengthOverrides ( ResultSet resultSet , ColumnMetaData resultSetMetaData ) { } protected void buildSQLDTARD ( int numColumns , int [ ] [ ] lidAndLengthOverrides ) throws SqlException { } protected void buildSQLCADTA ( int numColumns , int [ ] [ ] lidAndLengthOverrides ) throws SqlException { } private void buildFDODTA ( int numVars , int [ ] [ ] protocolTypesAndLengths , Object [ ] inputs ) throws SqlException { try { Object o = null ; markLengthBytes ( FDODTA ) ; write1Byte ( NULL_LID ) ; for ( int i = 0 ; i < numVars ; i ++ ) { if ( ( inputs [ i ] ) == null ) { if ( ( ( protocolTypesAndLengths [ i ] [ 0 ] ) % 2 ) == 1 ) { write1Byte ( NULL_DATA ) ; } else { } } else { if ( ( ( protocolTypesAndLengths [ i ] [ 0 ] ) % 2 ) == 1 ) { write1Byte ( INDICATOR_NULLABLE ) ; } switch ( ( protocolTypesAndLengths [ i ] [ 0 ] ) | 1 ) { case DRDAConstants . DRDA_TYPE_NVARMIX : case DRDAConstants . DRDA_TYPE_NLONGMIX : o = retrievePromotedParameterIfExists ( i ) ; if ( o == null ) { writeSingleorMixedCcsidLDString ( ( ( String ) ( inputs [ i ] ) ) , typdef_ . getCcsidMbcEncoding ( ) ) ; } else { setFDODTALob ( netConnection_ . getSecurityMechanism ( ) , ( ( Clob ) ( o ) ) , protocolTypesAndLengths , i ) ; } break ; case DRDAConstants . DRDA_TYPE_NVARCHAR : case DRDAConstants . DRDA_TYPE_NLONG : o = retrievePromotedParameterIfExists ( i ) ; if ( o == null ) { } else { setFDODTALob ( netConnection_ . getSecurityMechanism ( ) , ( ( Clob ) ( o ) ) , protocolTypesAndLengths , i ) ; } break ; case DRDAConstants . DRDA_TYPE_NBOOLEAN : <START_BUG> write1Byte ( ( ( Short ) ( inputs [ i ] ) ) . shortValue ( ) ) ; <END_BUG> break ; case DRDAConstants . DRDA_TYPE_NINTEGER : writeIntFdocaData ( ( ( Integer ) ( inputs [ i ] ) ) . intValue ( ) ) ; break ; case DRDAConstants . DRDA_TYPE_NSMALL : writeShortFdocaData ( ( ( Short ) ( inputs [ i ] ) ) . shortValue ( ) ) ; break ; case DRDAConstants . DRDA_TYPE_NFLOAT4 : writeFloat ( ( ( Float ) ( inputs [ i ] ) ) . floatValue ( ) ) ; break ; case DRDAConstants . DRDA_TYPE_NFLOAT8 : writeDouble ( ( ( Double ) ( inputs [ i ] ) ) . doubleValue ( ) ) ; break ; case DRDAConstants . DRDA_TYPE_NDECIMAL : writeBigDecimal ( ( ( BigDecimal ) ( inputs [ i ] ) ) , ( ( ( protocolTypesAndLengths [ i ] [ 1 ] ) > > 8 ) & 255 ) , ( ( protocolTypesAndLengths [ i ] [ 1 ] ) & 255 ) ) ; break ; case DRDAConstants . DRDA_TYPE_NDATE : DateTimeValue dateVal = ( ( inputs [ i ] ) instanceof Date ) ? new DateTimeValue ( ( ( Date ) ( inputs [ i ] ) ) ) : ( ( DateTimeValue ) ( inputs [ i ] ) ) ; writeDate ( dateVal ) ; break ; case DRDAConstants . DRDA_TYPE_NTIME : DateTimeValue timeVal = ( ( inputs [ i ] ) instanceof Time ) ? new DateTimeValue ( ( ( Time ) ( inputs [ i ] ) ) ) : ( ( DateTimeValue ) ( inputs [ i ] ) ) ; writeTime ( timeVal ) ; break ; case DRDAConstants . DRDA_TYPE_NTIMESTAMP : DateTimeValue tsVal = ( ( inputs [ i ] ) instanceof Timestamp ) ? new DateTimeValue ( ( ( Timestamp ) ( inputs [ i ] ) ) ) : ( ( DateTimeValue ) ( inputs [ i ] ) ) ; writeTimestamp ( tsVal ) ; break ;

Fix:
writeBoolean ( ( ( Boolean ) ( inputs [ i ] ) ) . booleanValue ( ) ) ;