Buggy code:
public class PreparedStatement extends Statement implements java . sql . PreparedStatement , PreparedStatementCallbackInterface { public MaterialPreparedStatement materialPreparedStatement_ = null ; public String sql_ ; public boolean outputRegistered_ = false ; public Object [ ] parameters_ ; boolean [ ] parameterSet_ ; boolean [ ] parameterRegistered_ ; void setInput ( int parameterIndex , Object input ) { } public ColumnMetaData parameterMetaData_ ; private ArrayList parameterTypeList ; String positionedUpdateCursorName_ = null ; protected final ClientPooledConnection pooledConnection_ ; private void initPreparedStatement ( ) { } protected void initResetPreparedStatement ( ) { } public void reset ( boolean fullReset ) throws SqlException { } void resetForReuse ( ) throws SqlException { } private void resetParameters ( ) { } public PreparedStatement ( Agent agent , Connection connection , String sql , Section section , ClientPooledConnection cpc ) throws SqlException { } public void resetPreparedStatement ( Agent agent , Connection connection , String sql , Section section ) throws SqlException { } private void initPreparedStatement ( String sql , Section section ) throws SqlException { } public PreparedStatement ( Agent agent , Connection connection , String sql , int type , int concurrency , int holdability , int autoGeneratedKeys , String [ ] columnNames , int [ ] columnIndexes , ClientPooledConnection cpc ) throws SqlException { } public void resetPreparedStatement ( Agent agent , Connection connection , String sql , int type , int concurrency , int holdability , int autoGeneratedKeys , String [ ] columnNames , int [ ] columnIndexes ) throws SqlException { } private void initPreparedStatement ( String sql ) throws SqlException { } public void resetPreparedStatement ( Agent agent , Connection connection , String sql , Section section , ColumnMetaData parameterMetaData , ColumnMetaData resultSetMetaData ) throws SqlException { } private void initPreparedStatement ( ColumnMetaData parameterMetaData , ColumnMetaData resultSetMetaData ) { } void prepare ( ) throws SqlException { } public void addBatch ( String sql ) throws SQLException { } public boolean execute ( String sql ) throws SQLException { } public ResultSet executeQuery ( String sql ) throws SQLException { } public int executeUpdate ( String sql ) throws SQLException { } public ResultSet executeQuery ( ) throws SQLException { } ResultSet executeQueryX ( ) throws SqlException { } public int executeUpdate ( ) throws SQLException { } private int executeUpdateX ( ) throws SqlException { } public void setNull ( int parameterIndex , int jdbcType ) throws SQLException { } void setNullX ( int parameterIndex , int jdbcType ) throws SqlException { } public void setNull ( int parameterIndex , int jdbcType , String typeName ) throws SQLException { } public void setBoolean ( int parameterIndex , boolean x ) throws SQLException { try { synchronized ( connection_ ) { if ( agent_ . loggingEnabled ( ) ) { logWriter_ . traceEntry ( this , "setBoolean" , parameterIndex , x ) ; } final int paramType = getColumnMetaDataX ( ) . getColumnType ( parameterIndex ) ; if ( ! ( PreparedStatement . PossibleTypes . POSSIBLE_TYPES_IN_SET_GENERIC_SCALAR . checkType ( paramType ) ) ) { PreparedStatement . PossibleTypes . throw22005Exception ( logWriter_ , Types . BOOLEAN , paramType ) ; } parameterMetaData_ . clientParamtertype_ [ ( parameterIndex - 1 ) ] = Types . BIT ; <START_BUG> setInput ( parameterIndex , new Short ( ( ( short ) ( x ? 1 : 0 ) ) ) ) ; <END_BUG> } } catch ( SqlException se ) { throw se . getSQLException ( ) ; } } public void setByte ( int parameterIndex , byte x ) throws SQLException { } public void setShort ( int parameterIndex , short x ) throws SQLException { } void setShortX ( int parameterIndex , short x ) throws SqlException { } public void setInt ( int parameterIndex , int x ) throws SQLException { } void setIntX ( int parameterIndex , int x ) throws SqlException { } public void setLong ( int parameterIndex , long x ) throws SQLException { } void setLongX ( final int parameterIndex , final long x ) { } public void setFloat ( int parameterIndex , float x ) throws SQLException { } public void setDouble ( int parameterIndex , double x ) throws SQLException { } public void setBigDecimal ( int parameterIndex , BigDecimal x ) throws SQLException { } public void setDate ( int parameterIndex , Date x , Calendar calendar ) throws SQLException { } public void setDate ( int parameterIndex , Date x ) throws SQLException { } public void setTime ( int parameterIndex , Time x , Calendar calendar ) throws SQLException { } public void setTime ( int parameterIndex , Time x ) throws SQLException { } public void setTimestamp ( int parameterIndex , Timestamp x , Calendar calendar ) throws SQLException { } public void setTimestamp ( int parameterIndex , Timestamp x ) throws SQLException { } public void setString ( int parameterIndex , String x ) throws SQLException { } void setStringX ( int parameterIndex , String x ) throws SqlException { } public void setBytes ( int parameterIndex , byte [ ] x ) throws SQLException { } public void setBytesX ( int parameterIndex , byte [ ] x ) throws SqlException { } public void setBinaryStream ( int parameterIndex , InputStream x , long length ) throws SQLException { } public void setBinaryStream ( int parameterIndex , InputStream x , int length ) throws SQLException { } protected void setBinaryStreamX ( int parameterIndex , InputStream x , int length ) throws SqlException { } public void setAsciiStream ( int parameterIndex , InputStream x , long length ) throws SQLException { } public void setAsciiStream ( int parameterIndex , InputStream x , int length ) throws SQLException { } private void checkStreamLength ( long length ) throws SQLException { } private void checkTypeForSetAsciiStream ( int parameterIndex ) throws SQLException , SqlException { } private void checkTypeForSetBinaryStream ( int parameterIndex ) throws SQLException , SqlException { } private void checkTypeForSetCharacterStream ( int parameterIndex ) throws SQLException , SqlException { }

Fix:
setInput ( parameterIndex , Boolean . valueOf ( x ) ) ;