Program: 32048
Project: 32048
Buggy source:
/** 
 * Emote message management
 * @param position the message position
 * @param convertView the message view
 * @param parent the parent view
 * @return the updated text view.
 */
protected View getEmoteView(final int position,View convertView,ViewGroup parent){
  if (convertView == null) {
    convertView=mLayoutInflater.inflate(mRowTypeToLayoutId.get(ROW_TYPE_EMOTE),parent,false);
  }
  MessageRow row=getItem(position);
  Event event=row.getEvent();
  RoomState roomState=row.getRoomState();
  TextView emoteTextView=(TextView)convertView.findViewById(R.id.messagesAdapter_body);
  if (null == emoteTextView) {
    Log.e(LOG_TAG,"String_Node_Str");
    return convertView;
  }
  Message message=JsonUtils.toMessage(event.getContent());
  String userDisplayName=roomState.getMemberName(event.getSender());
  String body="String_Node_Str" + userDisplayName + "String_Node_Str"+ message.body;
  String htmlString=null;
  if (TextUtils.equals(Message.FORMAT_MATRIX_HTML,message.format)) {
    htmlString=getSanitisedHtml(message.formatted_body);
    if (null != htmlString) {
      htmlString="String_Node_Str" + userDisplayName + "String_Node_Str"+ message.formatted_body;
    }
  }
  highlightPattern(emoteTextView,new SpannableString(body),htmlString,null);
  int textColor;
  if (row.getEvent().isEncrypting()) {
    textColor=mEncryptingMessageTextColor;
  }
 else   if (row.getEvent().isSending()) {
    textColor=mSendingMessageTextColor;
  }
 else   if (row.getEvent().isUndeliverable()) {
    textColor=mNotSentMessageTextColor;
  }
 else {
    textColor=mDefaultMessageTextColor;
  }
  emoteTextView.setTextColor(textColor);
  View textLayout=convertView.findViewById(R.id.messagesAdapter_text_layout);
  this.manageSubView(position,convertView,textLayout,ROW_TYPE_EMOTE);
  addContentViewListeners(convertView,emoteTextView,position);
  return convertView;
}

Fixed version (ground truth):
/** 
 * Emote message management
 * @param position the message position
 * @param convertView the message view
 * @param parent the parent view
 * @return the updated text view.
 */
protected View getEmoteView(final int position,View convertView,ViewGroup parent){
  if (convertView == null) {
    convertView=mLayoutInflater.inflate(mRowTypeToLayoutId.get(ROW_TYPE_EMOTE),parent,false);
  }
  MessageRow row=getItem(position);
  Event event=row.getEvent();
  RoomState roomState=row.getRoomState();
  TextView emoteTextView=(TextView)convertView.findViewById(R.id.messagesAdapter_body);
  if (null == emoteTextView) {
    Log.e(LOG_TAG,"String_Node_Str");
    return convertView;
  }
  Message message=JsonUtils.toMessage(event.getContent());
  String userDisplayName=(null == roomState) ? event.getSender() : roomState.getMemberName(event.getSender());
  String body="String_Node_Str" + userDisplayName + "String_Node_Str"+ message.body;
  String htmlString=null;
  if (TextUtils.equals(Message.FORMAT_MATRIX_HTML,message.format)) {
    htmlString=getSanitisedHtml(message.formatted_body);
    if (null != htmlString) {
      htmlString="String_Node_Str" + userDisplayName + "String_Node_Str"+ message.formatted_body;
    }
  }
  highlightPattern(emoteTextView,new SpannableString(body),htmlString,null);
  int textColor;
  if (row.getEvent().isEncrypting()) {
    textColor=mEncryptingMessageTextColor;
  }
 else   if (row.getEvent().isSending()) {
    textColor=mSendingMessageTextColor;
  }
 else   if (row.getEvent().isUndeliverable()) {
    textColor=mNotSentMessageTextColor;
  }
 else {
    textColor=mDefaultMessageTextColor;
  }
  emoteTextView.setTextColor(textColor);
  View textLayout=convertView.findViewById(R.id.messagesAdapter_text_layout);
  this.manageSubView(position,convertView,textLayout,ROW_TYPE_EMOTE);
  addContentViewListeners(convertView,emoteTextView,position);
  return convertView;
}