Buggy code:
public class CassandraServer extends FacebookBase implements Cassandra . Iface { private static Logger logger_ = Logger . getLogger ( CassandraServer . class ) ; protected StorageService storageService ; protected CassandraServer ( String name ) { } public CassandraServer ( ) throws Throwable { } public void start ( ) throws Throwable { } private void validateTable ( String table ) throws CassandraException { } protected ColumnFamily get_cf ( String tablename , String key , String columnFamily , List < String > columNames ) throws CassandraException , TException { } public ArrayList < column_t > get_columns_since ( String tablename , String key , String columnFamily_column , long timeStamp ) throws CassandraException , TException { } public List < column_t > get_slice_by_names ( String tablename , String key , String columnFamily , List < String > columnNames ) throws CassandraException , TException { } public ArrayList < column_t > get_slice ( String tablename , String key , String columnFamily_column , int start , int count ) throws CassandraException , TException { } public column_t get_column ( String tablename , String key , String columnFamily_column ) throws CassandraException , TException { } public int get_column_count ( String tablename , String key , String columnFamily_column ) throws CassandraException { } public void insert ( String tablename , String key , String columnFamily_column , String cellData , long timestamp ) { } public boolean batch_insert_blocking ( batch_mutation_t batchMutation ) { } public void batch_insert ( batch_mutation_t batchMutation ) { } public void remove ( String tablename , String key , String columnFamily_column ) { } public boolean remove ( String tablename , String key , String columnFamily_column , long timestamp , int block_for ) { } public List < superColumn_t > get_slice_super_by_names ( String tablename , String key , String columnFamily , List < String > superColumnNames ) throws CassandraException , TException { } public ArrayList < superColumn_t > get_slice_super ( String tablename , String key , String columnFamily_superColumnName , int start , int count ) throws CassandraException { } public superColumn_t get_superColumn ( String tablename , String key , String columnFamily_column ) throws CassandraException { } public boolean batch_insert_superColumn_blocking ( batch_mutation_super_t batchMutationSuper ) { } public void batch_insert_superColumn ( batch_mutation_super_t batchMutationSuper ) { } public String getStringProperty ( String propertyName ) throws TException { } public List < String > getStringListProperty ( String propertyName ) throws TException { } public String describeTable ( String tableName ) throws TException { } public CqlResult_t executeQuery ( String query ) throws TException { } public void touch ( String key , boolean fData ) { } public String getVersion ( ) { } public int getStatus ( ) { } public String getStatusDetails ( ) { } public static void main ( String [ ] args ) throws Throwable { <START_BUG> int port = 9160 ; <END_BUG> try { CassandraServer peerStorageServer = new CassandraServer ( ) ; peerStorageServer . start ( ) ; Cassandra . Processor processor = new Cassandra . Processor ( peerStorageServer ) ; TServerSocket tServerSocket = new TServerSocket ( port ) ; TProtocolFactory tProtocolFactory = new TBinaryProtocol . Factory ( ) ; Options options = new Options ( ) ; options . minWorkerThreads = 64 ; TThreadPoolServer serverEngine = new TThreadPoolServer ( processor , tServerSocket , tProtocolFactory ) ; serverEngine . serve ( ) ; } catch ( Exception x ) { System . err . println ( "UNCAUGHT<seq2seq4repair_space>EXCEPTION<seq2seq4repair_space>IN<seq2seq4repair_space>main()" ) ; x . printStackTrace ( ) ; System . exit ( 1 ) ; } } }

Fix:
int port = DatabaseDescriptor . getThriftPort ( ) ;