Program: 144376
Project: 144376
Buggy source:
public String editOrderItemsOriginModal(){
  Map sessionAttributes=ActionContext.getContext().getSession();
  System.out.println("String_Node_Str" + (Integer)sessionAttributes.get("String_Node_Str"));
  System.out.println("String_Node_Str" + (Integer)sessionAttributes.get("String_Node_Str"));
  System.out.println("String_Node_Str" + vendorId);
  System.out.println("String_Node_Str" + driverCodeParam);
  System.out.println("String_Node_Str" + truckCodeParam);
  System.out.println("String_Node_Str" + finalPickupParam);
  System.out.println("String_Node_Str" + originConfirmFlag);
  Integer orderIdParam=(Integer)sessionAttributes.get("String_Node_Str");
  Integer orderItemId=(Integer)sessionAttributes.get("String_Node_Str");
  check=(String[])sessionAttributes.get("String_Node_Str");
  if (originConfirmFlag.equals("String_Node_Str")) {
    for (int i=0; i < check.length; i++) {
      System.out.println("String_Node_Str" + check[i]);
      Integer orderItemIdCheck=Integer.parseInt(check[i]);
      OrderItems entity=operationsService.findOrderItemById(orderItemIdCheck);
      OrderItems saveEntity=operationsService.findOrderItemById(orderItemIdCheck);
      entity.setVendorOrigin(vendorService.findVendorById(vendorId).getVendorCode());
      entity.setVendorDestination(saveEntity.getVendorDestination());
      entity.setFinalPickupDate(finalPickupParam);
      entity.setFinalDeliveryDate(saveEntity.getFinalDeliveryDate());
      entity.setOrderItemId(orderItemIdCheck);
      entity.setClientId(saveEntity.getClientId());
      entity.setNameSize(saveEntity.getNameSize());
      entity.setOrderId(saveEntity.getOrderId());
      entity.setQuantity(saveEntity.getQuantity());
      entity.setClassification(saveEntity.getClassification());
      entity.setCommodity(saveEntity.getCommodity());
      entity.setDeclaredValue(saveEntity.getDeclaredValue());
      entity.setComments(saveEntity.getComments());
      entity.setRate(saveEntity.getRate());
      entity.setCreatedBy(saveEntity.getCreatedBy());
      entity.setModifiedBy(saveEntity.getModifiedBy());
      entity.setCreatedTimestamp(saveEntity.getCreatedTimestamp());
      entity.setModifiedTimestamp(saveEntity.getModifiedTimestamp());
      entity.setWeight(saveEntity.getWeight());
      entity.setDriverOrigin(driverCodeParam);
      entity.setDriverDestination(saveEntity.getDriverDestination());
      entity.setTruckOrigin(truckCodeParam);
      entity.setTruckDestination(saveEntity.getTruckDestination());
      entity.setVendorSea(saveEntity.getVendorSea());
      entity.setVesselScheduleId(saveEntity.getVesselScheduleId());
      entity.setCommodity(saveEntity.getCommodity());
      entity.setComments(saveEntity.getComments());
      entity.setWeight(saveEntity.getWeight());
      entity.setVolume(saveEntity.getVolume());
      entity.setServiceRequirement(saveEntity.getServiceRequirement());
      Orders orderEntity=orderService.findOrdersById(saveEntity.getOrderId());
      if ("String_Node_Str".equals(orderEntity.getServiceType())) {
        if ("String_Node_Str".equals(orderEntity.getServiceMode())) {
          entity.setStatus("String_Node_Str");
        }
 else {
          entity.setStatus("String_Node_Str");
        }
      }
 else {
        entity.setStatus("String_Node_Str");
      }
      operationsService.updateOrderItem(entity);
    }
  }
 else {
    OrderItems entity=operationsService.findOrderItemById(orderItemId);
    OrderItems saveEntity=operationsService.findOrderItemById(orderItemId);
    entity.setVendorOrigin(vendorService.findVendorById(vendorId).getVendorCode());
    entity.setVendorDestination(saveEntity.getVendorDestination());
    entity.setFinalPickupDate(finalPickupParam);
    entity.setFinalDeliveryDate(saveEntity.getFinalDeliveryDate());
    entity.setOrderItemId(orderItemId);
    entity.setClientId(saveEntity.getClientId());
    entity.setNameSize(saveEntity.getNameSize());
    entity.setOrderId(saveEntity.getOrderId());
    entity.setQuantity(saveEntity.getQuantity());
    entity.setClassification(saveEntity.getClassification());
    entity.setCommodity(saveEntity.getCommodity());
    entity.setDeclaredValue(saveEntity.getDeclaredValue());
    entity.setComments(saveEntity.getComments());
    entity.setRate(saveEntity.getRate());
    entity.setCreatedBy(saveEntity.getCreatedBy());
    entity.setModifiedBy(saveEntity.getModifiedBy());
    entity.setCreatedTimestamp(saveEntity.getCreatedTimestamp());
    entity.setModifiedTimestamp(saveEntity.getModifiedTimestamp());
    entity.setWeight(saveEntity.getWeight());
    entity.setDriverOrigin(driverCodeParam);
    entity.setDriverDestination(saveEntity.getDriverDestination());
    entity.setTruckOrigin(truckCodeParam);
    entity.setTruckDestination(saveEntity.getTruckDestination());
    entity.setVendorSea(saveEntity.getVendorSea());
    entity.setVesselScheduleId(saveEntity.getVesselScheduleId());
    entity.setCommodity(saveEntity.getCommodity());
    entity.setComments(saveEntity.getComments());
    entity.setWeight(saveEntity.getWeight());
    entity.setVolume(saveEntity.getVolume());
    entity.setServiceRequirement(saveEntity.getServiceRequirement());
    Orders orderEntity=orderService.findOrdersById(saveEntity.getOrderId());
    if ("String_Node_Str".equals(orderEntity.getServiceType())) {
      if ("String_Node_Str".equals(orderEntity.getServiceMode())) {
        entity.setStatus("String_Node_Str");
      }
 else {
        entity.setStatus("String_Node_Str");
      }
    }
 else {
      entity.setStatus("String_Node_Str");
    }
    operationsService.updateOrderItem(entity);
  }
  sessionAttributes.put("String_Node_Str",orderIdParam);
  sessionAttributes.put("String_Node_Str",orderItemId);
  return SUCCESS;
}

Fixed version (ground truth):
public String editOrderItemsOriginModal(){
  Map sessionAttributes=ActionContext.getContext().getSession();
  System.out.println("String_Node_Str" + sessionAttributes.get("String_Node_Str"));
  System.out.println("String_Node_Str" + sessionAttributes.get("String_Node_Str"));
  System.out.println("String_Node_Str" + vendorId);
  System.out.println("String_Node_Str" + driverCodeParam);
  System.out.println("String_Node_Str" + truckCodeParam);
  System.out.println("String_Node_Str" + finalPickupParam);
  System.out.println("String_Node_Str" + originConfirmFlag);
  Integer orderIdParam=(Integer)sessionAttributes.get("String_Node_Str");
  Integer orderItemId=(Integer)sessionAttributes.get("String_Node_Str");
  check=(String[])sessionAttributes.get("String_Node_Str");
  if (originConfirmFlag.equals("String_Node_Str")) {
    for (int i=0; i < check.length; i++) {
      System.out.println("String_Node_Str" + check[i]);
      Integer orderItemIdCheck=Integer.parseInt(check[i]);
      OrderItems entity=operationsService.findOrderItemById(orderItemIdCheck);
      OrderItems saveEntity=operationsService.findOrderItemById(orderItemIdCheck);
      entity.setVendorOrigin(vendorService.findVendorById(vendorId).getVendorCode());
      entity.setVendorDestination(saveEntity.getVendorDestination());
      entity.setFinalPickupDate(finalPickupParam);
      entity.setFinalDeliveryDate(saveEntity.getFinalDeliveryDate());
      entity.setOrderItemId(orderItemIdCheck);
      entity.setClientId(saveEntity.getClientId());
      entity.setNameSize(saveEntity.getNameSize());
      entity.setOrderId(saveEntity.getOrderId());
      entity.setQuantity(saveEntity.getQuantity());
      entity.setClassification(saveEntity.getClassification());
      entity.setCommodity(saveEntity.getCommodity());
      entity.setDeclaredValue(saveEntity.getDeclaredValue());
      entity.setComments(saveEntity.getComments());
      entity.setRate(saveEntity.getRate());
      entity.setCreatedBy(saveEntity.getCreatedBy());
      entity.setModifiedBy(saveEntity.getModifiedBy());
      entity.setCreatedTimestamp(saveEntity.getCreatedTimestamp());
      entity.setModifiedTimestamp(saveEntity.getModifiedTimestamp());
      entity.setWeight(saveEntity.getWeight());
      entity.setDriverOrigin(driverCodeParam);
      entity.setDriverDestination(saveEntity.getDriverDestination());
      entity.setTruckOrigin(truckCodeParam);
      entity.setTruckDestination(saveEntity.getTruckDestination());
      entity.setVendorSea(saveEntity.getVendorSea());
      entity.setVesselScheduleId(saveEntity.getVesselScheduleId());
      entity.setCommodity(saveEntity.getCommodity());
      entity.setComments(saveEntity.getComments());
      entity.setWeight(saveEntity.getWeight());
      entity.setVolume(saveEntity.getVolume());
      entity.setServiceRequirement(saveEntity.getServiceRequirement());
      Orders orderEntity=orderService.findOrdersById(saveEntity.getOrderId());
      if ("String_Node_Str".equals(orderEntity.getServiceType())) {
        if ("String_Node_Str".equals(orderEntity.getServiceMode())) {
          entity.setStatus("String_Node_Str");
        }
 else {
          entity.setStatus("String_Node_Str");
        }
      }
 else {
        entity.setStatus("String_Node_Str");
      }
      operationsService.updateOrderItem(entity);
    }
  }
 else {
    OrderItems entity=operationsService.findOrderItemById(orderItemId);
    OrderItems saveEntity=operationsService.findOrderItemById(orderItemId);
    entity.setVendorOrigin(vendorService.findVendorById(vendorId).getVendorCode());
    entity.setVendorDestination(saveEntity.getVendorDestination());
    entity.setFinalPickupDate(finalPickupParam);
    entity.setFinalDeliveryDate(saveEntity.getFinalDeliveryDate());
    entity.setOrderItemId(orderItemId);
    entity.setClientId(saveEntity.getClientId());
    entity.setNameSize(saveEntity.getNameSize());
    entity.setOrderId(saveEntity.getOrderId());
    entity.setQuantity(saveEntity.getQuantity());
    entity.setClassification(saveEntity.getClassification());
    entity.setCommodity(saveEntity.getCommodity());
    entity.setDeclaredValue(saveEntity.getDeclaredValue());
    entity.setComments(saveEntity.getComments());
    entity.setRate(saveEntity.getRate());
    entity.setCreatedBy(saveEntity.getCreatedBy());
    entity.setModifiedBy(saveEntity.getModifiedBy());
    entity.setCreatedTimestamp(saveEntity.getCreatedTimestamp());
    entity.setModifiedTimestamp(saveEntity.getModifiedTimestamp());
    entity.setWeight(saveEntity.getWeight());
    entity.setDriverOrigin(driverCodeParam);
    entity.setDriverDestination(saveEntity.getDriverDestination());
    entity.setTruckOrigin(truckCodeParam);
    entity.setTruckDestination(saveEntity.getTruckDestination());
    entity.setVendorSea(saveEntity.getVendorSea());
    entity.setVesselScheduleId(saveEntity.getVesselScheduleId());
    entity.setCommodity(saveEntity.getCommodity());
    entity.setComments(saveEntity.getComments());
    entity.setWeight(saveEntity.getWeight());
    entity.setVolume(saveEntity.getVolume());
    entity.setServiceRequirement(saveEntity.getServiceRequirement());
    Orders orderEntity=orderService.findOrdersById(saveEntity.getOrderId());
    if ("String_Node_Str".equals(orderEntity.getServiceType())) {
      if ("String_Node_Str".equals(orderEntity.getServiceMode())) {
        entity.setStatus("String_Node_Str");
      }
 else {
        entity.setStatus("String_Node_Str");
      }
    }
 else {
      entity.setStatus("String_Node_Str");
    }
    operationsService.updateOrderItem(entity);
  }
  sessionAttributes.put("String_Node_Str",orderIdParam);
  sessionAttributes.put("String_Node_Str",orderItemId);
  return SUCCESS;
}