Buggy code:
public final class ColumnFamilyStore implements ColumnFamilyStoreMBean { private static Logger logger_ = Logger . getLogger ( ColumnFamilyStore . class ) ; private static NonBlockingHashMap < String , Set < Memtable > > memtablesPendingFlush = new NonBlockingHashMap < String , Set < Memtable > > ( ) ; private static ExecutorService flushSorter_ = new DebuggableThreadPoolExecutor ( 1 , Runtime . getRuntime ( ) . availableProcessors ( ) , Integer . MAX_VALUE , TimeUnit . SECONDS , new LinkedBlockingQueue < Runnable > ( ( 1 + ( 2 * ( Runtime . getRuntime ( ) . availableProcessors ( ) ) ) ) ) , new NamedThreadFactory ( "FLUSH-SORTER-POOL" ) ) ; private static ExecutorService flushWriter_ = new DebuggableThreadPoolExecutor ( DatabaseDescriptor . getAllDataFileLocations ( ) . length , DatabaseDescriptor . getAllDataFileLocations ( ) . length , Integer . MAX_VALUE , TimeUnit . SECONDS , new LinkedBlockingQueue < Runnable > ( ) , new NamedThreadFactory ( "FLUSH-WRITER-POOL" ) ) ; private static ExecutorService commitLogUpdater_ = new DebuggableThreadPoolExecutor ( "MEMTABLE-POST-FLUSHER" ) ; private static final int KEY_RANGE_FILE_BUFFER_SIZE = 256 * 1024 ; private final String table_ ; public final String columnFamily_ ; private final boolean isSuper_ ; private volatile Integer memtableSwitchCount = 0 ; private AtomicInteger fileIndexGenerator_ = new AtomicInteger ( 0 ) ; private Memtable memtable_ ; private AtomicReference < BinaryMemtable > binaryMemtable_ ; private SSTableTracker ssTables_ = new SSTableTracker ( ) ; private TimedStatsDeque readStats_ = new TimedStatsDeque ( 60000 ) ; private TimedStatsDeque writeStats_ = new TimedStatsDeque ( 60000 ) ; private final IPartitioner partitioner = StorageService . getPartitioner ( ) ; ColumnFamilyStore ( String table , String columnFamilyName , boolean isSuper , int indexValue ) throws IOException { } public static ColumnFamilyStore getColumnFamilyStore ( String table , String columnFamily ) throws IOException { } void onStart ( ) throws IOException { } public String cfStats ( String newLineSeparator ) { } List < SSTableReader > forceAntiCompaction ( Collection < Range > ranges , InetAddress target ) { } public String getColumnFamilyName ( ) { } private static String getColumnFamilyFromFileName ( String filename ) { } public static int getGenerationFromFileName ( String filename ) { } synchronized String getTempSSTablePath ( ) { String fname = getTempSSTableFileName ( ) ; <START_BUG> return new File ( DatabaseDescriptor . getDataFileLocationForTable ( table_ ) , fname ) . getAbsolutePath ( ) ; <END_BUG> } public String getTempSSTableFileName ( ) { } Future < ? > switchMemtable ( Memtable oldMemtable , final boolean writeCommitLog ) throws IOException { } void switchBinaryMemtable ( String key , byte [ ] buffer ) throws IOException { } public void forceFlushIfExpired ( ) throws IOException { } public Future < ? > forceFlush ( ) throws IOException { } void forceBlockingFlush ( ) throws IOException , InterruptedException , ExecutionException { } public void forceFlushBinary ( ) { } Memtable apply ( String key , ColumnFamily columnFamily ) throws IOException { } void applyBinary ( String key , byte [ ] buffer ) throws IOException { } static ColumnFamily removeDeleted ( ColumnFamily cf ) { } public static int getDefaultGCBefore ( ) { } public static ColumnFamily removeDeleted ( ColumnFamily cf , int gcBefore ) { } private static void removeDeletedStandard ( ColumnFamily cf , int gcBefore ) { } private static void removeDeletedSuper ( ColumnFamily cf , int gcBefore ) { } void onMemtableFlush ( CommitLog . CommitLogContext cLogCtx ) throws IOException { } public void addSSTable ( SSTableReader sstable ) { } static Set < List < SSTableReader > > getCompactionBuckets ( Iterable < SSTableReader > files , long min ) { } int doCompaction ( int minThreshold , int maxThreshold ) throws IOException { } void doMajorCompaction ( long skip ) throws IOException { } void doMajorCompactionInternal ( long skip ) throws IOException { } long getExpectedCompactedFileSize ( Iterable < SSTableReader > sstables ) { } SSTableReader getMaxSizeFile ( Iterable < SSTableReader > sstables ) { } List < SSTableReader > doAntiCompaction ( Collection < Range > ranges , InetAddress target ) throws IOException { } void forceCleanup ( ) { } void doCleanupCompaction ( ) throws IOException { } void doCleanup ( SSTableReader sstable ) throws IOException { } List < SSTableReader > doFileAntiCompaction ( Collection < SSTableReader > sstables , final Collection < Range > ranges , InetAddress target ) throws IOException { } private int doFileCompaction ( Collection < SSTableReader > sstables ) throws IOException { } int doFileCompaction ( Collection < SSTableReader > sstables , int gcBefore ) throws IOException { } private void gcAfterRpcTimeout ( ) { } void doReadonlyCompaction ( InetAddress initiator ) throws IOException { } private long getTotalBytes ( Iterable < SSTableReader > sstables ) { } public static List < Memtable > getUnflushedMemtables ( String cfName ) { } static Set < Memtable > getMemtablesPendingFlushNotNull ( String columnFamilyName ) { } Condition submitFlush ( final IFlushable flushable ) { } public boolean isSuper ( ) { } public int getMemtableColumnsCount ( ) { } public int getMemtableDataSize ( ) { } public int getMemtableSwitchCount ( ) { } private Memtable getMemtableThreadSafe ( ) { } public Iterator < DecoratedKey > memtableKeyIterator ( ) throws InterruptedException , ExecutionException { } public Collection < SSTableReader > getSSTables ( ) { } public int getReadCount ( ) { } public double getReadLatency ( ) { } public int getPendingTasks ( ) { } public int getWriteCount ( ) { } public double getWriteLatency ( ) { } public ColumnFamily getColumnFamily ( String key , QueryPath path , byte [ ] start , byte [ ] finish , boolean reversed , int limit ) throws IOException { } public ColumnFamily getColumnFamily ( QueryFilter filter ) throws IOException { } public ColumnFamily getColumnFamily ( QueryFilter filter , int gcBefore ) throws IOException { } private ColumnFamily getColumnFamilyInternal ( QueryFilter filter , int gcBefore ) throws IOException { } public RangeReply getKeyRange ( final String startWith , final String stopAt , int maxResults ) throws IOException , InterruptedException , ExecutionException { }

Fix:
return new File ( ( ( ( DatabaseDescriptor . getNextAvailableDataLocation ( ) ) + ( File . separator ) ) + ( table_ ) ) , fname ) . getAbsolutePath ( ) ;