Buggy code:
public final class MessagingService implements MessagingServiceMBean { public static final int VERSION_07 = 1 ; public static final int version_ = 2 ; private SerializerType serializerType_ = SerializerType . BINARY ; private static final int PROTOCOL_MAGIC = - 900387334 ; private final ExpiringMap < String , Pair < InetAddress , IMessageCallback > > callbacks ; private final Map < StorageService . Verb , IVerbHandler > verbHandlers_ ; private final ExecutorService streamExecutor_ ; private final NonBlockingHashMap < InetAddress , OutboundTcpConnectionPool > connectionManagers_ = new NonBlockingHashMap < InetAddress , OutboundTcpConnectionPool > ( ) ; private static final Logger logger_ = LoggerFactory . getLogger ( MessagingService . class ) ; private static final int LOG_DROPPED_INTERVAL_IN_MS = 5000 ; private MessagingService . SocketThread socketThread ; private final SimpleCondition listenGate ; private final Map < StorageService . Verb , AtomicInteger > droppedMessages = new EnumMap < StorageService . Verb , AtomicInteger > ( Verb . class ) ; private final List < ILatencySubscriber > subscribers = new ArrayList < ILatencySubscriber > ( ) ; private static class MSHandle { public static final MessagingService instance = new MessagingService ( ) ; } public static MessagingService instance ( ) { } private MessagingService ( ) { } public void maybeAddLatency ( IMessageCallback cb , InetAddress address , double latency ) { } public void addLatency ( InetAddress address , double latency ) { } public static byte [ ] hash ( String type , byte [ ] data ) { } public void convict ( InetAddress ep ) { } public void listen ( InetAddress localEp ) throws IOException , ConfigurationException { } private ServerSocket getServerSocket ( InetAddress localEp ) throws IOException , ConfigurationException { final ServerSocket ss ; <START_BUG> if ( ( DatabaseDescriptor . getEncryptionOptions ( ) . internode_encryption ) == ( InternodeEncryption . all ) ) { <END_BUG> ss = SSLFactory . getServerSocket ( DatabaseDescriptor . getEncryptionOptions ( ) , localEp , DatabaseDescriptor . getStoragePort ( ) ) ; MessagingService . logger_ . info ( "Starting<seq2seq4repair_space>Encrypted<seq2seq4repair_space>Messaging<seq2seq4repair_space>Service<seq2seq4repair_space>on<seq2seq4repair_space>port<seq2seq4repair_space>{}" , DatabaseDescriptor . getStoragePort ( ) ) ; } else { ServerSocketChannel serverChannel = ServerSocketChannel . open ( ) ; ss = serverChannel . socket ( ) ; ss . setReuseAddress ( true ) ; InetSocketAddress address = new InetSocketAddress ( localEp , DatabaseDescriptor . getStoragePort ( ) ) ; try { ss . bind ( address ) ; } catch ( BindException e ) { if ( e . getMessage ( ) . contains ( "in<seq2seq4repair_space>use" ) ) throw new ConfigurationException ( ( address + "<seq2seq4repair_space>is<seq2seq4repair_space>in<seq2seq4repair_space>use<seq2seq4repair_space>by<seq2seq4repair_space>another<seq2seq4repair_space>process.<seq2seq4repair_space>Change<seq2seq4repair_space>listen_address:storage_port<seq2seq4repair_space>in<seq2seq4repair_space>cassandra.yaml<seq2seq4repair_space>to<seq2seq4repair_space>values<seq2seq4repair_space>that<seq2seq4repair_space>do<seq2seq4repair_space>not<seq2seq4repair_space>conflict<seq2seq4repair_space>with<seq2seq4repair_space>other<seq2seq4repair_space>services" ) ) ; else if ( e . getMessage ( ) . contains ( "Cannot<seq2seq4repair_space>assign<seq2seq4repair_space>requested<seq2seq4repair_space>address" ) ) throw new ConfigurationException ( ( ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>bind<seq2seq4repair_space>to<seq2seq4repair_space>address<seq2seq4repair_space>" + address ) + ".<seq2seq4repair_space>Set<seq2seq4repair_space>listen_address<seq2seq4repair_space>in<seq2seq4repair_space>cassandra.yaml<seq2seq4repair_space>to<seq2seq4repair_space>an<seq2seq4repair_space>interface<seq2seq4repair_space>you<seq2seq4repair_space>can<seq2seq4repair_space>bind<seq2seq4repair_space>to,<seq2seq4repair_space>e.g.,<seq2seq4repair_space>your<seq2seq4repair_space>private<seq2seq4repair_space>IP<seq2seq4repair_space>address<seq2seq4repair_space>on<seq2seq4repair_space>EC2" ) ) ; else throw e ; } MessagingService . logger_ . info ( "Starting<seq2seq4repair_space>Messaging<seq2seq4repair_space>Service<seq2seq4repair_space>on<seq2seq4repair_space>port<seq2seq4repair_space>{}" , DatabaseDescriptor . getStoragePort ( ) ) ; } return ss ; } public void waitUntilListening ( ) { } public OutboundTcpConnectionPool getConnectionPool ( InetAddress to ) { } public OutboundTcpConnection getConnection ( InetAddress to , Message msg ) { } public void registerVerbHandlers ( StorageService . Verb verb , IVerbHandler verbHandler ) { } public IVerbHandler getVerbHandler ( StorageService . Verb type ) { } private void addCallback ( IMessageCallback cb , String messageId , InetAddress to ) { } private static AtomicInteger idGen = new AtomicInteger ( 0 ) ; private static String nextId ( ) { } public String sendRR ( Message message , InetAddress to , IMessageCallback cb ) { } public void sendOneWay ( Message message , InetAddress to ) { } public void sendReply ( Message message , String id , InetAddress to ) { } public String sendRR ( MessageProducer producer , InetAddress to , IAsyncCallback cb ) { } private void sendOneWay ( Message message , String id , InetAddress to ) { } public IAsyncResult sendRR ( Message message , InetAddress to ) { } public void stream ( StreamHeader header , InetAddress to ) { } public void register ( ILatencySubscriber subcriber ) { } public void waitFor ( ) throws InterruptedException { } public void shutdown ( ) { } public void receive ( Message message , String id ) { } public Pair < InetAddress , IMessageCallback > removeRegisteredCallback ( String messageId ) { } public long getRegisteredCallbackAge ( String messageId ) { } public static void validateMagic ( int magic ) throws IOException { } public static int getBits ( int x , int p , int n ) { } public ByteBuffer packIt ( byte [ ] bytes , boolean compress , int version ) { } public ByteBuffer constructStreamHeader ( StreamHeader streamHeader , boolean compress , int version ) { } public int incrementDroppedMessages ( StorageService . Verb verb ) { } private void logDroppedMessages ( ) { } private static class SocketThread extends Thread { private final ServerSocket server ; SocketThread ( ServerSocket server , String name ) { } public void run ( ) { } void close ( ) throws IOException { } } public Map < String , Integer > getCommandPendingTasks ( ) { } public Map < String , Long > getCommandCompletedTasks ( ) { } public Map < String , Integer > getResponsePendingTasks ( ) { } public Map < String , Long > getResponseCompletedTasks ( ) { } }

Fix:
if ( ( ( DatabaseDescriptor . getEncryptionOptions ( ) ) != null ) && ( ( DatabaseDescriptor . getEncryptionOptions ( ) . internode_encryption ) == ( InternodeEncryption . all ) ) ) {