Program: 144388
Project: 144388
Buggy source:
public String addVesselScheduleInPlanningAlreadyExists(){
  Map sessionAttributes=ActionContext.getContext().getSession();
  OrderItems entity=operationsService.findOrderItemById((Integer)sessionAttributes.get("String_Node_Str"));
  orderItem=transformToOrderItemFormBean(entity);
  Orders orderEntity=orderService.findOrdersById((Integer)sessionAttributes.get("String_Node_Str"));
  order=transformToOrderFormBean(orderEntity);
  Customer customerEntity=customerService.findCustomerById(orderEntity.getCustomerId());
  customer=new CustomerBean();
  customer.setCustomerType(customerEntity.getCustomerType());
  if (orderItem.getVesselScheduleId() == null || orderItem.getVesselScheduleId().equals("String_Node_Str") || orderItem.getVesselScheduleId().length() == 0 || orderItem.getVesselScheduleId().isEmpty() || orderItem.getVesselScheduleId().equals("String_Node_Str")) {
    orderItem.setVendorSea("String_Node_Str");
    orderItem.setVesselScheduleId("String_Node_Str");
    vesselSchedule.setVesselName("String_Node_Str");
    vesselSchedule.setDepartureDate("String_Node_Str");
    vesselSchedule.setArrivalDate("String_Node_Str");
    vesselSchedule.setDepartureTime("String_Node_Str");
    vesselSchedule.setArrivalTime("String_Node_Str");
    vesselSchedule.setOriginPort("String_Node_Str");
    vesselSchedule.setDestinationPort("String_Node_Str");
    scheduleExists="String_Node_Str";
  }
 else {
    VesselSchedules vesselScheduleEntity=vesselSchedulesService.findVesselSchedulesByIdVoyageNumber(orderItem.getVesselScheduleId());
    vesselSchedule=transformToFormBeanVesselSchedule(vesselScheduleEntity);
    scheduleExists="String_Node_Str";
  }
  if (orderItem.getTruckOrigin() == null || orderItem.getTruckOrigin().equals("String_Node_Str") || orderItem.getTruckOrigin().length() == 0 || orderItem.getTruckOrigin().isEmpty()) {
    orderItem.setVendorOrigin("String_Node_Str");
    orderItem.setDriverOrigin("String_Node_Str");
    orderItem.setTruckOrigin("String_Node_Str");
    orderItem.setFinalPickupDate("String_Node_Str");
    truck.setTruckType("String_Node_Str");
    truck.setPlateNumber("String_Node_Str");
    truck.setGrossWeight(0);
  }
 else {
    Trucks truckEntity=vendorService.findTrucksByTruckCode(orderItem.getTruckOrigin());
    truck=transformToFormBeanTrucks(truckEntity);
  }
  if (orderItem.getTruckDestination() == null || orderItem.getTruckDestination().equals("String_Node_Str") || orderItem.getTruckDestination().length() == 0 || orderItem.getTruckDestination().isEmpty()) {
    orderItem.setVendorDestination("String_Node_Str");
    orderItem.setDriverDestination("String_Node_Str");
    orderItem.setTruckDestination("String_Node_Str");
    orderItem.setFinalDeliveryDate("String_Node_Str");
    truckDestination.setTruckType("String_Node_Str");
    truckDestination.setPlateNumber("String_Node_Str");
    truckDestination.setGrossWeight(0);
  }
 else {
    Trucks truckEntity=vendorService.findTrucksByTruckCode(orderItem.getTruckDestination());
    truckDestination=transformToFormBeanTrucks(truckEntity);
  }
  vendorShippingListClass=vendorService.findShippingVendorClass(customerService.findCustomerById(order.getCustomerId()).getCustomerType());
  List<VesselSchedules> vesselSchedulesList=operationsService.findVesselScheduleByOriDesClass(order.getOriginationPort(),order.getDestinationPort());
  for (  VesselSchedules vesselScheduleElem : vesselSchedulesList) {
    vesselSchedules.add(transformToFormBeanVesselSchedule(vesselScheduleElem));
  }
  sessionAttributes.put("String_Node_Str",entity.getOrderItemId());
  sessionAttributes.put("String_Node_Str",entity.getNameSize());
  addFieldError("String_Node_Str",getText("String_Node_Str"));
  return SUCCESS;
}

Fixed version (ground truth):
public String addVesselScheduleInPlanningAlreadyExists(){
  Map sessionAttributes=ActionContext.getContext().getSession();
  OrderItems entity=operationsService.findOrderItemById((Integer)sessionAttributes.get("String_Node_Str"));
  orderItem=transformToOrderItemFormBean(entity);
  Orders orderEntity=orderService.findOrdersById(entity.getOrderId());
  order=transformToOrderFormBean(orderEntity);
  Customer customerEntity=customerService.findCustomerById(orderEntity.getCustomerId());
  customer=new CustomerBean();
  customer.setCustomerType(customerEntity.getCustomerType());
  if (orderItem.getVesselScheduleId() == null || orderItem.getVesselScheduleId().equals("String_Node_Str") || orderItem.getVesselScheduleId().length() == 0 || orderItem.getVesselScheduleId().isEmpty() || orderItem.getVesselScheduleId().equals("String_Node_Str")) {
    orderItem.setVendorSea("String_Node_Str");
    orderItem.setVesselScheduleId("String_Node_Str");
    vesselSchedule.setVesselName("String_Node_Str");
    vesselSchedule.setDepartureDate("String_Node_Str");
    vesselSchedule.setArrivalDate("String_Node_Str");
    vesselSchedule.setDepartureTime("String_Node_Str");
    vesselSchedule.setArrivalTime("String_Node_Str");
    vesselSchedule.setOriginPort("String_Node_Str");
    vesselSchedule.setDestinationPort("String_Node_Str");
    scheduleExists="String_Node_Str";
  }
 else {
    VesselSchedules vesselScheduleEntity=vesselSchedulesService.findVesselSchedulesByIdVoyageNumber(orderItem.getVesselScheduleId());
    vesselSchedule=transformToFormBeanVesselSchedule(vesselScheduleEntity);
    scheduleExists="String_Node_Str";
  }
  if (orderItem.getTruckOrigin() == null || orderItem.getTruckOrigin().equals("String_Node_Str") || orderItem.getTruckOrigin().length() == 0 || orderItem.getTruckOrigin().isEmpty()) {
    orderItem.setVendorOrigin("String_Node_Str");
    orderItem.setDriverOrigin("String_Node_Str");
    orderItem.setTruckOrigin("String_Node_Str");
    orderItem.setFinalPickupDate("String_Node_Str");
    truck.setTruckType("String_Node_Str");
    truck.setPlateNumber("String_Node_Str");
    truck.setGrossWeight(0);
  }
 else {
    Trucks truckEntity=vendorService.findTrucksByTruckCode(orderItem.getTruckOrigin());
    truck=transformToFormBeanTrucks(truckEntity);
  }
  if (orderItem.getTruckDestination() == null || orderItem.getTruckDestination().equals("String_Node_Str") || orderItem.getTruckDestination().length() == 0 || orderItem.getTruckDestination().isEmpty()) {
    orderItem.setVendorDestination("String_Node_Str");
    orderItem.setDriverDestination("String_Node_Str");
    orderItem.setTruckDestination("String_Node_Str");
    orderItem.setFinalDeliveryDate("String_Node_Str");
    truckDestination.setTruckType("String_Node_Str");
    truckDestination.setPlateNumber("String_Node_Str");
    truckDestination.setGrossWeight(0);
  }
 else {
    Trucks truckEntity=vendorService.findTrucksByTruckCode(orderItem.getTruckDestination());
    truckDestination=transformToFormBeanTrucks(truckEntity);
  }
  vendorShippingListClass=vendorService.findShippingVendorClass(customerService.findCustomerById(order.getCustomerId()).getCustomerType());
  List<VesselSchedules> vesselSchedulesList=operationsService.findVesselScheduleByOriDesClass(order.getOriginationPort(),order.getDestinationPort());
  for (  VesselSchedules vesselScheduleElem : vesselSchedulesList) {
    vesselSchedules.add(transformToFormBeanVesselSchedule(vesselScheduleElem));
  }
  sessionAttributes.put("String_Node_Str",entity.getOrderItemId());
  sessionAttributes.put("String_Node_Str",entity.getNameSize());
  clearErrorsAndMessages();
  addActionMessage("String_Node_Str");
  return SUCCESS;
}