Buggy code:
public class WebSocketService { public static ProgressDialog dialog ; public static WebSocketClient mWebSocketClient = null ; private static int count = 0 ; private static JSONObject arr_request = new JSONObject ( ) ; private static WebSocketService . MessageHandler messageHandler ; public static void reconnect ( ) { } public static void connectUserWebSocket ( ) { try { final JSONObject json_user = new JSONObject ( user . myself ) ; if ( ( ( AbstractActivity . user ) != null ) && ( BroadcastManager . isNetworkAvailable ( gif_self ) ) ) { URI uri ; try { uri = new URI ( ( ( Constants . SERVER_URL_WEBSOCKET_USER ) + ( json_user . getInt ( "user_id" ) ) ) ) ; } catch ( URISyntaxException e ) { e . printStackTrace ( ) ; return ; } WebSocketService . mWebSocketClient = new WebSocketClient ( uri ) { @ Override public void onOpen ( ServerHandshake serverHandshake ) { Log . e ( "Websocket" , "Opened" ) ; try { JSONObject check_auto_login = new JSONObject ( ) ; check_auto_login . put ( "function" , "check_udid" ) ; check_auto_login . put ( "udid" , json_user . getString ( "device_token" ) ) ; WebSocketService . sendRequest ( check_auto_login ) ; if ( ( WebSocketService . arr_request . length ( ) ) > 0 ) { Iterator iterator = WebSocketService . arr_request . keys ( ) ; while ( iterator . hasNext ( ) ) { String key = ( ( String ) ( iterator . next ( ) ) ) ; WebSocketService . sendRequest ( WebSocketService . arr_request . getJSONObject ( key ) ) ; } } } catch ( Exception e ) { } } @ Override public void onMessage ( String s ) { Log . e ( "Message" , s ) ; if ( ( WebSocketService . messageHandler ) != null ) { WebSocketService . messageHandler . handleMessage ( s ) ; } try { JSONObject check_auto_login = new JSONObject ( s ) ; if ( ! ( check_auto_login . getString ( "task_id" ) . equals ( "0" ) ) ) { WebSocketService . arr_request . remove ( check_auto_login . getString ( "task_id" ) ) ; } switch ( check_auto_login . getString ( "function" ) . toString ( ) ) { case "group_info" : WebSocketService . dialog . dismiss ( ) ; if ( check_auto_login . getString ( "result" ) . equals ( "true" ) ) { <START_BUG> user . group_info = check_auto_login . getString ( "data" ) ; <END_BUG> PrefUtils . setCurrentUser ( user , gif_self ) ; } else { WebSocketService . sendRequestWithLoading ( check_auto_login ) ; } break ; case "delete_group" : if ( check_auto_login . getString ( "result" ) . equals ( "true" ) ) { user . have_my_group = "false" ; user . group_info = "" ; PrefUtils . setCurrentUser ( user , gif_self ) ; gif_self . openActivity ( gif_self , GroupLunchActivity . class ) ; arr_messages . add ( 0 , gif_self . getResources ( ) . getString ( group_delete_successfully ) ) ; } break ; case "check_udid" : if ( check_auto_login . getString ( "result" ) . equals ( "false" ) ) { PrefUtils . clearCurrentUser ( gif_self ) ; LoginManager . getInstance ( ) . logOut ( ) ; gif_self . onBackWelcome ( ) ; WebSocketService . mWebSocketClient = null ; } break ; case "check_app_update" : if ( check_auto_login . getString ( "result" ) . equals ( "false" ) ) { AbstractActivity . update = 1 ; arr_alerts . add ( gif_self . getResources ( ) . getString ( update_new_version ) ) ; } break ; default : break ; } } catch ( Exception e ) { } } @ Override public void onClose ( int i , String s , boolean b ) { Log . e ( "Websocket" , ( "Closed<seq2seq4repair_space>" + s ) ) ; Handler handler = new Handler ( ) ; handler . postDelayed ( new Runnable ( ) { public void run ( ) { WebSocketService . mWebSocketClient . connect ( ) ; } } , 5000 ) ; } @ Override public void onError ( Exception e ) { Log . e ( "Websocket" , ( "Error<seq2seq4repair_space>" + ( e . getMessage ( ) ) ) ) ; WebSocketService . mWebSocketClient = null ; WebSocketService . reconnect ( ) ; } } ; WebSocketService . mWebSocketClient . connect ( ) ; } else { if ( ! ( BroadcastManager . isNetworkAvailable ( gif_self ) ) ) { new android . app . AlertDialog . Builder ( AbstractActivity . gif_self ) . setMessage ( "Please<seq2seq4repair_space>enable<seq2seq4repair_space>your<seq2seq4repair_space>internet<seq2seq4repair_space>connection!" ) . setNegativeButton ( "OK" , new DialogInterface . OnClickListener ( ) { public void onClick ( DialogInterface dialog , int which ) { Intent myIntent = new Intent ( Settings . ACTION_WIFI_SETTINGS ) ; gif_self . startActivity ( myIntent ) ; } } ) . show ( ) ; } } } catch ( Exception e ) { } } public static void sendRequest ( JSONObject params ) { } public static void sendRequestWithLoading ( JSONObject params ) { } public static void updateUserField ( JSONArray field_names , JSONArray field_values ) { } public static void CreateGroupLunch ( JSONObject params ) { } public static void onSaveEditText ( final EditText e , final String field_name ) { } public static void onSaveSwitch ( final Switch e , final String field_name ) { } public static void onSaveSpinner ( final Spinner e , final String field_name ) { } public static void addMessageHandler ( WebSocketService . MessageHandler msgHandler ) { } public static interface MessageHandler { public void handleMessage ( String message ) { } } }

Fix:
user . group_info = check_auto_login . getJSONObject ( "data" ) . getString ( "group" ) ;