Buggy code:
public class CassandraServer implements Cassandra . Iface { private static Logger logger_ = Logger . getLogger ( CassandraServer . class ) ; private static final List < column_t > EMPTY_COLUMNS = Arrays . asList ( ) ; private static final List < superColumn_t > EMPTY_SUPERCOLUMNS = Arrays . asList ( ) ; protected StorageService storageService ; public CassandraServer ( ) { } public void start ( ) throws IOException { } private void validateCommand ( String key , String tablename , String ... columnFamilyNames ) throws InvalidRequestException { } protected ColumnFamily readColumnFamily ( ReadCommand command ) throws InvalidRequestException { } public List < column_t > thriftifyColumns ( Collection < IColumn > columns ) { } public List < column_t > get_columns_since ( String tablename , String key , String columnFamily_column , long timeStamp ) throws InvalidRequestException { } public List < column_t > get_slice_by_names ( String tablename , String key , String columnFamily , List < String > columnNames ) throws InvalidRequestException { } public List < column_t > get_slice ( String tablename , String key , String columnFamily_column , int start , int count ) throws InvalidRequestException { } public column_t get_column ( String tablename , String key , String columnFamily_column ) throws InvalidRequestException , NotFoundException { } public int get_column_count ( String tablename , String key , String columnFamily_column ) throws InvalidRequestException { } public void insert ( String tablename , String key , String columnFamily_column , byte [ ] cellData , long timestamp ) { } public boolean insert_blocking ( String tablename , String key , String columnFamily_column , byte [ ] cellData , long timestamp ) throws InvalidRequestException { } public boolean batch_insert_blocking ( batch_mutation_t batchMutation ) throws InvalidRequestException { } public void batch_insert ( batch_mutation_t batchMutation ) { } public boolean remove ( String tablename , String key , String columnFamily_column , long timestamp , boolean block ) throws InvalidRequestException { } public List < superColumn_t > get_slice_super_by_names ( String tablename , String key , String columnFamily , List < String > superColumnNames ) throws InvalidRequestException { } private List < superColumn_t > thriftifySuperColumns ( Collection < IColumn > columns ) { } public List < superColumn_t > get_slice_super ( String tablename , String key , String columnFamily_superColumnName , int start , int count ) throws InvalidRequestException { } public superColumn_t get_superColumn ( String tablename , String key , String columnFamily_column ) throws InvalidRequestException , NotFoundException { } public boolean batch_insert_superColumn_blocking ( batch_mutation_super_t batchMutationSuper ) throws InvalidRequestException { } public void batch_insert_superColumn ( batch_mutation_super_t batchMutationSuper ) { } public String getStringProperty ( String propertyName ) { } public List < String > getStringListProperty ( String propertyName ) { } public String describeTable ( String tableName ) { } public CqlResult_t executeQuery ( String query ) throws TException { } public List < String > get_key_range ( String tablename , String startWith , String stopAt , int maxResults ) throws InvalidRequestException { CassandraServer . logger_ . debug ( "get_range" ) ; if ( ! ( ( StorageService . getPartitioner ( ) ) instanceof OrderPreservingPartitioner ) ) { throw new InvalidRequestException ( "range<seq2seq4repair_space>queries<seq2seq4repair_space>may<seq2seq4repair_space>only<seq2seq4repair_space>be<seq2seq4repair_space>performed<seq2seq4repair_space>against<seq2seq4repair_space>an<seq2seq4repair_space>order-preserving<seq2seq4repair_space>partitioner" ) ; } try { Message message = new RangeCommand ( tablename , startWith , stopAt , maxResults ) . getMessage ( ) ; EndPoint endPoint = StorageService . instance ( ) . findSuitableEndPoint ( startWith ) ; IAsyncResult iar = MessagingService . getMessagingInstance ( ) . sendRR ( message , endPoint ) ; <START_BUG> byte [ ] responseBody = ( ( byte [ ] ) ( iar . get ( ( 2 * ( DatabaseDescriptor . getRpcTimeout ( ) ) ) , TimeUnit . MILLISECONDS ) [ 0 ] ) ) ; <END_BUG> return RangeReply . read ( responseBody ) . keys ; } catch ( Exception e ) { throw new RuntimeException ( e ) ; } } public void touch ( String key , boolean fData ) { } }

Fix:
byte [ ] responseBody = iar . get ( ( 2 * ( DatabaseDescriptor . getRpcTimeout ( ) ) ) , TimeUnit . MILLISECONDS ) ;