Program: 35550
Project: 35550
Buggy source:
@Override public void onBind(ChatMessage message){
  super.onBind(message);
  String author;
  if (!TextUtils.isEmpty(author=message.getActorDisplayName())) {
    messageAuthor.setText(author);
  }
 else {
    messageAuthor.setText(R.string.nc_nick_guest);
  }
  if (message.getActorType().equals("String_Node_Str")) {
    TextDrawable drawable=TextDrawable.builder().beginConfig().bold().endConfig().buildRound(String.valueOf(messageAuthor.getText().charAt(0)),NextcloudTalkApplication.getSharedApplication().getResources().getColor(R.color.nc_grey));
    messageUserAvatarView.setVisibility(View.VISIBLE);
    messageUserAvatarView.setImageDrawable(drawable);
  }
  HashMap<String,HashMap<String,String>> messageParameters=message.getMessageParameters();
  Context context=NextcloudTalkApplication.getSharedApplication().getApplicationContext();
  itemView.setSelected(false);
  FlexboxLayout.LayoutParams layoutParams=(FlexboxLayout.LayoutParams)messageTimeView.getLayoutParams();
  layoutParams.setWrapBefore(false);
  Spannable messageString=new SpannableString(message.getText());
  if (messageParameters != null && message.getMessageParameters().size() > 0) {
    for (    String key : message.getMessageParameters().keySet()) {
      HashMap<String,String> individualHashMap=message.getMessageParameters().get(key);
      if (individualHashMap.get("String_Node_Str").equals("String_Node_Str")) {
        int color;
        if (individualHashMap.get("String_Node_Str").equals(currentUser.getUserId())) {
          color=NextcloudTalkApplication.getSharedApplication().getResources().getColor(R.color.nc_incoming_text_mention_you);
        }
 else {
          color=NextcloudTalkApplication.getSharedApplication().getResources().getColor(R.color.nc_incoming_text_mention_others);
        }
        messageString=DisplayUtils.searchAndColor(messageText.getText().toString(),messageString,"String_Node_Str" + individualHashMap.get("String_Node_Str"),color);
      }
    }
  }
 else   if (EmoticonUtils.isMessageWithSingleEmoticonOnly(context,message.getText())) {
    messageString.setSpan(new RelativeSizeSpan(2.5f),0,messageString.length(),Spannable.SPAN_INCLUSIVE_EXCLUSIVE);
    layoutParams.setWrapBefore(true);
    itemView.setSelected(true);
  }
  messageTimeView.setLayoutParams(layoutParams);
  messageText.setText(messageString);
}

Fixed version (ground truth):
@Override public void onBind(ChatMessage message){
  super.onBind(message);
  String author;
  if (!TextUtils.isEmpty(author=message.getActorDisplayName())) {
    messageAuthor.setText(author);
  }
 else {
    messageAuthor.setText(R.string.nc_nick_guest);
  }
  if (message.getActorType().equals("String_Node_Str")) {
    TextDrawable drawable=TextDrawable.builder().beginConfig().bold().endConfig().buildRound(String.valueOf(messageAuthor.getText().charAt(0)),NextcloudTalkApplication.getSharedApplication().getResources().getColor(R.color.nc_grey));
    messageUserAvatarView.setVisibility(View.VISIBLE);
    messageUserAvatarView.setImageDrawable(drawable);
  }
  HashMap<String,HashMap<String,String>> messageParameters=message.getMessageParameters();
  Context context=NextcloudTalkApplication.getSharedApplication().getApplicationContext();
  itemView.setSelected(false);
  messageTimeView.setTextColor(context.getResources().getColor(R.color.warm_grey_four));
  FlexboxLayout.LayoutParams layoutParams=(FlexboxLayout.LayoutParams)messageTimeView.getLayoutParams();
  layoutParams.setWrapBefore(false);
  Spannable messageString=new SpannableString(message.getText());
  if (messageParameters != null && message.getMessageParameters().size() > 0) {
    for (    String key : message.getMessageParameters().keySet()) {
      HashMap<String,String> individualHashMap=message.getMessageParameters().get(key);
      if (individualHashMap.get("String_Node_Str").equals("String_Node_Str")) {
        int color;
        if (individualHashMap.get("String_Node_Str").equals(currentUser.getUserId())) {
          color=NextcloudTalkApplication.getSharedApplication().getResources().getColor(R.color.nc_incoming_text_mention_you);
        }
 else {
          color=NextcloudTalkApplication.getSharedApplication().getResources().getColor(R.color.nc_incoming_text_mention_others);
        }
        messageString=DisplayUtils.searchAndColor(messageText.getText().toString(),messageString,"String_Node_Str" + individualHashMap.get("String_Node_Str"),color);
      }
    }
  }
 else   if (EmoticonUtils.isMessageWithSingleEmoticonOnly(context,message.getText())) {
    messageString.setSpan(new RelativeSizeSpan(2.5f),0,messageString.length(),Spannable.SPAN_INCLUSIVE_EXCLUSIVE);
    layoutParams.setWrapBefore(true);
    itemView.setSelected(true);
  }
  messageTimeView.setLayoutParams(layoutParams);
  messageText.setText(messageString);
}