Program: 14914
Project: 14914
Buggy source:
protected void deleteComments(){
  for (  int i : selectedCommentPositions) {
    client=new XMLRPCClient(WordPress.currentBlog.getUrl(),WordPress.currentBlog.getHttpuser(),WordPress.currentBlog.getHttppassword());
    Comment listRow=(Comment)getListView().getItemAtPosition(i);
    int curCommentID=listRow.commentID;
    Object[] params={WordPress.currentBlog.getRemoteBlogId(),WordPress.currentBlog.getUsername(),WordPress.currentBlog.getPassword(),curCommentID};
    try {
      client.call("String_Node_Str",params);
    }
 catch (    final XMLRPCException e) {
      moderateErrorMsg=getResources().getText(R.string.error_moderate_comment).toString();
    }
  }
  dismissDialog(ID_DIALOG_DELETING);
  Thread action=new Thread(){
    public void run(){
      if (TextUtils.isEmpty(moderateErrorMsg)) {
        final String msg;
        if (checkedCommentTotal > 1) {
          msg=getResources().getText(R.string.comments_moderated).toString();
        }
 else {
          msg=getResources().getText(R.string.comment_moderated).toString();
        }
        Toast.makeText(getActivity().getApplicationContext(),msg,Toast.LENGTH_SHORT).show();
        checkedCommentTotal=0;
        hideModerationBar();
        selectedCommentPositions.clear();
        mOnCommentChangeListener.onCommentDeleted();
      }
 else {
        if (!getActivity().isFinishing()) {
          FragmentTransaction ft=getFragmentManager().beginTransaction();
          WPAlertDialogFragment alert=WPAlertDialogFragment.newInstance(moderateErrorMsg);
          try {
            alert.show(ft,"String_Node_Str");
          }
 catch (          Exception e) {
            e.printStackTrace();
          }
        }
      }
    }
  }
;
  getActivity().runOnUiThread(action);
  progressDialog=new ProgressDialog(getActivity().getApplicationContext());
}

Fixed version (ground truth):
protected void deleteComments(){
  for (  int i : selectedCommentPositions) {
    client=new XMLRPCClient(WordPress.currentBlog.getUrl(),WordPress.currentBlog.getHttpuser(),WordPress.currentBlog.getHttppassword());
    Comment listRow=(Comment)getListView().getItemAtPosition(i);
    int curCommentID=listRow.commentID;
    Object[] params={WordPress.currentBlog.getRemoteBlogId(),WordPress.currentBlog.getUsername(),WordPress.currentBlog.getPassword(),curCommentID};
    try {
      client.call("String_Node_Str",params);
    }
 catch (    final XMLRPCException e) {
      moderateErrorMsg=getResources().getText(R.string.error_moderate_comment).toString();
    }
  }
  dismissDialog(ID_DIALOG_DELETING);
  Thread action=new Thread(){
    public void run(){
      if (TextUtils.isEmpty(moderateErrorMsg)) {
        final String msg;
        if (checkedCommentTotal > 1) {
          msg=getResources().getText(R.string.comments_moderated).toString();
        }
 else {
          msg=getResources().getText(R.string.comment_moderated).toString();
        }
        Toast.makeText(getActivity().getApplicationContext(),msg,Toast.LENGTH_SHORT).show();
        checkedCommentTotal=0;
        hideModerationBar();
        selectedCommentPositions.clear();
        mOnCommentChangeListener.onCommentDeleted();
      }
 else {
        if (!getActivity().isFinishing()) {
          FragmentTransaction ft=getFragmentManager().beginTransaction();
          WPAlertDialogFragment alert=WPAlertDialogFragment.newInstance(moderateErrorMsg);
          ft.add(alert,"String_Node_Str");
          ft.commitAllowingStateLoss();
        }
      }
    }
  }
;
  getActivity().runOnUiThread(action);
  progressDialog=new ProgressDialog(getActivity().getApplicationContext());
}