Program: 14902
Project: 14902
Buggy source:
private void submitReply(){
  if (!hasActivity() || mIsSubmittingReply)   return;
  if (!NetworkUtils.checkConnection(getActivity()))   return;
  final String replyText=EditTextUtils.getText(mEditReply);
  if (TextUtils.isEmpty(replyText))   return;
  mEditReply.setEnabled(false);
  EditTextUtils.hideSoftInput(mEditReply);
  mImgSubmitReply.setVisibility(View.GONE);
  final ProgressBar progress=(ProgressBar)getActivity().findViewById(R.id.progress_submit_comment);
  progress.setVisibility(View.VISIBLE);
  CommentActions.CommentActionListener actionListener=new CommentActions.CommentActionListener(){
    @Override public void onActionResult(    boolean succeeded){
      mIsSubmittingReply=false;
      if (!hasActivity())       return;
      mEditReply.setEnabled(true);
      mImgSubmitReply.setVisibility(View.VISIBLE);
      progress.setVisibility(View.GONE);
      if (succeeded) {
        if (mOnCommentChangeListener != null)         mOnCommentChangeListener.onCommentChanged(ChangedFrom.COMMENT_DETAIL);
        MessageBarUtils.showMessageBar(getActivity(),getString(R.string.note_reply_successful));
        mEditReply.setText(null);
      }
 else {
        ToastUtils.showToast(getActivity(),R.string.reply_failed,ToastUtils.Duration.LONG);
        mEditReply.requestFocus();
        InputMethodManager imm=(InputMethodManager)getActivity().getSystemService(Context.INPUT_METHOD_SERVICE);
        imm.showSoftInput(mEditReply,InputMethodManager.SHOW_IMPLICIT);
      }
    }
  }
;
  mIsSubmittingReply=true;
  if (mNote != null) {
    CommentActions.submitReplyToCommentNote(mNote,replyText,actionListener);
  }
 else {
    CommentActions.submitReplyToComment(mLocalBlogId,mComment,replyText,actionListener);
  }
}

Fixed version (ground truth):
private void submitReply(){
  if (!hasActivity() || mIsSubmittingReply)   return;
  if (!NetworkUtils.checkConnection(getActivity()))   return;
  final String replyText=EditTextUtils.getText(mEditReply);
  if (TextUtils.isEmpty(replyText))   return;
  mEditReply.setEnabled(false);
  EditTextUtils.hideSoftInput(mEditReply);
  mImgSubmitReply.setVisibility(View.GONE);
  final ProgressBar progress=(ProgressBar)getActivity().findViewById(R.id.progress_submit_comment);
  progress.setVisibility(View.VISIBLE);
  CommentActions.CommentActionListener actionListener=new CommentActions.CommentActionListener(){
    @Override public void onActionResult(    boolean succeeded){
      mIsSubmittingReply=false;
      if (succeeded && mOnCommentChangeListener != null)       mOnCommentChangeListener.onCommentChanged(ChangedFrom.COMMENT_DETAIL);
      if (hasActivity()) {
        mEditReply.setEnabled(true);
        mImgSubmitReply.setVisibility(View.VISIBLE);
        progress.setVisibility(View.GONE);
        if (succeeded) {
          MessageBarUtils.showMessageBar(getActivity(),getString(R.string.note_reply_successful));
          mEditReply.setText(null);
        }
 else {
          ToastUtils.showToast(getActivity(),R.string.reply_failed,ToastUtils.Duration.LONG);
          mEditReply.requestFocus();
          InputMethodManager imm=(InputMethodManager)getActivity().getSystemService(Context.INPUT_METHOD_SERVICE);
          imm.showSoftInput(mEditReply,InputMethodManager.SHOW_IMPLICIT);
        }
      }
    }
  }
;
  mIsSubmittingReply=true;
  if (mNote != null) {
    CommentActions.submitReplyToCommentNote(mNote,replyText,actionListener);
  }
 else {
    CommentActions.submitReplyToComment(mLocalBlogId,mComment,replyText,actionListener);
  }
}