Program: 14358
Project: 14358
Buggy source:
/** 
 * Updates post object with content of this fragment
 */
public void updatePostSettings(){
  if (!isAdded() || mPost == null) {
    return;
  }
  String password=(mPasswordEditText.getText() != null) ? mPasswordEditText.getText().toString() : "String_Node_Str";
  String pubDate=(mPubDateText.getText() != null) ? mPubDateText.getText().toString() : "String_Node_Str";
  String excerpt=(mExcerptEditText.getText() != null) ? mExcerptEditText.getText().toString() : "String_Node_Str";
  long pubDateTimestamp=0;
  if (mIsCustomPubDate && pubDate.equals(getResources().getText(R.string.immediately)) && !mPost.isLocalDraft()) {
    Date d=new Date();
    pubDateTimestamp=d.getTime();
  }
 else   if (!pubDate.equals(getResources().getText(R.string.immediately))) {
    if (mIsCustomPubDate)     pubDateTimestamp=mCustomPubDate;
 else     if (mPost.getDate_created_gmt() > 0)     pubDateTimestamp=mPost.getDate_created_gmt();
  }
 else   if (pubDate.equals(getResources().getText(R.string.immediately)) && mPost.isLocalDraft()) {
    mPost.setDate_created_gmt(0);
    mPost.setDateCreated(0);
  }
  String tags="String_Node_Str", postFormat="String_Node_Str";
  if (!mPost.isPage()) {
    tags=(mTagsEditText.getText() != null) ? mTagsEditText.getText().toString() : "String_Node_Str";
    if (mPostFormats != null && mPostFormatSpinner != null && mPostFormatSpinner.getSelectedItemPosition() < mPostFormats.length) {
      postFormat=mPostFormats[mPostFormatSpinner.getSelectedItemPosition()];
    }
  }
  String status=getPostStatusForSpinnerPosition(mStatusSpinner.getSelectedItemPosition());
  if (mPost.isUploaded() && mPost.getPostStatus().equals(PostStatus.toString(PostStatus.DRAFT)) && status.equals(PostStatus.toString(PostStatus.PUBLISHED))) {
    mPost.setChangedFromLocalDraftToPublished(true);
  }
  if (mPost.supportsLocation()) {
    mPost.setLocation(mPostLocation);
  }
  mPost.setPostExcerpt(excerpt);
  mPost.setDate_created_gmt(pubDateTimestamp);
  mPost.setJSONCategories(new JSONArray(mCategories));
  mPost.setKeywords(tags);
  mPost.setPostStatus(status);
  mPost.setPassword(password);
  mPost.setPostFormat(postFormat);
}

Fixed version (ground truth):
/** 
 * Updates post object with content of this fragment
 */
public void updatePostSettings(){
  if (!isAdded() || mPost == null) {
    return;
  }
  String password=EditTextUtils.getText(mPasswordEditText);
  String pubDate=EditTextUtils.getText(mPubDateText);
  String excerpt=EditTextUtils.getText(mExcerptEditText);
  long pubDateTimestamp=0;
  if (mIsCustomPubDate && pubDate.equals(getText(R.string.immediately)) && !mPost.isLocalDraft()) {
    Date d=new Date();
    pubDateTimestamp=d.getTime();
  }
 else   if (!pubDate.equals(getText(R.string.immediately))) {
    if (mIsCustomPubDate)     pubDateTimestamp=mCustomPubDate;
 else     if (mPost.getDate_created_gmt() > 0)     pubDateTimestamp=mPost.getDate_created_gmt();
  }
 else   if (pubDate.equals(getText(R.string.immediately)) && mPost.isLocalDraft()) {
    mPost.setDate_created_gmt(0);
    mPost.setDateCreated(0);
  }
  String tags="String_Node_Str", postFormat="String_Node_Str";
  if (!mPost.isPage()) {
    tags=EditTextUtils.getText(mTagsEditText);
    if (mPostFormats != null && mPostFormatSpinner != null && mPostFormatSpinner.getSelectedItemPosition() < mPostFormats.length) {
      postFormat=mPostFormats[mPostFormatSpinner.getSelectedItemPosition()];
    }
  }
  String status;
  if (mStatusSpinner != null) {
    status=getPostStatusForSpinnerPosition(mStatusSpinner.getSelectedItemPosition());
  }
 else {
    status=mPost.getPostStatus();
  }
  if (mPost.isUploaded() && mPost.getPostStatus().equals(PostStatus.toString(PostStatus.DRAFT)) && status.equals(PostStatus.toString(PostStatus.PUBLISHED))) {
    mPost.setChangedFromLocalDraftToPublished(true);
  }
  if (mPost.supportsLocation()) {
    mPost.setLocation(mPostLocation);
  }
  mPost.setPostExcerpt(excerpt);
  mPost.setDate_created_gmt(pubDateTimestamp);
  mPost.setJSONCategories(new JSONArray(mCategories));
  mPost.setKeywords(tags);
  mPost.setPostStatus(status);
  mPost.setPassword(password);
  mPost.setPostFormat(postFormat);
}