Buggy code:
public class UserInput extends Activity implements OnClickListener , Observer { public static final String tag = "Ships<seq2seq4repair_space>UserInput<seq2seq4repair_space>" ; public static final String SMS_RECIPIENT_EXTRA = "com.gmail.wazappdotgithub.ships.SMS_RECIPIENT" ; public static final String ACTION_SMS_SENT = "com.gmail.wazappdotgithub.ships.SMS_SENT_ACTION" ; protected String MESSAGES_TO_FRIEND = "http:////ships.com//Ships,<seq2seq4repair_space>press<seq2seq4repair_space>if<seq2seq4repair_space>you<seq2seq4repair_space>want<seq2seq4repair_space>to<seq2seq4repair_space>pla.." ; protected String PHONE_NUMBER ; private Button challengeAFriend = null ; private Button challengeComputer = null ; private Button hostLan = null ; private Button joinLan = null ; private Button fleeHome = null ; @ Override public void onCreate ( Bundle savedInstanceState ) { } @ Override public void onClick ( View arg0 ) { if ( arg0 == ( challengeAFriend ) ) { try { Intent intent = new Intent ( Intent . ACTION_PICK , Contacts . CONTENT_URI ) ; startActivityForResult ( intent , 1 ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; Log . e ( "Error<seq2seq4repair_space>in<seq2seq4repair_space>intent<seq2seq4repair_space>:<seq2seq4repair_space>" , e . toString ( ) ) ; } } else if ( arg0 == ( hostLan ) ) { try { Log . d ( UserInput . tag , ( ( UserInput . tag ) + "launching<seq2seq4repair_space>Communication<seq2seq4repair_space>Module" ) ) ; ComModule . serve_from_tcp ( DEFAULT_PORT ) ; Log . d ( UserInput . tag , ( ( UserInput . tag ) + "creating<seq2seq4repair_space>remoteclient" ) ) ; RemoteClient . newInstance ( this , true ) ; Log . d ( UserInput . tag , ( ( UserInput . tag ) + "completed<seq2seq4repair_space>remoteclient" ) ) ; RemoteClient . getInstance ( ) . playerCompletedUserInput ( ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; AlertDialog . Builder builder = new AlertDialog . Builder ( this ) ; builder . setMessage ( ( "An<seq2seq4repair_space>error<seq2seq4repair_space>occurred<seq2seq4repair_space>establishing<seq2seq4repair_space>the<seq2seq4repair_space>connection\n" + ( e . getMessage ( ) ) ) ) . setCancelable ( false ) . setPositiveButton ( "Try<seq2seq4repair_space>again" , new DialogInterface . OnClickListener ( ) { public void onClick ( DialogInterface dialog , int id ) { dialog . cancel ( ) ; } } ) . setNegativeButton ( "Quit" , new DialogInterface . OnClickListener ( ) { public void onClick ( DialogInterface dialog , int id ) { UserInput . this . finish ( ) ; } } ) ; AlertDialog alert = builder . create ( ) ; alert . show ( ) ; } } else if ( arg0 == ( joinLan ) ) { try { Log . d ( UserInput . tag , ( ( UserInput . tag ) + "launching<seq2seq4repair_space>Communication<seq2seq4repair_space>Module" ) ) ; ComModule . connect_to_tcp ( Inet4Address . getByName ( "192.168.0.14" ) , DEFAULT_PORT ) ; Log . d ( UserInput . tag , ( ( UserInput . tag ) + "creating<seq2seq4repair_space>remoteclient" ) ) ; <START_BUG> RemoteClient . newInstance ( this , true ) ; <END_BUG> Log . d ( UserInput . tag , ( ( UserInput . tag ) + "completed<seq2seq4repair_space>remoteclient" ) ) ; RemoteClient . getInstance ( ) . playerCompletedUserInput ( ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; AlertDialog . Builder builder = new AlertDialog . Builder ( this ) ; builder . setMessage ( ( "An<seq2seq4repair_space>error<seq2seq4repair_space>occurred<seq2seq4repair_space>establishing<seq2seq4repair_space>the<seq2seq4repair_space>connection\n" + ( e . getMessage ( ) ) ) ) . setCancelable ( false ) . setPositiveButton ( "Try<seq2seq4repair_space>again" , new DialogInterface . OnClickListener ( ) { public void onClick ( DialogInterface dialog , int id ) { dialog . cancel ( ) ; } } ) . setNegativeButton ( "Quit" , new DialogInterface . OnClickListener ( ) { public void onClick ( DialogInterface dialog , int id ) { UserInput . this . finish ( ) ; } } ) ; AlertDialog alert = builder . create ( ) ; alert . show ( ) ; } } else if ( arg0 == ( challengeComputer ) ) { try { Log . d ( UserInput . tag , ( ( UserInput . tag ) + "launching<seq2seq4repair_space>Communication<seq2seq4repair_space>Module" ) ) ; ComModule . serve_computer ( DEFAULT_PORT ) ; Log . d ( UserInput . tag , ( ( UserInput . tag ) + "creating<seq2seq4repair_space>remoteclient" ) ) ; RemoteClient . newInstance ( this , true ) ; Log . d ( UserInput . tag , ( ( UserInput . tag ) + "completed<seq2seq4repair_space>remoteclient" ) ) ; RemoteClient . getInstance ( ) . playerCompletedUserInput ( ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; AlertDialog . Builder builder = new AlertDialog . Builder ( this ) ; builder . setMessage ( ( "An<seq2seq4repair_space>error<seq2seq4repair_space>occurred<seq2seq4repair_space>establishing<seq2seq4repair_space>the<seq2seq4repair_space>connection\n" + ( e . getMessage ( ) ) ) ) . setCancelable ( false ) . setPositiveButton ( "Try<seq2seq4repair_space>again" , new DialogInterface . OnClickListener ( ) { public void onClick ( DialogInterface dialog , int id ) { dialog . cancel ( ) ; } } ) . setNegativeButton ( "Quit" , new DialogInterface . OnClickListener ( ) { public void onClick ( DialogInterface dialog , int id ) { UserInput . this . finish ( ) ; } } ) ; AlertDialog alert = builder . create ( ) ; alert . show ( ) ; } } else if ( arg0 == ( fleeHome ) ) { finish ( ) ; } } @ Override public void onActivityResult ( int reqCode , int resultCode , Intent data ) { } public void textFriend ( String phonenumber , String messageToFriend ) { } @ Override public void update ( Observable observable , Object data ) { } }

Fix:
RemoteClient . newInstance ( this , false ) ;