Buggy code:
public class ColumnFamilyStore { private static int threshHold_ = 4 ; private static final int bufSize_ = ( 128 * 1024 ) * 1024 ; private static int compactionMemoryThreshold_ = 1 << 30 ; private static Logger logger_ = Logger . getLogger ( ColumnFamilyStore . class ) ; private String table_ ; public String columnFamily_ ; private AtomicInteger fileIndexGenerator_ = new AtomicInteger ( 0 ) ; private AtomicReference < Memtable > memtable_ ; private AtomicReference < BinaryMemtable > binaryMemtable_ ; Set < String > ssTables_ = new HashSet < String > ( ) ; private ReentrantReadWriteLock lock_ = new ReentrantReadWriteLock ( true ) ; private AtomicBoolean isCompacting_ = new AtomicBoolean ( false ) ; ColumnFamilyStore ( String table , String columnFamily ) throws IOException { } void onStart ( ) throws IOException { } List < String > getAllSSTablesOnDisk ( ) { } public String cfStats ( String newLineSeparator ) { } void addToList ( String file ) { } void touch ( String key , boolean fData ) throws IOException { } boolean forceCompaction ( List < Range > ranges , EndPoint target , long skip , List < String > fileList ) { } String getColumnFamilyName ( ) { } private String [ ] getTableAndColumnFamilyName ( String filename ) { } protected static int getIndexFromFileName ( String filename ) { } String getNextFileName ( ) { } String getTempFileName ( ) { } String getTempFileName ( List < String > files ) { } void switchMemtable ( String key , ColumnFamily columnFamily , CommitLog . CommitLogContext cLogCtx ) throws IOException { } void switchBinaryMemtable ( String key , byte [ ] buffer ) throws IOException { } void forceFlush ( ) throws IOException { } void forceFlushBinary ( ) { } void apply ( String key , ColumnFamily columnFamily , CommitLog . CommitLogContext cLogCtx ) throws IOException { } void applyBinary ( String key , byte [ ] buffer ) throws IOException { } public ColumnFamily getColumnFamily ( String key , String columnFamilyColumn , IFilter filter ) throws IOException { } List < ColumnFamily > getColumnFamilies ( String key , String columnFamilyColumn , IFilter filter ) throws IOException { } private void getColumnFamilyFromDisk ( String key , String cf , List < ColumnFamily > columnFamilies , IFilter filter ) throws IOException { } private ColumnFamily fetchColumnFamily ( String key , String cf , IFilter filter , String ssTableFile ) throws IOException { } private void getColumnFamilyFromCurrentMemtable ( String key , String cf , IFilter filter , List < ColumnFamily > columnFamilies ) { } static ColumnFamily resolve ( List < ColumnFamily > columnFamilies ) { } private static void merge ( List < ColumnFamily > columnFamilies ) { } private static ColumnFamily resolveAndRemoveDeleted ( List < ColumnFamily > columnFamilies ) { } static ColumnFamily removeDeleted ( ColumnFamily cf ) { } void applyNow ( String key , ColumnFamily columnFamily ) throws IOException { } void onMemtableFlush ( CommitLog . CommitLogContext cLogCtx ) throws IOException { } void storeLocation ( String filename , BloomFilter bf ) { } PriorityQueue < FileStruct > initializePriorityQueue ( List < String > files , List < Range > ranges , int minBufferSize ) { PriorityQueue < FileStruct > pq = new PriorityQueue < FileStruct > ( ) ; if ( ( ( files . size ( ) ) > 1 ) || ( ( ranges != null ) && ( ( files . size ( ) ) > 0 ) ) ) { int bufferSize = Math . min ( ( ( ColumnFamilyStore . compactionMemoryThreshold_ ) // ( files . size ( ) ) ) , minBufferSize ) ; FileStruct fs = null ; for ( String file : files ) { try { <START_BUG> fs = new FileStruct ( SequenceFile . bufferedReader ( file , bufferSize ) ) ; <END_BUG> fs . advance ( ) ; if ( fs . isExhausted ( ) ) continue ; pq . add ( fs ) ; } catch ( Exception ex ) { ColumnFamilyStore . logger_ . warn ( "corrupt<seq2seq4repair_space>file?<seq2seq4repair_space>or<seq2seq4repair_space>are<seq2seq4repair_space>you<seq2seq4repair_space>just<seq2seq4repair_space>blowing<seq2seq4repair_space>away<seq2seq4repair_space>data<seq2seq4repair_space>files<seq2seq4repair_space>manually<seq2seq4repair_space>out<seq2seq4repair_space>from<seq2seq4repair_space>under<seq2seq4repair_space>me?" , ex ) ; try { if ( fs != null ) { fs . close ( ) ; } } catch ( Exception e ) { ColumnFamilyStore . logger_ . warn ( ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>close<seq2seq4repair_space>file<seq2seq4repair_space>:" + file ) ) ; } } } } return pq ; } static Set < List < String > > getCompactionBuckets ( List < String > files , long min ) { } void doCompaction ( ) throws IOException { } void doMajorCompaction ( long skip ) { } void doMajorCompactionInternal ( long skip ) { } long getExpectedCompactedFileSize ( List < String > files ) { } String getMaxSizeFile ( List < String > files ) { } boolean doAntiCompaction ( List < Range > ranges , EndPoint target , List < String > fileList ) { } void forceCleanup ( ) { } void doCleanupCompaction ( ) { } void doCleanup ( String file ) { } boolean doFileAntiCompaction ( List < String > files , List < Range > ranges , EndPoint target , List < String > fileList , List < BloomFilter > compactedBloomFilters ) { } private void doFill ( BloomFilter bf , String decoratedKey ) { } void doFileCompaction ( List < String > files , int minBufferSize ) throws IOException { } public boolean isSuper ( ) { } public void flushMemtableOnRecovery ( ) throws IOException { } }

Fix:
fs = new FileStruct ( SequenceFile . bufferedReader ( file , bufferSize ) , StorageService . getPartitioner ( ) ) ;