Program: 144391
Project: 144391
Buggy source:
public String viewFreightList(){
  List<Orders> fclOrders=new ArrayList<Orders>();
  if (originCity != null && destinationCity != null) {
    fclOrders=operationsService.findOrdersByOriginDestinationFCL(originCity,destinationCity);
  }
 else {
    fclOrders=operationsService.findOrdersByFCL();
  }
  for (  Orders orderElem : fclOrders) {
    fclTable.add(transformToOrderFormBean(orderElem));
  }
  List<Orders> lclOrders=new ArrayList<Orders>();
  if (originCity != null && destinationCity != null) {
    lclOrders=operationsService.findOrdersByOriginDestinationLCL(originCity,destinationCity);
  }
 else {
    lclOrders=operationsService.findOrdersByLCL();
  }
  for (  Orders orderElem : lclOrders) {
    lclTable.add(transformToOrderFormBean(orderElem));
  }
  List<Orders> lcuOrders=new ArrayList<Orders>();
  if (originCity != null && destinationCity != null) {
    lcuOrders=operationsService.findOrdersByOriginDestinationLCU(originCity,destinationCity);
  }
 else {
    lcuOrders=operationsService.findOrdersByLCU();
  }
  for (  Orders orderElem : lcuOrders) {
    lcuTable.add(transformToOrderFormBean(orderElem));
  }
  List<Orders> rcuOrders=new ArrayList<Orders>();
  if (originCity != null && destinationCity != null) {
    rcuOrders=operationsService.findOrdersByOriginDestinationRCU(originCity,destinationCity);
  }
 else {
    rcuOrders=operationsService.findOrdersByRCU();
  }
  for (  Orders orderElem : rcuOrders) {
    rcuTable.add(transformToOrderFormBean(orderElem));
  }
  List<Orders> fclTrucksOrders=new ArrayList<Orders>();
  if (originCityTruck != null) {
    fclTrucksOrders=operationsService.findOrdersByFCLTrucksOrigin(originCityTruck);
  }
 else {
    fclTrucksOrders=operationsService.findOrdersByFCLTrucks();
  }
  for (  Orders orderElem : fclTrucksOrders) {
    if (orderElem.getServiceMode().equals("String_Node_Str") || orderElem.getServiceMode().equals("String_Node_Str")) {
      fclTruckTable.add(transformToOrderFormBean(orderElem));
    }
  }
  List<Orders> lclTrucksOrders=new ArrayList<Orders>();
  if (originCityTruck != null) {
    lclTrucksOrders=operationsService.findOrdersByLCLTrucksOrigin(originCityTruck);
  }
 else {
    lclTrucksOrders=operationsService.findOrdersByLCLTrucks();
  }
  for (  Orders orderElem : lclTrucksOrders) {
    if (orderElem.getServiceMode().equals("String_Node_Str") || orderElem.getServiceMode().equals("String_Node_Str")) {
      lclTruckTable.add(transformToOrderFormBean(orderElem));
    }
  }
  List<Orders> lcuTrucksOrders=new ArrayList<Orders>();
  if (originCityTruck != null) {
    lcuTrucksOrders=operationsService.findOrdersByLCUTrucksOrigin(originCityTruck);
  }
 else {
    lcuTrucksOrders=operationsService.findOrdersByLCUTrucks();
  }
  for (  Orders orderElem : lcuTrucksOrders) {
    if (orderElem.getServiceMode().equals("String_Node_Str") || orderElem.getServiceMode().equals("String_Node_Str")) {
      lcuTruckTable.add(transformToOrderFormBean(orderElem));
    }
  }
  List<Orders> rcuTrucksOrders=new ArrayList<Orders>();
  if (originCityTruck != null) {
    rcuTrucksOrders=operationsService.findOrdersByRCUTrucksOrigin(originCityTruck);
  }
 else {
    rcuTrucksOrders=operationsService.findOrdersByRCUTrucks();
  }
  for (  Orders orderElem : rcuTrucksOrders) {
    if (orderElem.getServiceMode().equals("String_Node_Str") || orderElem.getServiceMode().equals("String_Node_Str")) {
      rcuTruckTable.add(transformToOrderFormBean(orderElem));
    }
  }
  List<Orders> ftlOrders=new ArrayList<Orders>();
  if (originCityTruck != null) {
    ftlOrders=operationsService.findOrdersByOriginFTL(originCityTruck);
  }
 else {
    ftlOrders=operationsService.findOrdersByFTL();
  }
  for (  Orders orderElem : ftlOrders) {
    ftlTable.add(transformToOrderFormBean(orderElem));
  }
  List<Orders> ltlOrders=new ArrayList<Orders>();
  if (originCityTruck != null) {
    ltlOrders=operationsService.findOrdersByOriginLTL(originCityTruck);
  }
 else {
    ltlOrders=operationsService.findOrdersByLTL();
  }
  for (  Orders orderElem : ltlOrders) {
    ltlTable.add(transformToOrderFormBean(orderElem));
  }
  List<Orders> fclTrucksOrdersDes=new ArrayList<Orders>();
  if (destinationCityTruck != null) {
    fclTrucksOrdersDes=operationsService.findOrdersByFCLTrucksDestination(destinationCityTruck);
  }
 else {
    fclTrucksOrdersDes=operationsService.findOrdersByFCLTrucks();
  }
  for (  Orders orderElem : fclTrucksOrdersDes) {
    if (orderElem.getServiceMode().equals("String_Node_Str") || orderElem.getServiceMode().equals("String_Node_Str")) {
      fclTruckTableDes.add(transformToOrderFormBean(orderElem));
    }
  }
  List<Orders> lclTrucksOrdersDes=new ArrayList<Orders>();
  if (destinationCityTruck != null) {
    lclTrucksOrdersDes=operationsService.findOrdersByLCLTrucksDestination(destinationCityTruck);
  }
 else {
    lclTrucksOrdersDes=operationsService.findOrdersByLCLTrucks();
  }
  for (  Orders orderElem : lclTrucksOrdersDes) {
    if (orderElem.getServiceMode().equals("String_Node_Str") || orderElem.getServiceMode().equals("String_Node_Str")) {
      lclTruckTableDes.add(transformToOrderFormBean(orderElem));
    }
  }
  List<Orders> lcuTrucksOrdersDes=new ArrayList<Orders>();
  if (destinationCityTruck != null) {
    lcuTrucksOrdersDes=operationsService.findOrdersByLCUTrucksDestination(destinationCityTruck);
  }
 else {
    lcuTrucksOrdersDes=operationsService.findOrdersByLCUTrucks();
  }
  for (  Orders orderElem : lcuTrucksOrdersDes) {
    if (orderElem.getServiceMode().equals("String_Node_Str") || orderElem.getServiceMode().equals("String_Node_Str")) {
      lcuTruckTableDes.add(transformToOrderFormBean(orderElem));
    }
  }
  List<Orders> rcuTrucksOrdersDes=new ArrayList<Orders>();
  if (destinationCityTruck != null) {
    rcuTrucksOrdersDes=operationsService.findOrdersByRCUTrucksDestination(destinationCityTruck);
  }
 else {
    rcuTrucksOrdersDes=operationsService.findOrdersByRCUTrucks();
  }
  for (  Orders orderElem : rcuTrucksOrdersDes) {
    if (orderElem.getServiceMode().equals("String_Node_Str") || orderElem.getServiceMode().equals("String_Node_Str")) {
      rcuTruckTableDes.add(transformToOrderFormBean(orderElem));
    }
  }
  List<VesselSchedules> vesselSchedulesList=operationsService.findAllVesselSchedule();
  for (  VesselSchedules vesselScheduleElem : vesselSchedulesList) {
    vesselSchedules.add(transformToFormBeanVesselSchedule(vesselScheduleElem));
  }
  return SUCCESS;
}

Fixed version (ground truth):
public String viewFreightList(){
  List<Orders> fclOrders=new ArrayList<Orders>();
  if (originCity != null && destinationCity != null) {
    fclOrders=operationsService.findOrdersByOriginDestinationFCL(originCity,destinationCity);
  }
 else {
    fclOrders=operationsService.findOrdersByFCL();
  }
  for (  Orders orderElem : fclOrders) {
    fclTable.add(transformToOrderFormBean(orderElem));
  }
  List<Orders> lclOrders=new ArrayList<Orders>();
  if (originCity != null && destinationCity != null) {
    lclOrders=operationsService.findOrdersByOriginDestinationLCL(originCity,destinationCity);
  }
 else {
    lclOrders=operationsService.findOrdersByLCL();
  }
  for (  Orders orderElem : lclOrders) {
    lclTable.add(transformToOrderFormBean(orderElem));
  }
  List<Orders> lcuOrders=new ArrayList<Orders>();
  if (originCity != null && destinationCity != null) {
    lcuOrders=operationsService.findOrdersByOriginDestinationLCU(originCity,destinationCity);
  }
 else {
    lcuOrders=operationsService.findOrdersByLCU();
  }
  for (  Orders orderElem : lcuOrders) {
    lcuTable.add(transformToOrderFormBean(orderElem));
  }
  List<Orders> rcuOrders=new ArrayList<Orders>();
  if (originCity != null && destinationCity != null) {
    rcuOrders=operationsService.findOrdersByOriginDestinationRCU(originCity,destinationCity);
  }
 else {
    rcuOrders=operationsService.findOrdersByRCU();
  }
  for (  Orders orderElem : rcuOrders) {
    rcuTable.add(transformToOrderFormBean(orderElem));
  }
  List<Orders> fclTrucksOrders=new ArrayList<Orders>();
  if (originCityTruck != null) {
    fclTrucksOrders=operationsService.findOrdersByFCLTrucksOrigin(originCityTruck);
  }
 else {
    fclTrucksOrders=operationsService.findOrdersByFCLTrucks();
  }
  for (  Orders orderElem : fclTrucksOrders) {
    if (orderElem.getServiceMode().equals("String_Node_Str") || orderElem.getServiceMode().equals("String_Node_Str")) {
      fclTruckTable.add(transformToOrderFormBean(orderElem));
    }
  }
  List<Orders> lclTrucksOrders=new ArrayList<Orders>();
  if (originCityTruck != null) {
    lclTrucksOrders=operationsService.findOrdersByLCLTrucksOrigin(originCityTruck);
  }
 else {
    lclTrucksOrders=operationsService.findOrdersByLCLTrucks();
  }
  for (  Orders orderElem : lclTrucksOrders) {
    if (orderElem.getServiceMode().equals("String_Node_Str") || orderElem.getServiceMode().equals("String_Node_Str")) {
      lclTruckTable.add(transformToOrderFormBean(orderElem));
    }
  }
  List<Orders> lcuTrucksOrders=new ArrayList<Orders>();
  if (originCityTruck != null) {
    lcuTrucksOrders=operationsService.findOrdersByLCUTrucksOrigin(originCityTruck);
  }
 else {
    lcuTrucksOrders=operationsService.findOrdersByLCUTrucks();
  }
  for (  Orders orderElem : lcuTrucksOrders) {
    if (orderElem.getServiceMode().equals("String_Node_Str") || orderElem.getServiceMode().equals("String_Node_Str")) {
      lcuTruckTable.add(transformToOrderFormBean(orderElem));
    }
  }
  List<Orders> rcuTrucksOrders=new ArrayList<Orders>();
  if (originCityTruck != null) {
    rcuTrucksOrders=operationsService.findOrdersByRCUTrucksOrigin(originCityTruck);
  }
 else {
    rcuTrucksOrders=operationsService.findOrdersByRCUTrucks();
  }
  for (  Orders orderElem : rcuTrucksOrders) {
    if (orderElem.getServiceMode().equals("String_Node_Str") || orderElem.getServiceMode().equals("String_Node_Str")) {
      rcuTruckTable.add(transformToOrderFormBean(orderElem));
    }
  }
  List<Orders> ftlOrders=new ArrayList<Orders>();
  System.out.println("String_Node_Str" + originCityTruck);
  if (originCityTruck != null) {
    ftlOrders=operationsService.findOrdersByOriginFTL(originCityTruck);
  }
 else {
    ftlOrders=operationsService.findOrdersByFTL();
  }
  for (  Orders orderElem : ftlOrders) {
    ftlTable.add(transformToOrderFormBean(orderElem));
  }
  List<Orders> ltlOrders=new ArrayList<Orders>();
  if (originCityTruck != null) {
    ltlOrders=operationsService.findOrdersByOriginLTL(originCityTruck);
  }
 else {
    ltlOrders=operationsService.findOrdersByLTL();
  }
  for (  Orders orderElem : ltlOrders) {
    ltlTable.add(transformToOrderFormBean(orderElem));
  }
  List<Orders> fclTrucksOrdersDes=new ArrayList<Orders>();
  if (destinationCityTruck != null) {
    fclTrucksOrdersDes=operationsService.findOrdersByFCLTrucksDestination(destinationCityTruck);
  }
 else {
    fclTrucksOrdersDes=operationsService.findOrdersByFCLTrucks();
  }
  for (  Orders orderElem : fclTrucksOrdersDes) {
    if (orderElem.getServiceMode().equals("String_Node_Str") || orderElem.getServiceMode().equals("String_Node_Str")) {
      fclTruckTableDes.add(transformToOrderFormBean(orderElem));
    }
  }
  List<Orders> lclTrucksOrdersDes=new ArrayList<Orders>();
  if (destinationCityTruck != null) {
    lclTrucksOrdersDes=operationsService.findOrdersByLCLTrucksDestination(destinationCityTruck);
  }
 else {
    lclTrucksOrdersDes=operationsService.findOrdersByLCLTrucks();
  }
  for (  Orders orderElem : lclTrucksOrdersDes) {
    if (orderElem.getServiceMode().equals("String_Node_Str") || orderElem.getServiceMode().equals("String_Node_Str")) {
      lclTruckTableDes.add(transformToOrderFormBean(orderElem));
    }
  }
  List<Orders> lcuTrucksOrdersDes=new ArrayList<Orders>();
  if (destinationCityTruck != null) {
    lcuTrucksOrdersDes=operationsService.findOrdersByLCUTrucksDestination(destinationCityTruck);
  }
 else {
    lcuTrucksOrdersDes=operationsService.findOrdersByLCUTrucks();
  }
  for (  Orders orderElem : lcuTrucksOrdersDes) {
    if (orderElem.getServiceMode().equals("String_Node_Str") || orderElem.getServiceMode().equals("String_Node_Str")) {
      lcuTruckTableDes.add(transformToOrderFormBean(orderElem));
    }
  }
  List<Orders> rcuTrucksOrdersDes=new ArrayList<Orders>();
  if (destinationCityTruck != null) {
    rcuTrucksOrdersDes=operationsService.findOrdersByRCUTrucksDestination(destinationCityTruck);
  }
 else {
    rcuTrucksOrdersDes=operationsService.findOrdersByRCUTrucks();
  }
  for (  Orders orderElem : rcuTrucksOrdersDes) {
    if (orderElem.getServiceMode().equals("String_Node_Str") || orderElem.getServiceMode().equals("String_Node_Str")) {
      rcuTruckTableDes.add(transformToOrderFormBean(orderElem));
    }
  }
  List<VesselSchedules> vesselSchedulesList=operationsService.findAllVesselSchedule();
  for (  VesselSchedules vesselScheduleElem : vesselSchedulesList) {
    vesselSchedules.add(transformToFormBeanVesselSchedule(vesselScheduleElem));
  }
  return SUCCESS;
}