Buggy code:
public class GroupDetailsActivity extends BaseActivity implements OnClickListener { private static final String TAG = "GroupDetailsActivity" ; private static final int REQUEST_CODE_ADD_USER = 0 ; private static final int REQUEST_CODE_EXIT = 1 ; private static final int REQUEST_CODE_EXIT_DELETE = 2 ; private static final int REQUEST_CODE_CLEAR_ALL_HISTORY = 3 ; private static final int REQUEST_CODE_ADD_TO_BALCKLIST = 4 ; private static final int REQUEST_CODE_EDIT_GROUPNAME = 5 ; String longClickUsername = null ; private ExpandGridView userGridview ; private String groupId ; private ProgressBar loadingPB ; private Button exitBtn ; private Button deleteBtn ; private EMGroup group ; private GroupDetailsActivity . GridAdapter adapter ; private int referenceWidth ; private int referenceHeight ; private ProgressDialog progressDialog ; private RelativeLayout rl_switch_block_groupmsg ; private ImageView iv_switch_block_groupmsg ; private ImageView iv_switch_unblock_groupmsg ; public static GroupDetailsActivity instance ; String st = "" ; private RelativeLayout clearAllHistory ; private RelativeLayout blacklistLayout ; private RelativeLayout changeGroupNameLayout ; private RelativeLayout idLayout ; private TextView idText ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } @ Override protected void onActivityResult ( int requestCode , int resultCode , Intent data ) { } public void exitGroup ( View view ) { } public void exitDeleteGroup ( View view ) { } public void clearGroupHistory ( ) { } private void exitGrop ( ) { } private void deleteGrop ( ) { } private void addMembersToGroup ( final String [ ] newmembers ) { } @ Override public void onClick ( View v ) { } private class GridAdapter extends ArrayAdapter < String > { private int res ; public boolean isInDeleteMode ; private List < String > objects ; public GridAdapter ( Context context , int textViewResourceId , List < String > objects ) { } @ Override public View getView ( final int position , View convertView , final ViewGroup parent ) { } @ Override public int getCount ( ) { } } protected void updateGroup ( ) { new Thread ( new Runnable ( ) { public void run ( ) { try { EMGroup returnGroup = EMChatManager . getInstance ( ) . fetchGroupFromServer ( groupId ) ; EMChatManager . getInstance ( ) . createOrUpdateLocalGroup ( returnGroup ) ; runOnUiThread ( new Runnable ( ) { public void run ( ) { ( ( TextView ) ( findViewById ( group_name ) ) ) . setText ( ( ( ( ( group . getGroupName ( ) ) + "(" ) + ( group . getAffiliationsCount ( ) ) ) + "人)" ) ) ; loadingPB . setVisibility ( INVISIBLE ) ; adapter . notifyDataSetChanged ( ) ; if ( EMChatManager . getInstance ( ) . getCurrentUser ( ) . equals ( group . getOwner ( ) ) ) { exitBtn . setVisibility ( GONE ) ; deleteBtn . setVisibility ( VISIBLE ) ; } else { exitBtn . setVisibility ( VISIBLE ) ; deleteBtn . setVisibility ( GONE ) ; } EMLog . d ( GroupDetailsActivity . TAG , ( "group<seq2seq4repair_space>msg<seq2seq4repair_space>is<seq2seq4repair_space>blocked:" + ( group . getMsgBlocked ( ) ) ) ) ; <START_BUG> if ( group . getMsgBlocked ( ) ) { <END_BUG> iv_switch_block_groupmsg . setVisibility ( VISIBLE ) ; iv_switch_unblock_groupmsg . setVisibility ( INVISIBLE ) ; } else { iv_switch_block_groupmsg . setVisibility ( INVISIBLE ) ; iv_switch_unblock_groupmsg . setVisibility ( VISIBLE ) ; } } } ) ; } catch ( Exception e ) { runOnUiThread ( new Runnable ( ) { public void run ( ) { loadingPB . setVisibility ( INVISIBLE ) ; } } ) ; } } } ) . start ( ) ; } public void back ( View view ) { } @ Override public void onBackPressed ( ) { } @ Override protected void onDestroy ( ) { } private static class ViewHolder { ImageView imageView ; TextView textView ; ImageView badgeDeleteView ; } }

Fix:
if ( group . isMsgBlocked ( ) ) {