Program: 13839
Project: 13839
Buggy source:
private void updateStatusText(TextView txtStatus,PostModel post){
  if ((PostStatus.fromPost(post) == PostStatus.PUBLISHED) && !post.isLocalDraft() && !post.isLocallyChanged()) {
    txtStatus.setVisibility(View.GONE);
  }
 else {
    int statusTextResId=0;
    int statusIconResId=0;
    int statusColorResId=R.color.grey_darken_10;
    if (PostUploadService.isPostUploading(post)) {
      statusTextResId=R.string.post_uploading;
      statusColorResId=R.color.alert_yellow;
    }
 else     if (post.isLocalDraft()) {
      statusTextResId=R.string.local_draft;
      statusIconResId=R.drawable.noticon_scheduled_alert_yellow_16dp;
      statusColorResId=R.color.alert_yellow;
    }
 else     if (post.isLocallyChanged()) {
      statusTextResId=R.string.local_changes;
      statusIconResId=R.drawable.noticon_scheduled_alert_yellow_16dp;
      statusColorResId=R.color.alert_yellow;
    }
 else {
switch (PostStatus.fromPost(post)) {
case DRAFT:
        statusTextResId=R.string.draft;
      statusIconResId=R.drawable.noticon_scheduled_alert_yellow_16dp;
    statusColorResId=R.color.alert_yellow;
  break;
case PRIVATE:
statusTextResId=R.string.post_private;
break;
case PENDING:
statusTextResId=R.string.pending_review;
statusIconResId=R.drawable.noticon_scheduled_alert_yellow_16dp;
statusColorResId=R.color.alert_yellow;
break;
case SCHEDULED:
statusTextResId=R.string.scheduled;
statusIconResId=R.drawable.noticon_scheduled_alert_yellow_16dp;
statusColorResId=R.color.alert_yellow;
break;
case TRASHED:
statusTextResId=R.string.trashed;
statusIconResId=R.drawable.ic_pages_alert_red_16dp;
statusColorResId=R.color.alert_red;
break;
}
}
Resources resources=txtStatus.getContext().getResources();
txtStatus.setTextColor(resources.getColor(statusColorResId));
txtStatus.setText(statusTextResId != 0 ? resources.getString(statusTextResId) : "String_Node_Str");
Drawable drawable=(statusIconResId != 0 ? resources.getDrawable(statusIconResId) : null);
txtStatus.setCompoundDrawablesWithIntrinsicBounds(drawable,null,null,null);
txtStatus.setVisibility(View.VISIBLE);
}
}

Fixed version (ground truth):
private void updateStatusText(TextView txtStatus,PostModel post){
  if ((PostStatus.fromPost(post) == PostStatus.PUBLISHED) && !post.isLocalDraft() && !post.isLocallyChanged()) {
    txtStatus.setVisibility(View.GONE);
  }
 else {
    int statusTextResId=0;
    int statusIconResId=0;
    int statusColorResId=R.color.grey_darken_10;
    if (PostUploadService.isPostUploadingOrQueued(post)) {
      statusTextResId=R.string.post_uploading;
      statusColorResId=R.color.alert_yellow;
    }
 else     if (post.isLocalDraft()) {
      statusTextResId=R.string.local_draft;
      statusIconResId=R.drawable.noticon_scheduled_alert_yellow_16dp;
      statusColorResId=R.color.alert_yellow;
    }
 else     if (post.isLocallyChanged()) {
      statusTextResId=R.string.local_changes;
      statusIconResId=R.drawable.noticon_scheduled_alert_yellow_16dp;
      statusColorResId=R.color.alert_yellow;
    }
 else {
switch (PostStatus.fromPost(post)) {
case DRAFT:
        statusTextResId=R.string.draft;
      statusIconResId=R.drawable.noticon_scheduled_alert_yellow_16dp;
    statusColorResId=R.color.alert_yellow;
  break;
case PRIVATE:
statusTextResId=R.string.post_private;
break;
case PENDING:
statusTextResId=R.string.pending_review;
statusIconResId=R.drawable.noticon_scheduled_alert_yellow_16dp;
statusColorResId=R.color.alert_yellow;
break;
case SCHEDULED:
statusTextResId=R.string.scheduled;
statusIconResId=R.drawable.noticon_scheduled_alert_yellow_16dp;
statusColorResId=R.color.alert_yellow;
break;
case TRASHED:
statusTextResId=R.string.trashed;
statusIconResId=R.drawable.ic_pages_alert_red_16dp;
statusColorResId=R.color.alert_red;
break;
}
}
Resources resources=txtStatus.getContext().getResources();
txtStatus.setTextColor(resources.getColor(statusColorResId));
txtStatus.setText(statusTextResId != 0 ? resources.getString(statusTextResId) : "String_Node_Str");
Drawable drawable=(statusIconResId != 0 ? resources.getDrawable(statusIconResId) : null);
txtStatus.setCompoundDrawablesWithIntrinsicBounds(drawable,null,null,null);
txtStatus.setVisibility(View.VISIBLE);
}
}