Buggy code:
private boolean isFrozen ; ProductVersionHolder jbmsVersion ; private int onDiskMajorVersion ; private int onDiskMinorVersion ; private boolean onDiskBeta ; private CRC32 checksum = new CRC32 ( ) ; private boolean isWriteSynced = false ; public LogToFile ( ) { } public StandardException markCorrupt ( StandardException originalError ) { } private void checkCorrupt ( ) throws StandardException { } public Logger getLogger ( ) { } public void recover ( RawStoreFactory rsf , DataFactory df , TransactionFactory tf ) throws StandardException { } public boolean checkpoint ( RawStoreFactory rsf , DataFactory df , TransactionFactory tf , boolean wait ) throws StandardException { } protected boolean checkpointWithTran ( RawTransaction cptran , RawStoreFactory rsf , DataFactory df , TransactionFactory tf ) throws StandardException { } public void flush ( LogInstant where ) throws StandardException { } public void flushAll ( ) throws StandardException { } private boolean verifyLogFormat ( StorageFile logFileName , long number ) throws StandardException { } private boolean verifyLogFormat ( StorageRandomAccessFile log , long number ) throws StandardException { } private boolean initLogFile ( StorageRandomAccessFile newlog , long number , long prevLogRecordEndInstant ) throws IOException , StandardException { } private void switchLogFile ( ) throws StandardException { } private void flushBuffer ( long fileNumber , long wherePosition ) throws IOException , StandardException { } private void truncateLog ( CheckpointOperation checkpoint ) { } private long getFirstLogNeeded ( CheckpointOperation checkpoint ) { } boolean writeControlFile ( StorageFile logControlFileName , long value ) throws IOException , StandardException { } private long readControlFile ( StorageFile logControlFileName , Properties startParams ) throws IOException , StandardException { } public StorageFile getLogDirectory ( ) throws StandardException { } public String getCanonicalLogPath ( ) { } private StorageFile getControlFileName ( ) throws StandardException { } private StorageFile getMirrorControlFileName ( ) throws StandardException { } private StorageFile getLogFileName ( long filenumber ) throws StandardException { } private CheckpointOperation findCheckpoint ( long checkpointInstant , FileLogger logger ) throws IOException , ClassNotFoundException , StandardException { } protected LogScan openBackwardsScan ( long startAt , LogInstant stopAt ) throws IOException , StandardException { } protected LogScan openBackwardsScan ( LogInstant stopAt ) throws IOException , StandardException { } public ScanHandle openFlushedScan ( DatabaseInstant start , int groupsIWant ) throws StandardException { } protected LogScan openForwardsScan ( long startAt , LogInstant stopAt ) throws IOException , StandardException { } protected StorageRandomAccessFile getLogFileAtBeginning ( long filenumber ) throws IOException , StandardException { } protected StorageRandomAccessFile getLogFileAtPosition ( long logInstant ) throws IOException , StandardException { } public boolean canSupport ( Properties startParams ) { } public void boot ( boolean create , Properties startParams ) throws StandardException { } private void getLogStorageFactory ( ) throws StandardException { } public void stop ( ) { } private void deleteObsoleteLogfiles ( ) { } public boolean serviceASAP ( ) { } public boolean serviceImmediately ( ) { } public void getLogFactoryProperties ( PersistentSet set ) throws StandardException { } public int performWork ( ContextManager context ) { } protected long appendLogRecord ( byte [ ] data , int offset , int length , byte [ ] optionalData , int optionalDataOffset , int optionalDataLength ) throws StandardException { } protected synchronized long currentInstant ( ) { } protected synchronized long endPosition ( ) { } private synchronized long getLogFileNumber ( ) { } private synchronized long firstLogInstant ( ) { } protected void flush ( long fileNumber , long wherePosition ) throws StandardException { } private void syncFile ( StorageRandomAccessFile raf ) throws StandardException { for ( int i = 0 ; ; ) { try { raf . sync ( false ) ; break ; } catch ( IOException ioe ) { i ++ ; try { Thread . sleep ( 200 ) ; } catch ( InterruptedException ie ) { } if ( i > 20 ) { <START_BUG> throw StandardException . newException ( LOG_FULL , ioe , null ) ; <END_BUG> } } } } public LogScan openForwardsFlushedScan ( LogInstant startAt ) throws StandardException { } public LogScan openForwardsScan ( LogInstant startAt , LogInstant stopAt ) throws StandardException { } public final boolean databaseEncrypted ( ) { } public int encrypt ( byte [ ] cleartext , int offset , int length , byte [ ] ciphertext , int outputOffset ) throws StandardException { } public int decrypt ( byte [ ] ciphertext , int offset , int length , byte [ ] cleartext , int outputOffset ) throws StandardException { } public int getEncryptionBlockSize ( ) { } public int getEncryptedDataLength ( int length ) { } public synchronized LogInstant getFirstUnflushedInstant ( ) { } public void freezePersistentStore ( ) throws StandardException { } public void unfreezePersistentStore ( ) throws StandardException { } public boolean logArchived ( ) { } boolean checkVersion ( int requiredMajorVersion , int requiredMinorVersion ) { } protected void logErrMsg ( String msg ) { } protected void logErrMsg ( Throwable t ) { } private void logErrMsgForDurabilityTestModeNoSync ( ) { } private void printErrorStack ( Throwable t ) { } private long logtest_appendPartialLogRecord ( byte [ ] data , int offset , int length , byte [ ] optionalData , int optionalDataOffset , int optionalDataLength ) throws StandardException { } protected void testLogFull ( ) throws IOException { } public StorageRandomAccessFile getLogFileToSimulateCorruption ( long filenum ) throws IOException , StandardException { } public static final String TEST_LOG_SWITCH_LOG = ( SanityManager . DEBUG ) ? "TEST_LOG_SWITCH_LOG" : null ; public static final String TEST_LOG_INCOMPLETE_LOG_WRITE = ( SanityManager . DEBUG ) ? "TEST_LOG_INCOMPLETE_LOG_WRITE" : null ; public static final String TEST_LOG_PARTIAL_LOG_WRITE_NUM_BYTES = ( SanityManager . DEBUG ) ? "db2j.unittest.partialLogWrite" : null ; public static final String TEST_LOG_FULL = ( SanityManager . DEBUG ) ? "TEST_LOG_FULL" : null ; public static final String TEST_SWITCH_LOG_FAIL1 = ( SanityManager . DEBUG ) ? "TEST_SWITCH_LOG_FAIL1" : null ; public static final String TEST_SWITCH_LOG_FAIL2 = ( SanityManager . DEBUG ) ? "TEST_SWITCH_LOG_FAIL2" : null ; public static final String TEST_RECORD_TO_FILL_LOG = ( SanityManager . DEBUG ) ? "db2j.unittest.recordToFillLog" : null ;

Fix:
throw StandardException . newException ( LOG_FULL , ioe ) ;