Program: 14780
Project: 14780
Buggy source:
@Override public void onPostAction(int action,final Post post){
  if (post == null) {
    Toast.makeText(PostsActivity.this,R.string.post_not_found,Toast.LENGTH_SHORT).show();
    return;
  }
  if (action == POST_DELETE) {
    WPMobileStatsUtil.flagProperty(statEventForViewClosing(),WPMobileStatsUtil.StatsPropertyPostDetailClickedDelete);
    if (post.isLocalDraft()) {
      AlertDialog.Builder dialogBuilder=new AlertDialog.Builder(PostsActivity.this);
      dialogBuilder.setTitle(getResources().getText(R.string.delete_draft));
      dialogBuilder.setMessage(getResources().getText(R.string.delete_sure) + "String_Node_Str" + post.getTitle()+ "String_Node_Str");
      dialogBuilder.setPositiveButton(getResources().getText(R.string.yes),new DialogInterface.OnClickListener(){
        public void onClick(        DialogInterface dialog,        int whichButton){
          WordPress.wpDB.deletePost(post);
          popPostDetail();
          attemptToSelectPost();
          mPostList.getPostListAdapter().loadPosts();
        }
      }
);
      dialogBuilder.setNegativeButton(getResources().getText(R.string.no),new DialogInterface.OnClickListener(){
        public void onClick(        DialogInterface dialog,        int whichButton){
        }
      }
);
      dialogBuilder.setCancelable(true);
      if (!isFinishing()) {
        dialogBuilder.create().show();
      }
    }
 else {
      AlertDialog.Builder dialogBuilder=new AlertDialog.Builder(PostsActivity.this);
      dialogBuilder.setTitle(getResources().getText((post.isPage()) ? R.string.delete_page : R.string.delete_post));
      dialogBuilder.setMessage(getResources().getText((post.isPage()) ? R.string.delete_sure_page : R.string.delete_sure_post) + "String_Node_Str" + post.getTitle()+ "String_Node_Str");
      dialogBuilder.setPositiveButton(getResources().getText(R.string.yes),new DialogInterface.OnClickListener(){
        public void onClick(        DialogInterface dialog,        int whichButton){
          new deletePostTask().execute(post);
        }
      }
);
      dialogBuilder.setNegativeButton(getResources().getText(R.string.no),new DialogInterface.OnClickListener(){
        public void onClick(        DialogInterface dialog,        int whichButton){
        }
      }
);
      dialogBuilder.setCancelable(true);
      if (!isFinishing()) {
        dialogBuilder.create().show();
      }
    }
  }
 else   if (action == POST_SHARE) {
    new shareURLTask().execute(post);
    WPMobileStatsUtil.flagProperty(statEventForViewClosing(),WPMobileStatsUtil.StatsPropertyPostDetailClickedShare);
  }
 else   if (action == POST_CLEAR) {
    FragmentManager fm=getSupportFragmentManager();
    ViewPostFragment f=(ViewPostFragment)fm.findFragmentById(R.id.postDetail);
    if (f != null) {
      f.clearContent();
    }
  }
 else   if (action == POST_EDIT) {
    WPMobileStatsUtil.flagProperty(statEventForViewClosing(),WPMobileStatsUtil.StatsPropertyPostDetailClickedEdit);
  }
 else   if (action == POST_VIEW) {
    WPMobileStatsUtil.flagProperty(statEventForViewClosing(),WPMobileStatsUtil.StatsPropertyPostDetailClickedPreview);
  }
}

Fixed version (ground truth):
@Override public void onPostAction(int action,final Post post){
  if (post == null) {
    Toast.makeText(PostsActivity.this,R.string.post_not_found,Toast.LENGTH_SHORT).show();
    return;
  }
  if (action == POST_DELETE) {
    WPMobileStatsUtil.flagProperty(statEventForViewClosing(),WPMobileStatsUtil.StatsPropertyPostDetailClickedDelete);
    if (post.isLocalDraft()) {
      AlertDialog.Builder dialogBuilder=new AlertDialog.Builder(PostsActivity.this);
      dialogBuilder.setTitle(getResources().getText(R.string.delete_draft));
      dialogBuilder.setMessage(getResources().getText(R.string.delete_sure) + "String_Node_Str" + post.getTitle()+ "String_Node_Str");
      dialogBuilder.setPositiveButton(getResources().getText(R.string.yes),new DialogInterface.OnClickListener(){
        public void onClick(        DialogInterface dialog,        int whichButton){
          WordPress.wpDB.deletePost(post);
          popPostDetail();
          attemptToSelectPost();
          mPostList.getPostListAdapter().loadPosts();
        }
      }
);
      dialogBuilder.setNegativeButton(getResources().getText(R.string.no),new DialogInterface.OnClickListener(){
        public void onClick(        DialogInterface dialog,        int whichButton){
        }
      }
);
      dialogBuilder.setCancelable(true);
      if (!isFinishing()) {
        dialogBuilder.create().show();
      }
    }
 else {
      AlertDialog.Builder dialogBuilder=new AlertDialog.Builder(PostsActivity.this);
      dialogBuilder.setTitle(getResources().getText((post.isPage()) ? R.string.delete_page : R.string.delete_post));
      dialogBuilder.setMessage(getResources().getText((post.isPage()) ? R.string.delete_sure_page : R.string.delete_sure_post) + "String_Node_Str" + post.getTitle()+ "String_Node_Str");
      dialogBuilder.setPositiveButton(getResources().getText(R.string.yes),new DialogInterface.OnClickListener(){
        public void onClick(        DialogInterface dialog,        int whichButton){
          new deletePostTask().execute(post);
        }
      }
);
      dialogBuilder.setNegativeButton(getResources().getText(R.string.no),new DialogInterface.OnClickListener(){
        public void onClick(        DialogInterface dialog,        int whichButton){
        }
      }
);
      dialogBuilder.setCancelable(true);
      if (!isFinishing()) {
        dialogBuilder.create().show();
      }
    }
  }
 else   if (action == POST_SHARE) {
    if (post.getStatusEnum() != PostStatus.PUBLISHED) {
      AlertUtil.showAlert(this,R.string.error,post.isPage() ? R.string.page_not_published : R.string.post_not_published);
      return;
    }
    Intent share=new Intent(Intent.ACTION_SEND);
    share.setType("String_Node_Str");
    share.putExtra(Intent.EXTRA_SUBJECT,post.getTitle());
    share.putExtra(Intent.EXTRA_TEXT,post.getPermaLink());
    startActivity(Intent.createChooser(share,getResources().getText(R.string.share_url)));
    AppLockManager.getInstance().setExtendedTimeout();
    WPMobileStatsUtil.flagProperty(statEventForViewClosing(),WPMobileStatsUtil.StatsPropertyPostDetailClickedShare);
  }
 else   if (action == POST_CLEAR) {
    FragmentManager fm=getSupportFragmentManager();
    ViewPostFragment f=(ViewPostFragment)fm.findFragmentById(R.id.postDetail);
    if (f != null) {
      f.clearContent();
    }
  }
 else   if (action == POST_EDIT) {
    WPMobileStatsUtil.flagProperty(statEventForViewClosing(),WPMobileStatsUtil.StatsPropertyPostDetailClickedEdit);
  }
 else   if (action == POST_VIEW) {
    WPMobileStatsUtil.flagProperty(statEventForViewClosing(),WPMobileStatsUtil.StatsPropertyPostDetailClickedPreview);
  }
}