Program: 84772
Project: 84772
Buggy source:
@RequestMapping(value="String_Node_Str",method=RequestMethod.POST) public String create(@PathVariable("String_Node_Str") String clinicVisitId,ClinicVisitUIModel clinicVisitUIModel,TreatmentAdvice treatmentAdvice,LabResultsUIModel labResultsUiModel,@Valid VitalStatistics vitalStatistics,@Valid OpportunisticInfectionsUIModel opportunisticInfections,BindingResult bindingResult,Model uiModel,HttpServletRequest httpServletRequest){
  String patientId=treatmentAdvice.getPatientId();
  if (bindingResult.hasErrors()) {
    return "String_Node_Str";
  }
  String treatmentAdviceId=null;
  if (isNotBlank(treatmentAdvice.getRegimenId())) {
    try {
      treatmentAdviceId=treatmentAdviceController.create(bindingResult,uiModel,treatmentAdvice);
    }
 catch (    RuntimeException e) {
      httpServletRequest.setAttribute("String_Node_Str","String_Node_Str" + e.getMessage());
      return redirectToCreateFormUrl(clinicVisitId,treatmentAdvice.getPatientId(),httpServletRequest);
    }
  }
  List<String> labResultIds=labResultsController.create(labResultsUiModel,bindingResult,uiModel,httpServletRequest);
  String vitalStatisticsId=vitalStatisticsController.create(vitalStatistics,bindingResult,uiModel,httpServletRequest);
  String reportedOpportunisticInfectionsId=opportunisticInfectionsController.create(opportunisticInfections,bindingResult,uiModel,httpServletRequest);
  try {
    allClinicVisits.updateVisitDetails(clinicVisitId,clinicVisitUIModel.getVisitDate(),patientId,treatmentAdviceId,labResultIds,vitalStatisticsId,reportedOpportunisticInfectionsId);
  }
 catch (  RuntimeException e) {
    httpServletRequest.setAttribute("String_Node_Str","String_Node_Str" + e.getMessage());
    return redirectToCreateFormUrl(clinicVisitId,treatmentAdvice.getPatientId(),httpServletRequest);
  }
  return redirectToShowClinicVisitUrl(clinicVisitId,patientId,httpServletRequest);
}

Fixed version (ground truth):
@RequestMapping(value="String_Node_Str",method=RequestMethod.POST) public String create(@PathVariable("String_Node_Str") String clinicVisitId,ClinicVisitUIModel clinicVisitUIModel,TreatmentAdvice treatmentAdvice,LabResultsUIModel labResultsUiModel,@Valid VitalStatistics vitalStatistics,@Valid OpportunisticInfectionsUIModel opportunisticInfections,BindingResult bindingResult,Model uiModel,HttpServletRequest httpServletRequest){
  String patientId=treatmentAdvice.getPatientId();
  if (bindingResult.hasErrors()) {
    return "String_Node_Str";
  }
  String treatmentAdviceId=null;
  if (isNotBlank(treatmentAdvice.getRegimenId())) {
    try {
      treatmentAdviceId=treatmentAdviceController.create(bindingResult,uiModel,treatmentAdvice);
    }
 catch (    RuntimeException e) {
      httpServletRequest.setAttribute("String_Node_Str","String_Node_Str" + e.getMessage());
      return redirectToCreateFormUrl(clinicVisitId,treatmentAdvice.getPatientId());
    }
  }
  List<String> labResultIds=labResultsController.create(labResultsUiModel,bindingResult,uiModel,httpServletRequest);
  String vitalStatisticsId=vitalStatisticsController.create(vitalStatistics,bindingResult,uiModel,httpServletRequest);
  String reportedOpportunisticInfectionsId=opportunisticInfectionsController.create(opportunisticInfections,bindingResult,uiModel,httpServletRequest);
  try {
    allClinicVisits.updateVisitDetails(clinicVisitId,clinicVisitUIModel.getVisitDate(),patientId,treatmentAdviceId,labResultIds,vitalStatisticsId,reportedOpportunisticInfectionsId);
  }
 catch (  RuntimeException e) {
    httpServletRequest.setAttribute("String_Node_Str","String_Node_Str" + e.getMessage());
    return redirectToCreateFormUrl(clinicVisitId,treatmentAdvice.getPatientId());
  }
  return redirectToShowClinicVisitUrl(clinicVisitId,patientId,httpServletRequest);
}