Buggy code:
private ( 255 ) ) ; private static final String SYNTAX_ERR = "42X01" ; private static final int MGRLVL_3 = 3 ; private static final int MGRLVL_4 = 4 ; private static final int MGRLVL_5 = 5 ; private static final int MGRLVL_6 = 6 ; private static final int MGRLVL_7 = 7 ; private static final int COMMIT = 1 ; private static final int ROLLBACK = 2 ; protected CcsidManager ccsidManager = new EbcdicCcsidManager ( ) ; private int correlationID ; private InputStream sockis ; private OutputStream sockos ; private DDMReader reader ; private DDMWriter writer ; private DRDAXAProtocol xaProto ; private static int [ ] ACCRDB_REQUIRED = new int [ ] { CodePoint . RDBACCCL , CodePoint . CRRTKN , CodePoint . PRDID , CodePoint . TYPDEFNAM , CodePoint . TYPDEFOVR } ; private static int MAX_REQUIRED_LEN = 5 ; private int currentRequiredLength = 0 ; private int [ ] required = new int [ DRDAConnThread . MAX_REQUIRED_LEN ] ; private NetworkServerControlImpl server ; private Session session ; private long timeSlice ; private Object timeSliceSync = new Object ( ) ; private boolean logConnections ; private boolean sendWarningsOnCNTQRY = false ; private Object logConnectionsSync = new Object ( ) ; private boolean close ; private Object closeSync = new Object ( ) ; private static HeaderPrintWriter logStream ; private AppRequester appRequester ; private Database database ; private int sqlamLevel ; private Vector unknownManagers ; private Vector knownManagers ; private Vector errorManagers ; private Vector errorManagersLevel ; private SQLException databaseAccessException ; private String rdbnam ; private String rdbcolid ; private String pkgid ; private String pkgcnstknStr ; private int secnumber ; private static DecryptionManager decryptionManager ; private byte [ ] myPublicKey ; public DRDAConnThread ( Session session , NetworkServerControlImpl server , long timeSlice , boolean logConnections ) { } public void run ( ) { } protected InputStream getInputStream ( ) { } protected OutputStream getOutputStream ( ) { } protected DDMReader getReader ( ) { } protected DDMWriter getWriter ( ) { } protected int getCorrelationID ( ) { } protected Session getSession ( ) { } protected Database getDatabase ( ) { } protected NetworkServerControlImpl getServer ( ) { } protected byte [ ] getCrrtkn ( ) { } protected String getDbName ( ) { } protected void close ( ) { } protected void setLogConnections ( boolean value ) { } protected void setTimeSlice ( long value ) { } protected void markCommunicationsFailure ( String arg1 , String arg2 , String arg3 , String arg4 ) throws DRDAProtocolException { } protected void throwSyntaxrm ( int errcd , int cpArg ) throws DRDAProtocolException { } protected void agentError ( String msg ) throws DRDAProtocolException { } protected void missingCodePoint ( int codePoint ) throws DRDAProtocolException { } protected static void println2Log ( String dbname , String drdaID , String msg ) { } protected void writeRDBNAM ( String rdbnam ) throws DRDAProtocolException { } private void initialize ( ) { } private void initializeForSession ( ) { } private void sessionInitialState ( ) throws Exception { } private void processCommands ( ) throws DRDAProtocolException { } private void errorInChain ( SQLException e ) throws DRDAProtocolException { } private void exchangeServerAttributes ( ) throws DRDAProtocolException { } private boolean parseDRDAConnection ( ) throws DRDAProtocolException { } private void writeRDBfailure ( int codePoint ) throws DRDAProtocolException { } private int getRdbAccessErrorCodePoint ( ) { } private int verifyUserIdPassword ( ) throws DRDAProtocolException { } private int getConnFromDatabaseName ( ) throws DRDAProtocolException { } private void parseEXCSAT ( ) throws DRDAProtocolException { } private void parseEXCSAT2 ( ) throws DRDAProtocolException { } private void parseMGRLVLLS ( int time ) throws DRDAProtocolException { } private void writeEXCSATRD ( ) throws DRDAProtocolException { } private void writeMGRLEVELS ( ) throws DRDAProtocolException { } private int parseACCSEC ( ) throws DRDAProtocolException { } private String parseOPNQRY ( ) throws SQLException , DRDAProtocolException { } private void parseOPNQRYobjects ( DRDAStatement stmt ) throws SQLException , DRDAProtocolException { } private int parseOUTOVROPT ( ) throws DRDAProtocolException { } private int parseQRYBLKSZ ( ) throws DRDAProtocolException { } private int parseQRYROWSET ( int minVal ) throws DRDAProtocolException { } private int parseQRYCLSIMP ( ) throws DRDAProtocolException { } private int parseQRYCLSRLS ( ) throws DRDAProtocolException { } private int parseQRYOPTVAL ( ) throws DRDAProtocolException { } private void writeQRYPOPRM ( ) throws DRDAProtocolException { } private void writeQRYNOPRM ( int svrCod ) throws DRDAProtocolException { } private void writeOPNQFLRM ( SQLException e ) throws DRDAProtocolException { } private void writePKGNAMCSN ( String pkgcnstknStr ) throws DRDAProtocolException { } private void writePKGNAMCSN ( ) throws DRDAProtocolException { } private DRDAStatement parseCNTQRY ( ) throws SQLException , DRDAProtocolException { } private void skipRemainder ( boolean onlySkipSameIds ) throws DRDAProtocolException { } private void parseCNTQRYobjects ( DRDAStatement stmt ) throws SQLException , DRDAProtocolException { } private void parseOUTOVR ( DRDAStatement stmt ) throws SQLException , DRDAProtocolException { } private void writeOPNQRYRM ( boolean isDssObject , DRDAStatement stmt ) throws SQLException , DRDAProtocolException { } private void writeENDQRYRM ( int svrCod ) throws DRDAProtocolException { } private void writeABNUOWRM ( ) throws DRDAProtocolException { } private String parseRDBNAM ( ) throws DRDAProtocolException { } private void writeACCSECRD ( int securityCheckCode ) throws DRDAProtocolException { } private int parseSECCHK ( ) throws DRDAProtocolException { } private void writeSECCHKRM ( int securityCheckCode ) throws DRDAProtocolException { } private int svrcodFromSecchkcd ( int securityCheckCode ) { } private int parseACCRDB ( ) throws DRDAProtocolException { } private String parseTYPDEFNAM ( ) throws DRDAProtocolException { } private void setStmtOrDbByteOrder ( boolean setDatabase , DRDAStatement stmt , String typDefNam ) { } private void writeACCRDBRM ( int svrcod ) throws DRDAProtocolException { } private void writeTYPDEFOVR ( ) throws DRDAProtocolException { } private void parseTYPDEFOVR ( DRDAStatement st ) throws DRDAProtocolException { } private int parsePRPSQLSTT ( ) throws SQLException , DRDAProtocolException { } private String parsePRPSQLSTTobjects ( DRDAStatement stmt ) throws SQLException , DRDAProtocolException { } private boolean parseTYPSQLDA ( ) throws DRDAProtocolException { } protected void parseSQLATTR ( DRDAStatement stmt ) throws DRDAProtocolException { } private boolean parseDSCSQLSTT ( ) throws SQLException , DRDAProtocolException { } private void parseEXCSQLSTT ( ) throws SQLException , DRDAProtocolException { } private void parseRDBCMTOK ( ) throws DRDAProtocolException { } private void parseEXCSQLSTTobjects ( DRDAStatement stmt ) throws SQLException , DRDAProtocolException { } private void writeSQLCINRD ( DRDAStatement stmt ) throws SQLException , DRDAProtocolException { } private void writeSQLRSLRD ( DRDAStatement stmt ) throws SQLException , DRDAProtocolException { } private void writeRSLSETRM ( DRDAStatement stmt ) throws SQLException , DRDAProtocolException { } private void parseSQLDTA ( DRDAStatement stmt ) throws SQLException , DRDAProtocolException { try { parseSQLDTA_work ( stmt ) ; } catch ( SQLException se ) { <START_BUG> skipRemainder ( false ) ; <END_BUG>

Fix:
skipRemainder ( true ) ;