Program: 14896
Project: 14896
Buggy source:
public void savePostSettings(){
  Post post=mActivity.getPost();
  if (post == 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))) {
    Calendar c=Calendar.getInstance();
    mYear=c.get(Calendar.YEAR);
    mMonth=c.get(Calendar.MONTH);
    mDay=c.get(Calendar.DAY_OF_MONTH);
    mHour=c.get(Calendar.HOUR_OF_DAY);
    mMinute=c.get(Calendar.MINUTE);
    Date d=new Date(mYear - 1900,mMonth,mDay,mHour,mMinute);
    long timestamp=d.getTime();
    pubDateTimestamp=timestamp;
  }
 else   if (!pubDate.equals(getResources().getText(R.string.immediately))) {
    if (mIsCustomPubDate)     pubDateTimestamp=mCustomPubDate;
 else     if (post.getDate_created_gmt() > 0)     pubDateTimestamp=post.getDate_created_gmt();
  }
  String tags="String_Node_Str", postFormat="String_Node_Str";
  if (!post.isPage()) {
    tags=(mTagsEditText.getText() != null) ? mTagsEditText.getText().toString() : "String_Node_Str";
    Spinner postFormatSpinner=(Spinner)getActivity().findViewById(R.id.postFormat);
    postFormat=mPostFormats[postFormatSpinner.getSelectedItemPosition()];
  }
  int selectedStatus=mStatusSpinner.getSelectedItemPosition();
  String status="String_Node_Str";
switch (selectedStatus) {
case 0:
    status="String_Node_Str";
  break;
case 1:
status="String_Node_Str";
break;
case 2:
status="String_Node_Str";
break;
case 3:
status="String_Node_Str";
break;
}
Double latitude=0.0;
Double longitude=0.0;
if (WordPress.getCurrentBlog().isLocation()) {
try {
latitude=mCurrentLocation.getLatitude();
longitude=mCurrentLocation.getLongitude();
}
 catch (Exception e) {
e.printStackTrace();
}
}
if (mCurrentLocation == null) {
latitude=post.getLatitude();
longitude=post.getLongitude();
}
post.setMt_excerpt(excerpt);
post.setDate_created_gmt(pubDateTimestamp);
post.setJSONCategories(new JSONArray(mCategories));
post.setMt_keywords(tags);
post.setPost_status(status);
post.setWP_password(password);
post.setLatitude(latitude);
post.setLongitude(longitude);
post.setWP_post_form(postFormat);
post.update();
}

Fixed version (ground truth):
public void savePostSettings(){
  Post post=mActivity.getPost();
  if (post == 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)) && !post.isLocalDraft()) {
    Calendar c=Calendar.getInstance();
    mYear=c.get(Calendar.YEAR);
    mMonth=c.get(Calendar.MONTH);
    mDay=c.get(Calendar.DAY_OF_MONTH);
    mHour=c.get(Calendar.HOUR_OF_DAY);
    mMinute=c.get(Calendar.MINUTE);
    Date d=new Date(mYear - 1900,mMonth,mDay,mHour,mMinute);
    long timestamp=d.getTime();
    pubDateTimestamp=timestamp;
  }
 else   if (!pubDate.equals(getResources().getText(R.string.immediately))) {
    if (mIsCustomPubDate)     pubDateTimestamp=mCustomPubDate;
 else     if (post.getDate_created_gmt() > 0)     pubDateTimestamp=post.getDate_created_gmt();
  }
  String tags="String_Node_Str", postFormat="String_Node_Str";
  if (!post.isPage()) {
    tags=(mTagsEditText.getText() != null) ? mTagsEditText.getText().toString() : "String_Node_Str";
    Spinner postFormatSpinner=(Spinner)getActivity().findViewById(R.id.postFormat);
    postFormat=mPostFormats[postFormatSpinner.getSelectedItemPosition()];
  }
  int selectedStatus=mStatusSpinner.getSelectedItemPosition();
  String status="String_Node_Str";
switch (selectedStatus) {
case 0:
    status="String_Node_Str";
  break;
case 1:
status="String_Node_Str";
break;
case 2:
status="String_Node_Str";
break;
case 3:
status="String_Node_Str";
break;
}
Double latitude=0.0;
Double longitude=0.0;
if (WordPress.getCurrentBlog().isLocation()) {
try {
latitude=mCurrentLocation.getLatitude();
longitude=mCurrentLocation.getLongitude();
}
 catch (Exception e) {
e.printStackTrace();
}
}
if (mCurrentLocation == null) {
latitude=post.getLatitude();
longitude=post.getLongitude();
}
post.setMt_excerpt(excerpt);
post.setDate_created_gmt(pubDateTimestamp);
post.setJSONCategories(new JSONArray(mCategories));
post.setMt_keywords(tags);
post.setPost_status(status);
post.setWP_password(password);
post.setLatitude(latitude);
post.setLongitude(longitude);
post.setWP_post_form(postFormat);
post.update();
}