Program: 35664
Project: 35664
Buggy source:
@Override protected void onViewBound(@NonNull View view){
  super.onViewBound(view);
  NextcloudTalkApplication.getSharedApplication().getComponentApplication().inject(this);
  swipeRefreshLayout.setEnabled(false);
  if (adapter == null) {
    adapter=new FlexibleAdapter<>(userItems,getActivity(),false);
    UserEntity userEntity;
    Participant participant;
    if (!isAccountImport) {
      for (      Object userEntityObject : userUtils.getUsers()) {
        userEntity=(UserEntity)userEntityObject;
        if (!userEntity.getCurrent()) {
          participant=new Participant();
          participant.setName(userEntity.getDisplayName());
          participant.setUserId(userEntity.getUsername());
          userItems.add(new AdvancedUserItem(participant,userEntity,null));
        }
      }
      adapter.addListener(onSwitchItemClickListener);
      adapter.updateDataSet(userItems,false);
    }
 else {
      getActionBar().show();
      Account account;
      ImportAccount importAccount;
      for (      Object accountObject : AccountUtils.findAccounts(userUtils.getUsers())) {
        account=(Account)accountObject;
        importAccount=AccountUtils.getInformationFromAccount(account);
        participant=new Participant();
        participant.setName(importAccount.getUsername());
        participant.setUserId(importAccount.getUsername());
        userEntity=new UserEntity();
        userEntity.setBaseUrl(importAccount.getBaseUrl());
        userItems.add(new AdvancedUserItem(participant,userEntity,account));
      }
      adapter.addListener(onImportItemClickListener);
      adapter.updateDataSet(userItems,false);
    }
  }
  prepareViews();
}

Fixed version (ground truth):
@Override protected void onViewBound(@NonNull View view){
  super.onViewBound(view);
  NextcloudTalkApplication.getSharedApplication().getComponentApplication().inject(this);
  swipeRefreshLayout.setEnabled(false);
  if (adapter == null) {
    adapter=new FlexibleAdapter<>(userItems,getActivity(),false);
    UserEntity userEntity;
    Participant participant;
    if (!isAccountImport) {
      for (      Object userEntityObject : userUtils.getUsers()) {
        userEntity=(UserEntity)userEntityObject;
        if (!userEntity.getCurrent()) {
          participant=new Participant();
          participant.setName(userEntity.getDisplayName());
          String userId;
          if (userEntity.getUserId() != null) {
            userId=userEntity.getUserId();
          }
 else {
            userId=userEntity.getUsername();
          }
          participant.setUserId(userId);
          userItems.add(new AdvancedUserItem(participant,userEntity,null));
        }
      }
      adapter.addListener(onSwitchItemClickListener);
      adapter.updateDataSet(userItems,false);
    }
 else {
      getActionBar().show();
      Account account;
      ImportAccount importAccount;
      for (      Object accountObject : AccountUtils.findAccounts(userUtils.getUsers())) {
        account=(Account)accountObject;
        importAccount=AccountUtils.getInformationFromAccount(account);
        participant=new Participant();
        participant.setName(importAccount.getUsername());
        participant.setUserId(importAccount.getUsername());
        userEntity=new UserEntity();
        userEntity.setBaseUrl(importAccount.getBaseUrl());
        userItems.add(new AdvancedUserItem(participant,userEntity,account));
      }
      adapter.addListener(onImportItemClickListener);
      adapter.updateDataSet(userItems,false);
    }
  }
  prepareViews();
}