Program: 84746
Project: 84746
Buggy source:
@RequestMapping(value="String_Node_Str",method=RequestMethod.GET) public String list(@RequestParam(value="String_Node_Str",required=true) String patientDocId,Model uiModel){
  List<String> warningMessage=null;
  List<String> adviceMessage=null;
  List<ClinicVisitUIModel> clinicVisitUIModels=allClinicVisits(patientDocId);
  Patient patient=clinicVisitUIModels.get(0).getPatient();
  List<String> warning=new IncompletePatientDataWarning(patient,allVitalStatistics,allTreatmentAdvices,allLabResults,allClinicVisits).value();
  List<String> patientsWithSameMobileNumber=new UniquePatientMobileNumberWarning(allPatients).findAllMobileNumbersWhichMatchTheGivenNumberCreateClinicVisit(patient.getMobilePhoneNumber(),patientDocId,patient.getClinic().getName(),PatientController.PATIENT);
  List<String> patientsClinicWithSameMobileNumber=new UniquePatientMobileNumberWarning(allPatients).findAllMobileNumbersWhichMatchTheGivenNumberCreateClinicVisit(patient.getMobilePhoneNumber(),patientDocId,patient.getClinic().getName(),PatientController.CLINIC);
  if (!CollectionUtils.isNotEmpty(patientsWithSameMobileNumber)) {
    warningMessage=new ArrayList<>();
    warningMessage.add(PatientController.WARNING_DUPLICATE_PHONE_NUMBERS);
    adviceMessage=new ArrayList<>();
    adviceMessage.add(PatientController.WARNING_DUPLICATE_PHONE_NUMBERS_SUGGESTION);
  }
  boolean checkIfBaseLineVisitHasTreatmentAdviceId=checkIfBaseLineVisitHasTreatmentAdviceId(allClinicVisits.clinicVisits(patientDocId));
  uiModel.addAttribute("String_Node_Str",patientsWithSameMobileNumber);
  uiModel.addAttribute("String_Node_Str",patientsClinicWithSameMobileNumber);
  uiModel.addAttribute("String_Node_Str",warningMessage);
  uiModel.addAttribute("String_Node_Str",adviceMessage);
  uiModel.addAttribute("String_Node_Str",clinicVisitUIModels);
  uiModel.addAttribute("String_Node_Str",new PatientViewModel(patient));
  uiModel.addAttribute(PatientController.WARNING,warning);
  uiModel.addAttribute("String_Node_Str",checkIfBaseLineVisitHasTreatmentAdviceId);
  if (!patient.getStatus().isActive())   return "String_Node_Str";
  return "String_Node_Str";
}

Fixed version (ground truth):
@RequestMapping(value="String_Node_Str",method=RequestMethod.GET) public String list(@RequestParam(value="String_Node_Str",required=true) String patientDocId,Model uiModel){
  List<String> warningMessage=null;
  List<String> adviceMessage=null;
  List<ClinicVisitUIModel> clinicVisitUIModels=allClinicVisits(patientDocId);
  Patient patient=clinicVisitUIModels.get(0).getPatient();
  List<String> warning=new IncompletePatientDataWarning(patient,allVitalStatistics,allTreatmentAdvices,allLabResults,allClinicVisits).value();
  List<String> patientsWithSameMobileNumber=new UniquePatientMobileNumberWarning(allPatients).findAllMobileNumbersWhichMatchTheGivenNumberCreateClinicVisit(patient.getMobilePhoneNumber(),patientDocId,patient.getClinic().getName(),PatientController.PATIENT);
  List<String> patientsClinicWithSameMobileNumber=new UniquePatientMobileNumberWarning(allPatients).findAllMobileNumbersWhichMatchTheGivenNumberCreateClinicVisit(patient.getMobilePhoneNumber(),patientDocId,patient.getClinic().getName(),PatientController.CLINIC);
  if (CollectionUtils.isNotEmpty(patientsWithSameMobileNumber)) {
    warningMessage=new ArrayList<>();
    warningMessage.add(PatientController.WARNING_DUPLICATE_PHONE_NUMBERS);
    adviceMessage=new ArrayList<>();
    adviceMessage.add(PatientController.WARNING_DUPLICATE_PHONE_NUMBERS_SUGGESTION);
  }
  boolean checkIfBaseLineVisitHasTreatmentAdviceId=checkIfBaseLineVisitHasTreatmentAdviceId(allClinicVisits.clinicVisits(patientDocId));
  uiModel.addAttribute("String_Node_Str",patientsWithSameMobileNumber);
  uiModel.addAttribute("String_Node_Str",patientsClinicWithSameMobileNumber);
  uiModel.addAttribute("String_Node_Str",warningMessage);
  uiModel.addAttribute("String_Node_Str",adviceMessage);
  uiModel.addAttribute("String_Node_Str",clinicVisitUIModels);
  uiModel.addAttribute("String_Node_Str",new PatientViewModel(patient));
  uiModel.addAttribute(PatientController.WARNING,warning);
  uiModel.addAttribute("String_Node_Str",checkIfBaseLineVisitHasTreatmentAdviceId);
  if (!patient.getStatus().isActive())   return "String_Node_Str";
  return "String_Node_Str";
}