Program: 14812
Project: 14812
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 (!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=PostStatus.toString(PostStatus.PUBLISHED);
  break;
case 1:
status=PostStatus.toString(PostStatus.DRAFT);
break;
case 2:
status=PostStatus.toString(PostStatus.PENDING);
break;
case 3:
status=PostStatus.toString(PostStatus.PRIVATE);
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 (!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=PostStatus.toString(PostStatus.PUBLISHED);
  break;
case 1:
status=PostStatus.toString(PostStatus.DRAFT);
break;
case 2:
status=PostStatus.toString(PostStatus.PENDING);
break;
case 3:
status=PostStatus.toString(PostStatus.PRIVATE);
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.setPostExcerpt(excerpt);
post.setDate_created_gmt(pubDateTimestamp);
post.setJSONCategories(new JSONArray(mCategories));
post.setKeywords(tags);
post.setPostStatus(status);
post.setPassword(password);
post.setLatitude(latitude);
post.setLongitude(longitude);
post.setPostFormat(postFormat);
WordPress.wpDB.updatePost(post);
}