Buggy code:
public static void scrubDataDirectories ( String table , String columnFamily ) { } public void initRowCache ( ) { } public void scheduleCacheSaving ( int rowCacheSavePeriodInSeconds , int keyCacheSavePeriodInSeconds ) { } public Future < ? > submitRowCacheWrite ( ) { } public Future < ? > submitKeyCacheWrite ( ) { } private static Map < Descriptor , Set < Component > > files ( String keyspace , final String columnFamily , final boolean includeCompacted ) { } public String getColumnFamilyName ( ) { } public String getFlushPath ( ) { } public String getTempSSTablePath ( String directory ) { } Future < ? > maybeSwitchMemtable ( Memtable oldMemtable , final boolean writeCommitLog ) { } void switchBinaryMemtable ( DecoratedKey key , ByteBuffer buffer ) { } public void forceFlushIfExpired ( ) { } public Future < ? > forceFlush ( ) { } public void forceBlockingFlush ( ) throws InterruptedException , ExecutionException { } public void forceFlushBinary ( ) { } Memtable apply ( DecoratedKey key , ColumnFamily columnFamily ) { } void applyBinary ( DecoratedKey key , ByteBuffer buffer ) { } public static ColumnFamily removeDeletedCF ( ColumnFamily cf , int gcBefore ) { } public static ColumnFamily removeDeleted ( ColumnFamily cf , int gcBefore ) { } private static void removeDeletedColumnsOnly ( ColumnFamily cf , int gcBefore ) { } private static void removeDeletedStandard ( ColumnFamily cf , int gcBefore ) { } private static void removeDeletedSuper ( ColumnFamily cf , int gcBefore ) { } public boolean isKeyInRemainingSSTables ( DecoratedKey key , Set < SSTable > sstablesToIgnore ) { } public void addSSTable ( SSTableReader sstable ) { } long getExpectedCompactedFileSize ( Iterable < SSTableReader > sstables ) { } SSTableReader getMaxSizeFile ( Iterable < SSTableReader > sstables ) { } public void forceCleanup ( ) throws InterruptedException , ExecutionException { } public void scrub ( ) throws InterruptedException , ExecutionException { } void markCompacted ( Collection < SSTableReader > sstables ) { } boolean isCompleteSSTables ( Collection < SSTableReader > sstables ) { } void replaceCompactedSSTables ( Collection < SSTableReader > sstables , Iterable < SSTableReader > replacements ) { } public boolean isInvalid ( ) { } public void removeAllSSTables ( ) { } void submitFlush ( IFlushable flushable , CountDownLatch latch ) { } public long getMemtableColumnsCount ( ) { } public long getMemtableDataSize ( ) { } public int getMemtableSwitchCount ( ) { } private Memtable getMemtableThreadSafe ( ) { } public Collection < SSTableReader > getSSTables ( ) { } public long [ ] getRecentSSTablesPerReadHistogram ( ) { } public long [ ] getSSTablesPerReadHistogram ( ) { } public long getReadCount ( ) { } public double getRecentReadLatencyMicros ( ) { } public long [ ] getLifetimeReadLatencyHistogramMicros ( ) { } public long [ ] getRecentReadLatencyHistogramMicros ( ) { } public long getTotalReadLatencyMicros ( ) { } public int getPendingTasks ( ) { } public long getWriteCount ( ) { } public long getTotalWriteLatencyMicros ( ) { } public double getRecentWriteLatencyMicros ( ) { } public long [ ] getLifetimeWriteLatencyHistogramMicros ( ) { } public long [ ] getRecentWriteLatencyHistogramMicros ( ) { } public ColumnFamily getColumnFamily ( DecoratedKey key , QueryPath path , ByteBuffer start , ByteBuffer finish , boolean reversed , int limit ) { } public ColumnFamily getColumnFamily ( QueryFilter filter ) { } public int gcBefore ( ) { } private ColumnFamily cacheRow ( DecoratedKey key ) { } private ColumnFamily getColumnFamily ( QueryFilter filter , int gcBefore ) { } ColumnFamily filterColumnFamily ( ColumnFamily cached , QueryFilter filter , int gcBefore ) { } private ColumnFamily getTopLevelColumns ( QueryFilter filter , int gcBefore ) { } public List < Row > getRangeSlice ( ByteBuffer superColumn , final AbstractBounds range , int maxResults , IFilter columnFilter ) throws InterruptedException , ExecutionException { } public List < Row > scan ( IndexClause clause , AbstractBounds range , IFilter dataFilter ) { } private IndexExpression highestSelectivityPredicate ( IndexClause clause ) { } private static boolean satisfies ( ColumnFamily data , IndexClause clause , IndexExpression first ) { for ( IndexExpression expression : clause . expressions ) { if ( expression == first ) continue ; IColumn column = data . getColumn ( expression . column_name ) ; if ( column == null ) return false ; <START_BUG> int v = data . getComparator ( ) . compare ( column . value ( ) , expression . value ) ; <END_BUG> if ( ! ( ColumnFamilyStore . satisfies ( v , expression . op ) ) ) return false ; } return true ; } private static boolean satisfies ( int comparison , IndexOperator op ) { } public AbstractType getComparator ( ) { } private void snapshotWithoutFlush ( String snapshotName ) { } public void snapshot ( String snapshotName ) { } public boolean hasUnreclaimedSpace ( ) { } public long getTotalDiskSpaceUsed ( ) { } public long getLiveDiskSpaceUsed ( ) { } public int getLiveSSTableCount ( ) { } public ColumnFamily getRawCachedRow ( DecoratedKey key ) { } public void invalidateCachedRow ( DecoratedKey key ) { } public void forceMajorCompaction ( ) throws InterruptedException , ExecutionException { } public void invalidateRowCache ( ) { } public void invalidateKeyCache ( ) { } public int getRowCacheCapacity ( ) { } public int getKeyCacheCapacity ( ) { } public int getRowCacheSize ( ) { } public int getKeyCacheSize ( ) { } public static Iterable < ColumnFamilyStore > all ( ) { } public Iterable < DecoratedKey > allKeySamples ( ) { } void clearUnsafe ( ) { } public Set < Memtable > getMemtablesPendingFlush ( ) { } public Future < ? > truncate ( ) throws IOException { } public void renameSSTables ( String newCfName ) throws IOException { } public long getBloomFilterFalsePositives ( ) { } public long getRecentBloomFilterFalsePositives ( ) { } public double getBloomFilterFalseRatio ( ) { } public double getRecentBloomFilterFalseRatio ( ) { } public SortedSet < ByteBuffer > getIndexedColumns ( ) { }

Fix:
int v = data . metadata ( ) . getValueValidator ( expression . column_name ) . compare ( column . value ( ) , expression . value ) ;