Buggy code:
private static final String rightBrace = "}" ; private static final byte NULL_VALUE = ( ( byte ) ( 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 Pkgnamcsn prevPkgnamcsn = null ; private DRDAString rdbnam = new DRDAString ( ccsidManager ) ; private DRDAString rdbcolid = new DRDAString ( ccsidManager ) ; private DRDAString pkgid = new DRDAString ( ccsidManager ) ; private DRDAString pkgcnstkn = new DRDAString ( ccsidManager ) ; private int pkgsn ; private static final String TIMEOUT_STATEMENT = "SET<seq2seq4repair_space>STATEMENT_TIMEOUT<seq2seq4repair_space>" ; private int pendingStatementTimeout ; private static DecryptionManager decryptionManager ; private byte [ ] myPublicKey ; private static final byte [ ] eod00000 = new byte [ ] { '0' , '0' , '0' , '0' , '0' } ; private static final byte [ ] eod02000 = new byte [ ] { '0' , '2' , '0' , '0' , '0' } ; private static final byte [ ] nullSQLState = new byte [ ] { '<seq2seq4repair_space>' , '<seq2seq4repair_space>' , '<seq2seq4repair_space>' , '<seq2seq4repair_space>' , '<seq2seq4repair_space>' } ; private static final byte [ ] errD4_D6 = new byte [ ] { 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 } ; private static final byte [ ] warn0_warnA = new byte [ ] { '<seq2seq4repair_space>' , '<seq2seq4repair_space>' , '<seq2seq4repair_space>' , '<seq2seq4repair_space>' , '<seq2seq4repair_space>' , '<seq2seq4repair_space>' , '<seq2seq4repair_space>' , '<seq2seq4repair_space>' , '<seq2seq4repair_space>' , '<seq2seq4repair_space>' , '<seq2seq4repair_space>' } ; 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 { Properties p = new Properties ( ) ; databaseAccessException = null ; if ( ( session . drdaID ) == null ) session . drdaID = ( ( DRDAConnThread . leftBrace ) + ( session . connNum ) ) + ( DRDAConnThread . rightBrace ) ; p . put ( DRDAID_ATTR , session . drdaID ) ; try { database . makeConnection ( p ) ; } catch ( SQLException se ) { String sqlState = se . getSQLState ( ) ; databaseAccessException = se ; for ( ; se != null ; se = se . getNextException ( ) ) { if ( SanityManager . DEBUG ) trace ( se . getMessage ( ) ) ; DRDAConnThread . println2Log ( database . dbName , session . drdaID , se . getMessage ( ) ) ; } if ( sqlState . regionMatches ( 0 , LOGIN_FAILED , 0 , 5 ) ) return CodePoint . SECCHKCD_USERIDINVALID ; return 0 ; } catch ( Exception e ) { DRDAConnThread . println2Log ( database . dbName , session . drdaID , ( "Driver<seq2seq4repair_space>not<seq2seq4repair_space>loaded" + ( e . getMessage ( ) ) ) ) ; try { agentError ( "Driver<seq2seq4repair_space>not<seq2seq4repair_space>loaded" ) ; } catch ( DRDAProtocolException dpe ) { try { server . startNetworkServer ( ) ; } catch ( Exception re ) { DRDAConnThread . println2Log ( database . dbName , session . drdaID , ( "Failed<seq2seq4repair_space>attempt<seq2seq4repair_space>to<seq2seq4repair_space>reload<seq2seq4repair_space>driver<seq2seq4repair_space>" + ( re . getMessage ( ) ) ) ) ; } throw dpe ; } } if ( getLogConnections ( ) ) <START_BUG> DRDAConnThread . println2Log ( database . dbName , session . drdaID , ( "Cloudscape<seq2seq4repair_space>Network<seq2seq4repair_space>Server<seq2seq4repair_space>connected<seq2seq4repair_space>to<seq2seq4repair_space>database<seq2seq4repair_space>" + ( database . dbName ) ) ) ; <END_BUG> return 0 ; } private void parseEXCSAT ( ) throws DRDAProtocolException { } private void parseEXCSAT2 ( ) throws DRDAProtocolException { } private void parseMGRLVLLS ( int time ) throws DRDAProtocolException { }

Fix:
DRDAConnThread . println2Log ( database . dbName , session . drdaID , ( "Apache<seq2seq4repair_space>Derby<seq2seq4repair_space>Network<seq2seq4repair_space>Server<seq2seq4repair_space>connected<seq2seq4repair_space>to<seq2seq4repair_space>database<seq2seq4repair_space>" + ( database . dbName ) ) ) ;