Program: 114619
Project: 114619
Buggy source:
@Override public void bindView(View view,Context context,Cursor cursor){
  ViewHolder viewHolder=(ViewHolder)view.getTag();
  String avatarUrl=null;
  String senderName;
  String body=cursor.getString(cursor.getColumnIndex(DialogMessageTable.Cols.BODY));
  String attachUrl=cursor.getString(cursor.getColumnIndex(DialogMessageTable.Cols.ATTACH_FILE_ID));
  int senderId=cursor.getInt(cursor.getColumnIndex(DialogMessageTable.Cols.SENDER_ID));
  long time=cursor.getLong(cursor.getColumnIndex(DialogMessageTable.Cols.TIME));
  viewHolder.attachImageView.setVisibility(View.GONE);
  if (isOwnMessage(senderId)) {
    senderName=currentUser.getFullName();
    avatarUrl=getAvatarUrlForCurrentUser();
  }
 else {
    Friend senderFriend=DatabaseManager.getFriendById(context,senderId);
    if (senderFriend != null) {
      senderName=senderFriend.getFullname();
      avatarUrl=getAvatarUrlForFriend(senderFriend);
    }
 else {
      senderName=senderId + Consts.EMPTY_STRING;
    }
  }
  viewHolder.nameTextView.setText(senderName);
  if (!TextUtils.isEmpty(attachUrl)) {
    viewHolder.messageTextView.setVisibility(View.GONE);
    displayAttachImage(attachUrl,viewHolder.pleaseWaitTextView,viewHolder.attachImageView,viewHolder.progressBar);
  }
 else {
    viewHolder.messageTextView.setVisibility(View.VISIBLE);
    viewHolder.attachImageView.setVisibility(View.GONE);
    viewHolder.messageTextView.setText(body);
  }
  viewHolder.timeTextView.setText(DateUtils.longToMessageDate(time));
  if (dialog != null) {
    boolean isRead=cursor.getInt(cursor.getColumnIndex(DialogMessageTable.Cols.IS_READ)) > 0;
    if (!isRead) {
      String messageId=cursor.getString(cursor.getColumnIndex(DialogMessageTable.Cols.ID));
      QBUpdateStatusMessageCommand.start(context,messageId,true);
    }
  }
  displayAvatarImage(avatarUrl,viewHolder.avatarImageView);
}

Fixed version (ground truth):
@Override public void bindView(View view,Context context,Cursor cursor){
  ViewHolder viewHolder=(ViewHolder)view.getTag();
  String avatarUrl=null;
  String senderName;
  String body=cursor.getString(cursor.getColumnIndex(DialogMessageTable.Cols.BODY));
  String attachUrl=cursor.getString(cursor.getColumnIndex(DialogMessageTable.Cols.ATTACH_FILE_ID));
  int senderId=cursor.getInt(cursor.getColumnIndex(DialogMessageTable.Cols.SENDER_ID));
  long time=cursor.getLong(cursor.getColumnIndex(DialogMessageTable.Cols.TIME));
  viewHolder.attachImageView.setVisibility(View.GONE);
  if (isOwnMessage(senderId)) {
    senderName=currentUser.getFullName();
    avatarUrl=getAvatarUrlForCurrentUser();
  }
 else {
    Friend senderFriend=DatabaseManager.getFriendById(context,senderId);
    if (senderFriend != null) {
      senderName=senderFriend.getFullname();
      avatarUrl=getAvatarUrlForFriend(senderFriend);
    }
 else {
      senderName=senderId + Consts.EMPTY_STRING;
    }
  }
  viewHolder.nameTextView.setText(senderName);
  if (!TextUtils.isEmpty(attachUrl)) {
    viewHolder.messageTextView.setVisibility(View.GONE);
    displayAttachImage(attachUrl,viewHolder.pleaseWaitTextView,viewHolder.attachImageView,viewHolder.progressBar);
  }
 else {
    viewHolder.messageTextView.setVisibility(View.VISIBLE);
    viewHolder.attachImageView.setVisibility(View.GONE);
    viewHolder.messageTextView.setText(body);
  }
  viewHolder.timeTextView.setText(DateUtils.longToMessageDate(time));
  boolean isRead=cursor.getInt(cursor.getColumnIndex(DialogMessageTable.Cols.IS_READ)) > Consts.ZERO_INT_VALUE;
  if (dialog != null && !isRead) {
    String messageId=cursor.getString(cursor.getColumnIndex(DialogMessageTable.Cols.ID));
    QBUpdateStatusMessageCommand.start(context,messageId,true);
  }
  displayAvatarImage(avatarUrl,viewHolder.avatarImageView);
}