Buggy code:
static final int SDA_TRIPLET_SIZE = 12 ; static final int SQLDTA_RLO_SIZE = 6 ; static final int RLO_RPT_GRP_SIZE = 3 ; static final int SQLDTAGRP_SIZE = 3 ; static final int CPT_SIZE = 3 ; static final int FDODSC_FOOTER_SIZE = 6 ; static final int SQLDTAGRP_COL_DSC_SIZE = 3 ; static final int MAX_OVERRIDES = 250 ; static final int MDD_REST_SIZE = 5 ; static final byte [ ] SQLCADTA_MDD = new byte [ ] { ( ( byte ) ( 7 ) ) , ( ( byte ) ( 120 ) ) , ( ( byte ) ( 0 ) ) , ( ( byte ) ( 5 ) ) , ( ( byte ) ( 3 ) ) , ( ( byte ) ( 1 ) ) , ( ( byte ) ( 224 ) ) } ; static final byte [ ] SQLDTA_MDD = new byte [ ] { ( ( byte ) ( 7 ) ) , ( ( byte ) ( 120 ) ) , ( ( byte ) ( 0 ) ) , ( ( byte ) ( 5 ) ) , ( ( byte ) ( 4 ) ) , ( ( byte ) ( 1 ) ) , ( ( byte ) ( 240 ) ) } ; static final byte [ ] SQLDTAGRP_MDD = new byte [ ] { ( ( byte ) ( 7 ) ) , ( ( byte ) ( 120 ) ) , ( ( byte ) ( 0 ) ) , ( ( byte ) ( 5 ) ) , ( ( byte ) ( 2 ) ) , ( ( byte ) ( 1 ) ) , ( ( byte ) ( 208 ) ) } ; static final byte [ ] SQLCADTA_SQLDTARD_RLO = new byte [ ] { ( ( byte ) ( 9 ) ) , ( ( byte ) ( 113 ) ) , ( ( byte ) ( 224 ) ) , ( ( byte ) ( 84 ) ) , ( ( byte ) ( 0 ) ) , ( ( byte ) ( 1 ) ) , ( ( byte ) ( 208 ) ) , ( ( byte ) ( 0 ) ) , ( ( byte ) ( 1 ) ) , ( ( byte ) ( 6 ) ) , ( ( byte ) ( 113 ) ) , ( ( byte ) ( 240 ) ) , ( ( byte ) ( 224 ) ) , ( ( byte ) ( 0 ) ) , ( ( byte ) ( 0 ) ) } ; static final byte [ ] SQLDTA_RLO = new byte [ ] { ( ( byte ) ( 6 ) ) , ( ( byte ) ( 113 ) ) , ( ( byte ) ( 228 ) ) , ( ( byte ) ( 208 ) ) , ( ( byte ) ( 0 ) ) , ( ( byte ) ( 1 ) ) } ; static final int SQLCADTA_SQLDTARD_RLO_SIZE = FdocaConstants . SQLCADTA_SQLDTARD_RLO . length ; protected static boolean isNullable ( int fdocaType ) { } protected static int LONGVARCHAR_MAX_LEN = Limits . DB2_LONGVARCHAR_MAXWIDTH ; protected static int LONGVARBINARY_MAX_LEN = Limits . DB2_LONGVARCHAR_MAXWIDTH ; protected static int LONGVARCHAR_LEN_NUMBYTES = 2 ; protected static int NUMERIC_MAX_PRECISION = 31 ; protected static int NUMERIC_DEFAULT_PRECISION = FdocaConstants . NUMERIC_MAX_PRECISION ; protected static int NUMERIC_DEFAULT_SCALE = 15 ; protected static int mapJdbcTypeToDrdaType ( int jdbcType , boolean nullable , AppRequester appRequester , int [ ] outlen ) throws SQLException { int drdaType = 0 ; switch ( jdbcType ) { case Types . BOOLEAN : case Types . BIT : case Types . TINYINT : case Types . SMALLINT : drdaType = DRDAConstants . DRDA_TYPE_NSMALL ; outlen [ 0 ] = 2 ; break ; case Types . INTEGER : drdaType = DRDAConstants . DRDA_TYPE_NINTEGER ; outlen [ 0 ] = 4 ; break ; case Types . BIGINT : drdaType = DRDAConstants . DRDA_TYPE_NINTEGER8 ; outlen [ 0 ] = 8 ; break ; case Types . REAL : drdaType = DRDAConstants . DRDA_TYPE_NFLOAT4 ; outlen [ 0 ] = 4 ; break ; case Types . DOUBLE : case Types . FLOAT : drdaType = DRDAConstants . DRDA_TYPE_NFLOAT8 ; outlen [ 0 ] = 8 ; break ; case Types . NUMERIC : case Types . DECIMAL : drdaType = DRDAConstants . DRDA_TYPE_NDECIMAL ; outlen [ 0 ] = - 1 ; break ; case Types . DATE : drdaType = DRDAConstants . DRDA_TYPE_NDATE ; outlen [ 0 ] = 10 ; break ; case Types . TIME : drdaType = DRDAConstants . DRDA_TYPE_NTIME ; outlen [ 0 ] = 8 ; break ; case Types . TIMESTAMP : drdaType = DRDAConstants . DRDA_TYPE_NTIMESTAMP ; <START_BUG> outlen [ 0 ] = 26 ; <END_BUG> break ; case Types . CHAR : drdaType = DRDAConstants . DRDA_TYPE_NVARMIX ; outlen [ 0 ] = - 1 ; break ; case Types . VARCHAR : drdaType = DRDAConstants . DRDA_TYPE_NVARCHAR ; outlen [ 0 ] = - 1 ; break ; case Types . JAVA_OBJECT : if ( appRequester . supportsUDTs ( ) ) { drdaType = DRDAConstants . DRDA_TYPE_NUDT ; outlen [ 0 ] = - 1 ; } else { drdaType = DRDAConstants . DRDA_TYPE_NLONG ; outlen [ 0 ] = FdocaConstants . LONGVARCHAR_MAX_LEN ; } break ; case Types . LONGVARCHAR : drdaType = DRDAConstants . DRDA_TYPE_NLONG ; outlen [ 0 ] = FdocaConstants . LONGVARCHAR_MAX_LEN ; break ; case Types . BINARY : case Types . VARBINARY : drdaType = DRDAConstants . DRDA_TYPE_NVARBYTE ; outlen [ 0 ] = - 1 ; break ; case Types . LONGVARBINARY : drdaType = DRDAConstants . DRDA_TYPE_NLONGVARBYTE ; outlen [ 0 ] = FdocaConstants . LONGVARBINARY_MAX_LEN ; break ; case Types . BLOB : drdaType = DRDAConstants . DRDA_TYPE_NLOBBYTES ; outlen [ 0 ] = 32772 ; break ;

Fix:
outlen [ 0 ] = appRequester . getTimestampLength ( ) ;