Program: 14015
Project: 14015
Buggy source:
private void submitReply(){
  if (!hasComment() || !isAdded() || mIsSubmittingReply)   return;
  if (!NetworkUtils.checkConnection(getActivity()))   return;
  final String replyText=EditTextUtils.getText(mEditReply);
  if (TextUtils.isEmpty(replyText))   return;
  mEditReply.setEnabled(false);
  EditTextUtils.hideSoftInput(mEditReply);
  mSubmitReplyBtn.setVisibility(View.GONE);
  final ProgressBar progress=(ProgressBar)getView().findViewById(R.id.progress_submit_comment);
  progress.setVisibility(View.VISIBLE);
  CommentActions.CommentActionListener actionListener=new CommentActions.CommentActionListener(){
    @Override public void onActionResult(    CommentActionResult result){
      mIsSubmittingReply=false;
      if (result.isSuccess() && mOnCommentChangeListener != null)       mOnCommentChangeListener.onCommentChanged(ChangeType.REPLIED);
      if (isAdded()) {
        mEditReply.setEnabled(true);
        mSubmitReplyBtn.setVisibility(View.VISIBLE);
        progress.setVisibility(View.GONE);
        updateStatusViews();
        if (result.isSuccess()) {
          ToastUtils.showToast(getActivity(),getString(R.string.note_reply_successful));
          mEditReply.setText(null);
          mEditReply.getAutoSaveTextHelper().clearSavedText(mEditReply);
          if (mComment != null && mComment.getStatusEnum() != CommentStatus.APPROVED) {
            moderateComment(CommentStatus.APPROVED);
          }
        }
 else {
          String errorMessage=TextUtils.isEmpty(result.getMessage()) ? getString(R.string.reply_failed) : result.getMessage();
          ToastUtils.showToast(getActivity(),errorMessage,ToastUtils.Duration.LONG);
          EditTextUtils.showSoftInput(mEditReply);
        }
      }
    }
  }
;
  mIsSubmittingReply=true;
  AnalyticsTracker.track(AnalyticsTracker.Stat.NOTIFICATION_REPLIED_TO);
  if (mNote != null) {
    if (mShouldRequestCommentFromNote) {
      CommentActions.submitReplyToCommentRestApi(mNote.getSiteId(),mComment.commentID,replyText,actionListener);
    }
 else {
      CommentActions.submitReplyToCommentNote(mNote,replyText,actionListener);
    }
  }
 else {
    CommentActions.submitReplyToComment(mLocalBlogId,mComment,replyText,actionListener);
  }
}

Fixed version (ground truth):
private void submitReply(){
  if (!hasComment() || !isAdded() || mIsSubmittingReply)   return;
  if (!NetworkUtils.checkConnection(getActivity()))   return;
  final String replyText=EditTextUtils.getText(mEditReply);
  if (TextUtils.isEmpty(replyText))   return;
  mEditReply.setEnabled(false);
  EditTextUtils.hideSoftInput(mEditReply);
  mSubmitReplyBtn.setVisibility(View.GONE);
  final ProgressBar progress=(ProgressBar)getView().findViewById(R.id.progress_submit_comment);
  progress.setVisibility(View.VISIBLE);
  CommentActions.CommentActionListener actionListener=new CommentActions.CommentActionListener(){
    @Override public void onActionResult(    CommentActionResult result){
      mIsSubmittingReply=false;
      if (result.isSuccess() && mOnCommentChangeListener != null)       mOnCommentChangeListener.onCommentChanged(ChangeType.REPLIED);
      if (isAdded()) {
        mEditReply.setEnabled(true);
        mSubmitReplyBtn.setVisibility(View.VISIBLE);
        progress.setVisibility(View.GONE);
        updateStatusViews();
        if (result.isSuccess()) {
          ToastUtils.showToast(getActivity(),getString(R.string.note_reply_successful));
          mEditReply.setText(null);
          mEditReply.getAutoSaveTextHelper().clearSavedText(mEditReply);
          if (mComment != null && mComment.getStatusEnum() != CommentStatus.APPROVED) {
            moderateComment(CommentStatus.APPROVED);
          }
        }
 else {
          String errorMessage=TextUtils.isEmpty(result.getMessage()) ? getString(R.string.reply_failed) : result.getMessage();
          String strUnEscapeHTML=StringEscapeUtils.unescapeHtml(errorMessage);
          ToastUtils.showToast(getActivity(),strUnEscapeHTML,ToastUtils.Duration.LONG);
          EditTextUtils.showSoftInput(mEditReply);
        }
      }
    }
  }
;
  mIsSubmittingReply=true;
  AnalyticsTracker.track(AnalyticsTracker.Stat.NOTIFICATION_REPLIED_TO);
  if (mNote != null) {
    if (mShouldRequestCommentFromNote) {
      CommentActions.submitReplyToCommentRestApi(mNote.getSiteId(),mComment.commentID,replyText,actionListener);
    }
 else {
      CommentActions.submitReplyToCommentNote(mNote,replyText,actionListener);
    }
  }
 else {
    CommentActions.submitReplyToComment(mLocalBlogId,mComment,replyText,actionListener);
  }
}