Buggy code:
public class MembershipCleaner { private static final int port_ = 7000 ; private static final long waitTime_ = 10000 ; public static void main ( String [ ] args ) throws Throwable { if ( ( args . length ) != 3 ) { System . out . println ( ( "Usage<seq2seq4repair_space>:<seq2seq4repair_space>java<seq2seq4repair_space>com.facebook.infrastructure.tools.MembershipCleaner<seq2seq4repair_space>" + ( ( "<ip:port<seq2seq4repair_space>to<seq2seq4repair_space>send<seq2seq4repair_space>the<seq2seq4repair_space>message><seq2seq4repair_space>" + "<node<seq2seq4repair_space>which<seq2seq4repair_space>needs<seq2seq4repair_space>to<seq2seq4repair_space>be<seq2seq4repair_space>removed><seq2seq4repair_space>" ) + "<file<seq2seq4repair_space>containing<seq2seq4repair_space>all<seq2seq4repair_space>nodes<seq2seq4repair_space>in<seq2seq4repair_space>the<seq2seq4repair_space>cluster>" ) ) ) ; System . exit ( 1 ) ; } String ipPort = args [ 0 ] ; String node = args [ 1 ] ; String file = args [ 2 ] ; String [ ] ipPortPair = ipPort . split ( ":" ) ; EndPoint target = new EndPoint ( ipPortPair [ 0 ] , Integer . valueOf ( ipPortPair [ 1 ] ) ) ; MembershipCleaner . MembershipCleanerMessage mcMessage = new MembershipCleaner . MembershipCleanerMessage ( node ) ; ByteArrayOutputStream bos = new ByteArrayOutputStream ( ) ; DataOutputStream dos = new DataOutputStream ( bos ) ; MembershipCleaner . MembershipCleanerMessage . serializer ( ) . serialize ( mcMessage , dos ) ; <START_BUG> Message mbrshipCleanerMessage = new Message ( new EndPoint ( FBUtilities . getHostAddress ( ) , MembershipCleaner . port_ ) , "" , StorageService . mbrshipCleanerVerbHandler_ , new Object [ ] { bos . toByteArray ( ) } ) ; <END_BUG> BufferedReader bufReader = new BufferedReader ( new InputStreamReader ( new FileInputStream ( file ) ) ) ; String line = null ; while ( ( line = bufReader . readLine ( ) ) != null ) { mbrshipCleanerMessage . addHeader ( line , line . getBytes ( ) ) ; } System . out . println ( ( "Sending<seq2seq4repair_space>a<seq2seq4repair_space>membership<seq2seq4repair_space>clean<seq2seq4repair_space>message<seq2seq4repair_space>to<seq2seq4repair_space>" + target ) ) ; MessagingService . getMessagingInstance ( ) . sendOneWay ( mbrshipCleanerMessage , target ) ; Thread . sleep ( MembershipCleaner . waitTime_ ) ; System . out . println ( "Done<seq2seq4repair_space>sending<seq2seq4repair_space>the<seq2seq4repair_space>update<seq2seq4repair_space>message" ) ; } public static class MembershipCleanerMessage implements Serializable { private static ICompactSerializer < MembershipCleaner . MembershipCleanerMessage > serializer_ ; private static AtomicInteger idGen_ = new AtomicInteger ( 0 ) ; static ICompactSerializer < MembershipCleaner . MembershipCleanerMessage > serializer ( ) { } private String target_ ; MembershipCleanerMessage ( String target ) { } String getTarget ( ) { } } public static class MembershipCleanerMessageSerializer implements ICompactSerializer < MembershipCleaner . MembershipCleanerMessage > { public void serialize ( MembershipCleaner . MembershipCleanerMessage mcMessage , DataOutputStream dos ) throws IOException { } public MembershipCleaner . MembershipCleanerMessage deserialize ( DataInputStream dis ) throws IOException { } } }

Fix:
Message mbrshipCleanerMessage = new Message ( new EndPoint ( FBUtilities . getHostAddress ( ) , MembershipCleaner . port_ ) , "" , StorageService . mbrshipCleanerVerbHandler_ , bos . toByteArray ( ) ) ;