Program: 60782
Project: 60782
Buggy source:
@PreAuthorize("String_Node_Str") @RequestMapping(method=RequestMethod.GET,value="String_Node_Str") public TaskExecTO report(@PathVariable("String_Node_Str") final Long executionId,@RequestParam("String_Node_Str") final PropagationTaskExecStatus status,@RequestParam("String_Node_Str") final String message) throws NotFoundException, SyncopeClientCompositeErrorException {
  TaskExec exec=taskExecDAO.find(executionId);
  if (exec == null) {
    throw new NotFoundException("String_Node_Str" + executionId);
  }
  SyncopeClientException invalidReportException=new SyncopeClientException(SyncopeClientExceptionType.InvalidPropagationTaskExecReport);
  TaskUtil taskUtil=getTaskUtil(exec.getTask());
  if (taskUtil != TaskUtil.PROPAGATION) {
    invalidReportException.addElement("String_Node_Str" + taskUtil);
  }
 else {
    PropagationTask task=(PropagationTask)exec.getTask();
    if (task.getPropagationMode() != PropagationMode.ASYNC) {
      invalidReportException.addElement("String_Node_Str" + task.getPropagationMode());
    }
  }
switch (status) {
case SUCCESS:
case FAILURE:
    break;
case CREATED:
case SUBMITTED:
case UNSUBMITTED:
  invalidReportException.addElement("String_Node_Str" + status);
break;
default :
}
if (!invalidReportException.isEmpty()) {
SyncopeClientCompositeErrorException scce=new SyncopeClientCompositeErrorException(HttpStatus.BAD_REQUEST);
scce.addException(invalidReportException);
throw scce;
}
exec.setStatus(status.toString());
exec.setMessage(message);
exec=taskExecDAO.save(exec);
return binder.getTaskExecutionTO(exec);
}

Fixed version (ground truth):
@PreAuthorize("String_Node_Str") @RequestMapping(method=RequestMethod.GET,value="String_Node_Str") public TaskExecTO report(@PathVariable("String_Node_Str") final Long executionId,@RequestParam("String_Node_Str") final PropagationTaskExecStatus status,@RequestParam("String_Node_Str") final String message) throws NotFoundException, SyncopeClientCompositeErrorException {
  TaskExec exec=taskExecDAO.find(executionId);
  if (exec == null) {
    throw new NotFoundException("String_Node_Str" + executionId);
  }
  SyncopeClientException invalidReportException=new SyncopeClientException(SyncopeClientExceptionType.InvalidPropagationTaskExecReport);
  TaskUtil taskUtil=getTaskUtil(exec.getTask());
  if (taskUtil != TaskUtil.PROPAGATION) {
    invalidReportException.addElement("String_Node_Str" + taskUtil);
  }
 else {
    PropagationTask task=(PropagationTask)exec.getTask();
    if (task.getPropagationMode() != PropagationMode.TWO_PHASES) {
      invalidReportException.addElement("String_Node_Str" + task.getPropagationMode());
    }
  }
switch (status) {
case SUCCESS:
case FAILURE:
    break;
case CREATED:
case SUBMITTED:
case UNSUBMITTED:
  invalidReportException.addElement("String_Node_Str" + status);
break;
default :
}
if (!invalidReportException.isEmpty()) {
SyncopeClientCompositeErrorException scce=new SyncopeClientCompositeErrorException(HttpStatus.BAD_REQUEST);
scce.addException(invalidReportException);
throw scce;
}
exec.setStatus(status.toString());
exec.setMessage(message);
exec=taskExecDAO.save(exec);
return binder.getTaskExecutionTO(exec);
}