Program: 88534
Project: 88534
Buggy source:
private static void request(List<ObjectNode> elementsToUpdate,List<String> elementsToDelete,Project project) throws JsonProcessingException {
  if (elementsToUpdate != null && !elementsToUpdate.isEmpty()) {
    Application.getInstance().getGUILog().log("String_Node_Str" + elementsToUpdate.size() + "String_Node_Str"+ (elementsToUpdate.size() != 1 ? "String_Node_Str" : "String_Node_Str")+ "String_Node_Str");
    try {
      File file=MMSUtils.createEntityFile(CommitClientElementAction.class,ContentType.APPLICATION_JSON,elementsToUpdate,MMSUtils.JsonBlobType.ELEMENT_JSON);
      URIBuilder requestUri=MMSUtils.getServiceProjectsRefsElementsUri(project);
      OutputQueue.getInstance().offer((new Request(project,MMSUtils.HttpRequestType.POST,requestUri,file,ContentType.APPLICATION_JSON,true,elementsToUpdate.size(),"String_Node_Str")));
    }
 catch (    IOException|URISyntaxException e) {
      Application.getInstance().getGUILog().log("String_Node_Str" + e.getMessage());
      e.printStackTrace();
      return;
    }
  }
  if (elementsToDelete != null && !elementsToDelete.isEmpty()) {
    Application.getInstance().getGUILog().log("String_Node_Str" + elementsToDelete.size() + "String_Node_Str"+ (elementsToDelete.size() != 1 ? "String_Node_Str" : "String_Node_Str")+ "String_Node_Str");
    try {
      File file=MMSUtils.createEntityFile(CommitClientElementAction.class,ContentType.APPLICATION_JSON,elementsToUpdate,MMSUtils.JsonBlobType.ELEMENT_JSON);
      URIBuilder requestUri=MMSUtils.getServiceProjectsRefsElementsUri(project);
      OutputQueue.getInstance().offer((new Request(project,MMSUtils.HttpRequestType.DELETE,requestUri,file,ContentType.APPLICATION_JSON,true,elementsToDelete.size(),"String_Node_Str")));
    }
 catch (    IOException|URISyntaxException e) {
      Application.getInstance().getGUILog().log("String_Node_Str" + e.getMessage());
      e.printStackTrace();
      return;
    }
  }
}

Fixed version (ground truth):
private static void request(List<ObjectNode> elementsToUpdate,List<String> elementsToDelete,Project project) throws JsonProcessingException {
  if (elementsToUpdate != null && !elementsToUpdate.isEmpty()) {
    Application.getInstance().getGUILog().log("String_Node_Str" + elementsToUpdate.size() + "String_Node_Str"+ (elementsToUpdate.size() != 1 ? "String_Node_Str" : "String_Node_Str")+ "String_Node_Str");
    int requestCapacity=elementsToUpdate.size() > COMMIT_ELEMENT_COUNT_THRESHOLD ? (elementsToUpdate.size() / COMMIT_ELEMENT_COUNT_THRESHOLD + (elementsToUpdate.size() % COMMIT_ELEMENT_COUNT_THRESHOLD != 0 ? 1 : 0)) * 2 : 1;
    List<Request> requests=new ArrayList<>(requestCapacity);
    List<ObjectNode> elementsToPost=new ArrayList<>(Math.min(elementsToUpdate.size(),COMMIT_ELEMENT_COUNT_THRESHOLD));
    for (int i=0; i < elementsToUpdate.size(); i++) {
      elementsToPost.add(elementsToUpdate.get(i));
      if (elementsToPost.size() == COMMIT_ELEMENT_COUNT_THRESHOLD || i + 1 == elementsToUpdate.size()) {
        try {
          File file=MMSUtils.createEntityFile(CommitClientElementAction.class,ContentType.APPLICATION_JSON,elementsToPost,MMSUtils.JsonBlobType.ELEMENT_JSON);
          if (elementsToUpdate.size() > COMMIT_ELEMENT_COUNT_THRESHOLD) {
            int requestIndex=(i + 1) / COMMIT_ELEMENT_COUNT_THRESHOLD + ((i + 1) % COMMIT_ELEMENT_COUNT_THRESHOLD != 0 ? 1 : 0) - 1;
            URIBuilder requestUri=MMSUtils.getServiceProjectsRefsElementsUri(project);
            if (requestUri == null) {
              throw new IOException();
            }
            requestUri.addParameter("String_Node_Str",Boolean.toString(true));
            requests.add(requestIndex,new Request(project,MMSUtils.HttpRequestType.POST,requestUri,file,ContentType.APPLICATION_JSON,true,elementsToPost.size(),"String_Node_Str" + NumberFormat.getInstance().format(requestIndex + 1) + "String_Node_Str"+ (requestCapacity / 2)));
            requestUri=MMSUtils.getServiceProjectsRefsElementsUri(project);
            if (requestUri == null) {
              throw new IOException();
            }
            requestUri.addParameter("String_Node_Str",Boolean.toString(true));
            requests.add(new Request(project,MMSUtils.HttpRequestType.POST,requestUri,file,ContentType.APPLICATION_JSON,true,elementsToPost.size(),"String_Node_Str" + NumberFormat.getInstance().format(requestIndex + 1) + "String_Node_Str"+ (requestCapacity / 2)));
          }
 else {
            URIBuilder requestUri=MMSUtils.getServiceProjectsRefsElementsUri(project);
            requests.add(new Request(project,MMSUtils.HttpRequestType.POST,requestUri,file,ContentType.APPLICATION_JSON,true,elementsToPost.size(),"String_Node_Str"));
          }
        }
 catch (        IOException|URISyntaxException e) {
          Application.getInstance().getGUILog().log("String_Node_Str" + e.getMessage());
          e.printStackTrace();
          return;
        }
        if (i + 1 != elementsToUpdate.size()) {
          elementsToPost=new ArrayList<>(Math.min(elementsToUpdate.size() - (i + 1),COMMIT_ELEMENT_COUNT_THRESHOLD));
        }
      }
    }
    requests.forEach(request -> OutputQueue.getInstance().offer(request));
  }
  if (elementsToDelete != null && !elementsToDelete.isEmpty()) {
    Application.getInstance().getGUILog().log("String_Node_Str" + elementsToDelete.size() + "String_Node_Str"+ (elementsToDelete.size() != 1 ? "String_Node_Str" : "String_Node_Str")+ "String_Node_Str");
    try {
      File file=MMSUtils.createEntityFile(CommitClientElementAction.class,ContentType.APPLICATION_JSON,elementsToDelete,MMSUtils.JsonBlobType.ELEMENT_ID);
      URIBuilder requestUri=MMSUtils.getServiceProjectsRefsElementsUri(project);
      OutputQueue.getInstance().offer((new Request(project,MMSUtils.HttpRequestType.DELETE,requestUri,file,ContentType.APPLICATION_JSON,true,elementsToDelete.size(),"String_Node_Str")));
    }
 catch (    IOException|URISyntaxException e) {
      Application.getInstance().getGUILog().log("String_Node_Str" + e.getMessage());
      e.printStackTrace();
      return;
    }
  }
}