Buggy code:
public class Activity_Logged extends Activity { TextView textEmail ; Piggate _piggate ; private boolean handledClick = false ; private boolean notification = false ; private View viewContainer ; private TextView textNotification ; private Timer timer ; private Timer timer2 ; Random rnd = new Random ( ) ; @ Override public void onBackPressed ( ) { } @ Override public void onPause ( ) { } synchronized void showNotification ( final String message ) { } synchronized void showUINotification ( final ArrayList < PiggateOffers > offers ) { } @ Override protected void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; _piggate = new Piggate ( this , null ) ; setContentView ( activity_logged ) ; textEmail = ( ( TextView ) ( findViewById ( nametext ) ) ) ; viewContainer = findViewById ( notificationbar ) ; textNotification = ( ( TextView ) ( findViewById ( notification_message ) ) ) ; Button logout = ( ( Button ) ( findViewById ( buttonlogout ) ) ) ; final ImageButton return_button = ( ( ImageButton ) ( findViewById ( return1 ) ) ) ; textEmail . setText ( ( "Hi,<seq2seq4repair_space>" + ( PiggateUser . getEmail ( ) ) ) ) ; return_button . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { onBackPressed ( ) ; } } ) ; logout . setOnClickListener ( new View . OnClickListener ( ) { @ Override public synchronized void onClick ( View v ) { if ( ! ( handledClick ) ) { handledClick = true ; Intent slideactivity = new Intent ( Activity_Logged . this , Activity_Main . class ) ; slideactivity . putExtra ( "ACTIVITY_MAIN_CREATED_BY_BUTTON_LOGOUT" , true ) ; Bundle bndlanimation = ActivityOptions . makeCustomAnimation ( getApplicationContext ( ) , flip1 , flip2 ) . toBundle ( ) ; startActivity ( slideactivity , bndlanimation ) ; if ( ( checkInternetConnection ( ) ) == true ) { _piggate . RequestCloseSession ( ) . setListenerRequest ( new Piggate . PiggateCallBack ( ) { @ Override public void onComplete ( int statusCode , Header [ ] headers , String msg , JSONObject data ) { Toast . makeText ( getApplicationContext ( ) , msg , LENGTH_LONG ) . show ( ) ; } @ Override public void onError ( int statusCode , Header [ ] headers , String msg , JSONObject data ) { Toast . makeText ( getApplicationContext ( ) , msg , LENGTH_LONG ) . show ( ) ; _piggate . reload ( ) ; } @ Override public void onComplete ( int statusCode , Header [ ] headers , String msg , JSONArray data ) { } @ Override public void onError ( int statusCode , Header [ ] headers , String msg , JSONArray data ) { } } ) . exec ( ) ; } else { Toast . makeText ( getApplicationContext ( ) , "Network<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>working" , LENGTH_LONG ) . show ( ) ; } } } } ) ; if ( ( checkInternetConnection ( ) ) == true ) { <START_BUG> _piggate . requestGetNotification ( ) . setListenerRequest ( new Piggate . PiggateCallBack ( ) { <END_BUG> @ Override public void onComplete ( int statusCode , Header [ ] headers , String msg , JSONObject data ) { Service_Notify . notificationMsg = data . optString ( "message" ) ; } @ Override public void onError ( int statusCode , Header [ ] headers , String msg , JSONObject data ) { Service_Notify . notificationMsg = "Click<seq2seq4repair_space>to<seq2seq4repair_space>see<seq2seq4repair_space>the<seq2seq4repair_space>offer" ; } @ Override public void onComplete ( int statusCode , Header [ ] headers , String msg , JSONArray data ) { } @ Override public void onError ( int statusCode , Header [ ] headers , String msg , JSONArray data ) { } } ) . exec ( ) ; } else { Service_Notify . notificationMsg = "Click<seq2seq4repair_space>to<seq2seq4repair_space>see<seq2seq4repair_space>the<seq2seq4repair_space>offer" ; } } @ Override public void onStart ( ) { } @ Override public void onStop ( ) { } @ Override public void onDestroy ( ) { } @ Override protected void onResume ( ) { } public void onActivityResult ( int requestCode , int resultCode , Intent data ) { } private boolean checkInternetConnection ( ) { } }

Fix:
_piggate . RequestGetNotification ( ) . setListenerRequest ( new Piggate . PiggateCallBack ( ) {