Program: 35578
Project: 35578
Buggy source:
private void sendMessage(String message,int attempt){
  if (attempt < 4) {
    Map<String,String> fieldMap=new HashMap<>();
    fieldMap.put("String_Node_Str",message);
    fieldMap.put("String_Node_Str",conversationUser.getDisplayName());
    ncApi.sendChatMessage(credentials,ApiUtils.getUrlForChat(baseUrl,roomToken),fieldMap).subscribeOn(Schedulers.newThread()).observeOn(AndroidSchedulers.mainThread()).subscribe(new Observer<GenericOverall>(){
      @Override public void onSubscribe(      Disposable d){
      }
      @Override public void onNext(      GenericOverall genericOverall){
        if (conversationUser.getUserId().equals("String_Node_Str") && TextUtils.isEmpty(myFirstMessage)) {
          myFirstMessage=message;
        }
        getActivity().runOnUiThread(() -> {
          if (popupBubble.isShown()) {
            popupBubble.hide();
          }
          messagesList.smoothScrollToPosition(0);
        }
);
      }
      @Override public void onError(      Throwable e){
        if (e instanceof HttpException && ((HttpException)e).code() == 201) {
          if (conversationUser.getUserId().equals("String_Node_Str") && TextUtils.isEmpty(myFirstMessage)) {
            myFirstMessage=message;
          }
          getActivity().runOnUiThread(() -> {
            if (popupBubble.isShown()) {
              popupBubble.hide();
            }
            messagesList.smoothScrollToPosition(0);
          }
);
        }
 else {
          sendMessage(message,attempt + 1);
        }
      }
      @Override public void onComplete(){
      }
    }
);
  }
}

Fixed version (ground truth):
private void sendMessage(String message,int attempt){
  if (attempt < 4) {
    Map<String,String> fieldMap=new HashMap<>();
    fieldMap.put("String_Node_Str",message);
    fieldMap.put("String_Node_Str",conversationUser.getDisplayName());
    ncApi.sendChatMessage(credentials,ApiUtils.getUrlForChat(baseUrl,roomToken),fieldMap).subscribeOn(Schedulers.newThread()).observeOn(AndroidSchedulers.mainThread()).subscribe(new Observer<GenericOverall>(){
      @Override public void onSubscribe(      Disposable d){
      }
      @Override public void onNext(      GenericOverall genericOverall){
        if (conversationUser.getUserId().equals("String_Node_Str") && TextUtils.isEmpty(myFirstMessage)) {
          myFirstMessage=message;
        }
        if (popupBubble != null && popupBubble.isShown()) {
          popupBubble.hide();
        }
        if (messagesList != null) {
          messagesList.smoothScrollToPosition(0);
        }
      }
      @Override public void onError(      Throwable e){
        if (e instanceof HttpException && ((HttpException)e).code() == 201) {
          if (conversationUser.getUserId().equals("String_Node_Str") && TextUtils.isEmpty(myFirstMessage)) {
            myFirstMessage=message;
          }
          getActivity().runOnUiThread(() -> {
            if (popupBubble.isShown()) {
              popupBubble.hide();
            }
            messagesList.smoothScrollToPosition(0);
          }
);
        }
 else {
          sendMessage(message,attempt + 1);
        }
      }
      @Override public void onComplete(){
      }
    }
);
  }
}