Buggy code:
@ Override public void run ( ) { } private void commit ( ) throws IOException { } private void flushPage ( byte [ ] content ) throws IOException { } } private LogSegment ( File file , int maxPagesCacheSize ) throws IOException { } public void startFlush ( ) { } public void stopFlush ( boolean flush ) { } public long getOrder ( ) { } public void init ( ) throws IOException { } @ Override public int compareTo ( ODiskWriteAheadLog . LogSegment other ) { } public long filledUpTo ( ) throws IOException { } public OLogSequenceNumber begin ( ) throws IOException { } public OLogSequenceNumber end ( ) { } public void delete ( boolean flush ) throws IOException { } public String getPath ( ) { } public OLogSequenceNumber logRecord ( byte [ ] record ) throws IOException { } public byte [ ] readRecord ( OLogSequenceNumber lsn ) throws IOException { } public OLogSequenceNumber getNextLSN ( OLogSequenceNumber lsn ) throws IOException { } public void close ( boolean flush ) throws IOException { } public OLogSequenceNumber readFlushedLSN ( ) throws IOException { } public void flush ( ) { } private void initPageCache ( ) throws IOException { } private long extractOrder ( String name ) { } private boolean checkPageIntegrity ( byte [ ] content ) { } private void selfCheck ( ) throws IOException { } } public ODiskWriteAheadLog ( OLocalPaginatedStorage storage ) throws IOException { } public void addLowDiskSpaceListener ( OLowDiskSpaceListener listener ) { } public void removeLowDiskSpaceListener ( OLowDiskSpaceListener listener ) { } public void addFullCheckpointListener ( OFullCheckpointRequestListener listener ) { } public void removeFullCheckpointListener ( OFullCheckpointRequestListener listener ) { } public ODiskWriteAheadLog ( int maxPagesCacheSize , int commitDelay , long maxSegmentSize , OLocalPaginatedStorage storage ) throws IOException { } private static String calculateWalPath ( OLocalPaginatedStorage storage ) { } public static boolean validateName ( String name ) { } public File getWalLocation ( ) { } public OLogSequenceNumber begin ( ) throws IOException { } public OLogSequenceNumber end ( ) throws IOException { } public void flush ( ) { } @ Override public OLogSequenceNumber logAtomicOperationStartRecord ( boolean isRollbackSupported , OOperationUnitId unitId ) throws IOException { } @ Override public OLogSequenceNumber logAtomicOperationEndRecord ( OOperationUnitId operationUnitId , boolean rollback , OLogSequenceNumber startLsn ) throws IOException { } public OLogSequenceNumber log ( OWALRecord record ) throws IOException { syncObject . lock ( ) ; try { checkForClose ( ) ; if ( ( ( segmentCreationFlag ) && ( record instanceof OOperationUnitRecord ) ) && ( ! ( activeOperations . contains ( ( ( OOperationUnitRecord ) ( record ) ) . getOperationUnitId ( ) ) ) ) ) { while ( segmentCreationFlag ) { try { segmentCreationComplete . await ( ) ; } catch ( InterruptedException e ) { Thread . currentThread ( ) . interrupt ( ) ; throw new OInterruptedException ( e ) ; } } } final byte [ ] serializedForm = INSTANCE . toStream ( record ) ; ODiskWriteAheadLog . LogSegment last = logSegments . get ( ( ( logSegments . size ( ) ) - 1 ) ) ; long lastSize = last . filledUpTo ( ) ; final OLogSequenceNumber lsn = last . logRecord ( serializedForm ) ; record . setLsn ( lsn ) ; if ( record . isUpdateMasterRecord ( ) ) { lastCheckpoint = lsn ; if ( useFirstMasterRecord ) { firstMasterRecord = lsn ; writeMasterRecord ( 0 , firstMasterRecord ) ; useFirstMasterRecord = false ; } else { secondMasterRecord = lsn ; writeMasterRecord ( 1 , secondMasterRecord ) ; useFirstMasterRecord = true ; } } final long sizeDiff = ( last . filledUpTo ( ) ) - lastSize ; logSize += sizeDiff ; if ( ( last . filledUpTo ( ) ) >= ( maxSegmentSize ) ) { segmentCreationFlag = true ; if ( ( ( record instanceof OAtomicUnitEndRecord ) && ( ( activeOperations . size ( ) ) == 1 ) ) || ( ( ! ( record instanceof OOperationUnitRecord ) ) && ( activeOperations . isEmpty ( ) ) ) ) { last . stopFlush ( true ) ; last = new ODiskWriteAheadLog . LogSegment ( new File ( walLocation , getSegmentName ( ( ( last . getOrder ( ) ) + 1 ) ) ) , maxPagesCacheSize ) ; last . init ( ) ; last . startFlush ( ) ; logSegments . add ( last ) ; segmentCreationFlag = false ; segmentCreationComplete . signalAll ( ) ; } } if ( ( ( logSize ) > ( walSizeLimit ) ) && ( ( logSegments . size ( ) ) > 1 ) ) { for ( WeakReference < OFullCheckpointRequestListener > listenerWeakReference : fullCheckpointListeners ) { final OFullCheckpointRequestListener listener = listenerWeakReference . get ( ) ; if ( listener != null ) <START_BUG> listener . requestFullCheckpoint ( ) ; <END_BUG> } } return lsn ; } finally { syncObject . unlock ( ) ; } } public long size ( ) { } public void truncate ( ) throws IOException { } public void close ( ) throws IOException { } public void close ( boolean flush ) throws IOException { } public void delete ( ) throws IOException { } public void delete ( boolean flush ) throws IOException { } public OWALRecord read ( OLogSequenceNumber lsn ) throws IOException { } public OLogSequenceNumber next ( OLogSequenceNumber lsn ) throws IOException { } public OLogSequenceNumber getFlushedLSN ( ) { } public void cutTill ( OLogSequenceNumber lsn ) throws IOException { } private ODiskWriteAheadLog . LogSegment removeHeadSegmentFromList ( ) { } private void recalculateLogSize ( ) throws IOException { } private void fixMasterRecords ( ) throws IOException { } private OLogSequenceNumber readMasterRecord ( String storageName , int index ) throws IOException { } private void writeMasterRecord ( int index , OLogSequenceNumber masterRecord ) throws IOException { } private String getSegmentName ( long order ) { } private OLogSequenceNumber readFlushedLSN ( ) throws IOException { } }

Fix:
listener . requestCheckpoint ( ) ;