Program: 49124
Project: 49124
Buggy source:
private void processResponse(ResponseEntity<String> response,HttpMethod verb,PrettyOutput... prettyOutput) throws Exception {
  HttpStatus responseStatus=response.getStatusCode();
  if (responseStatus == HttpStatus.ACCEPTED) {
    HttpHeaders headers=response.getHeaders();
    URI taskURI=headers.getLocation();
    String[] taskURIs=taskURI.toString().split("String_Node_Str");
    String taskId=taskURIs[taskURIs.length - 1];
    TaskRead taskRead;
    int oldProgress=0;
    Status oldTaskStatus=null;
    do {
      ResponseEntity<TaskRead> taskResponse=restGetById(Constants.REST_PATH_TASK,taskId,TaskRead.class,false);
      taskRead=taskResponse.getBody();
      int progress=(int)(taskRead.getProgress() * 100);
      Status taskStatus=taskRead.getStatus();
      if ((prettyOutput != null && prettyOutput.length > 0 && prettyOutput[0].isRefresh()) || oldTaskStatus != taskStatus || oldProgress != progress) {
        oldTaskStatus=taskStatus;
        oldProgress=progress;
        AnsiConsole.systemInstall();
        String separator="String_Node_Str";
        char ESC=27;
        String clearScreen="String_Node_Str";
        System.out.print(ESC + separator + clearScreen);
        AnsiConsole.systemUninstall();
        System.out.println(taskStatus + "String_Node_Str" + progress+ "String_Node_Str");
        if (prettyOutput != null && prettyOutput.length > 0) {
          prettyOutput[0].prettyOutput();
        }
      }
      try {
        Thread.sleep(3 * 1000);
      }
 catch (      InterruptedException ex) {
      }
    }
 while (taskRead.getStatus() != TaskRead.Status.SUCCESS && taskRead.getStatus() != TaskRead.Status.FAILED);
    if (taskRead.getStatus().equals(TaskRead.Status.FAILED)) {
      String logdir=taskRead.getWorkDir();
      String errorMsg=taskRead.getErrorMessage();
      if (logdir != null && !logdir.isEmpty()) {
        String outputErrorInfo=Constants.OUTPUT_LOG_INFO + logdir;
        if (errorMsg != null) {
          outputErrorInfo=errorMsg + "String_Node_Str" + outputErrorInfo;
        }
        throw new CliRestException(outputErrorInfo);
      }
 else       if (errorMsg != null && !errorMsg.isEmpty()) {
        throw new CliRestException(errorMsg);
      }
 else {
        throw new CliRestException("String_Node_Str");
      }
    }
  }
}

Fixed version (ground truth):
private void processResponse(ResponseEntity<String> response,HttpMethod verb,PrettyOutput... prettyOutput) throws Exception {
  HttpStatus responseStatus=response.getStatusCode();
  if (responseStatus == HttpStatus.ACCEPTED) {
    HttpHeaders headers=response.getHeaders();
    URI taskURI=headers.getLocation();
    String[] taskURIs=taskURI.toString().split("String_Node_Str");
    String taskId=taskURIs[taskURIs.length - 1];
    TaskRead taskRead;
    int oldProgress=0;
    Status oldTaskStatus=null;
    do {
      ResponseEntity<TaskRead> taskResponse=restGetById(Constants.REST_PATH_TASK,taskId,TaskRead.class,false);
      taskRead=taskResponse.getBody();
      int progress=(int)(taskRead.getProgress() * 100);
      Status taskStatus=taskRead.getStatus();
      if ((prettyOutput != null && prettyOutput.length > 0 && prettyOutput[0].isRefresh()) || oldTaskStatus != taskStatus || oldProgress != progress) {
        oldTaskStatus=taskStatus;
        oldProgress=progress;
        AnsiConsole.systemInstall();
        String separator="String_Node_Str";
        char ESC=27;
        String clearScreen="String_Node_Str";
        System.out.print(ESC + separator + clearScreen);
        AnsiConsole.systemUninstall();
        System.out.println(taskStatus + "String_Node_Str" + progress+ "String_Node_Str");
        if (prettyOutput != null && prettyOutput.length > 0) {
          prettyOutput[0].prettyOutput();
        }
      }
      try {
        Thread.sleep(3 * 1000);
      }
 catch (      InterruptedException ex) {
      }
    }
 while (taskRead.getStatus() != TaskRead.Status.SUCCESS && taskRead.getStatus() != TaskRead.Status.FAILED);
    String logdir=taskRead.getWorkDir();
    String errorMsg=taskRead.getErrorMessage();
    if (taskRead.getStatus().equals(TaskRead.Status.FAILED)) {
      if (!CommandsUtils.isBlank(logdir)) {
        String outputErrorInfo=Constants.OUTPUT_LOG_INFO + logdir;
        if (errorMsg != null) {
          outputErrorInfo=errorMsg + "String_Node_Str" + outputErrorInfo;
        }
        throw new CliRestException(outputErrorInfo);
      }
 else       if (errorMsg != null && !errorMsg.isEmpty()) {
        throw new CliRestException(errorMsg);
      }
 else {
        throw new CliRestException("String_Node_Str");
      }
    }
 else     if (taskRead.getStatus().equals(TaskRead.Status.SUCCESS)) {
      if (taskRead.getType().equals(Type.VHM)) {
        if (!CommandsUtils.isBlank(logdir)) {
          System.out.println(Constants.OUTPUT_WARNING_LOG_INFO + logdir);
        }
      }
    }
  }
}