Program: 144421
Project: 144421
Buggy source:
public String checkItemStatusInland(){
  List<Integer> planning1=new ArrayList();
  List<Integer> planning2=new ArrayList();
  List<Integer> planning3=new ArrayList();
  List<Integer> onGoing=new ArrayList();
  if ("String_Node_Str".equals(orderItem.getEditItem())) {
    if (check == null) {
      return "String_Node_Str";
    }
 else {
      for (int i=0; i < check.length; i++) {
        if (check[i].equals("String_Node_Str") || check[i].equals("String_Node_Str") || "String_Node_Str".equals(check[i])) {
          return "String_Node_Str";
        }
        Integer orderItemId=Integer.parseInt(check[i]);
        OrderItems entity=orderService.findOrderItemByOrderItemId(orderItemId);
        if ("String_Node_Str".equals(entity.getStatus())) {
          planning1.add(orderItemId);
          if (planning2.size() > 0 || planning3.size() > 0) {
            return INPUT;
          }
        }
 else         if ("String_Node_Str".equals(entity.getStatus())) {
          planning2.add(orderItemId);
          if (planning1.size() > 0 || planning3.size() > 0) {
            return INPUT;
          }
        }
 else         if ("String_Node_Str".equals(entity.getStatus())) {
          planning3.add(orderItemId);
          if (planning1.size() > 0 || planning2.size() > 0) {
            return INPUT;
          }
        }
 else         if ("String_Node_Str".equals(entity.getStatus())) {
          onGoing.add(orderItemId);
          if (planning1.size() > 0 || planning2.size() > 0 || planning3.size() > 0) {
            return INPUT;
          }
        }
      }
    }
    Map sessionAttributes=ActionContext.getContext().getSession();
    Orders orderEntity=orderService.findOrdersById((Integer)sessionAttributes.get("String_Node_Str"));
    sessionAttributes.put("String_Node_Str",check);
    order=transformToOrderFormBean(orderEntity);
    nameSizeList=new ArrayList<String>();
    Integer planSize;
    List<Integer> planningList=new ArrayList();
    if (planning1.size() == 0) {
      if (planning2.size() == 0) {
        planSize=planning3.size();
        planningList=planning3;
      }
 else {
        planSize=planning2.size();
        planningList=planning2;
      }
    }
 else {
      planSize=planning1.size();
      planningList=planning1;
    }
    for (int i=0; i < planSize; i++) {
      OrderItems orderItemEntity=orderService.findOrderItemByOrderItemId(planningList.get(i));
      nameSizeList.add(orderItemEntity.getNameSize());
      orderItems.add(transformToOrderItemFormBean(orderItemEntity));
    }
    vendorTruckingOriginList=vendorService.findVendorTruckByLocation(order.getOriginationPort());
    vendorTruckingDestinationList=vendorService.findVendorTruckByLocation(order.getDestinationPort());
    sessionAttributes.put("String_Node_Str",nameSizeList);
    if (planning2.size() > 0) {
      return "String_Node_Str";
    }
 else     if (planning3.size() > 0) {
      if (onGoing.size() > 0) {
        return "String_Node_Str";
      }
      return "String_Node_Str";
    }
 else {
      return "String_Node_Str";
    }
  }
 else {
    orderItem.setEditItem("String_Node_Str");
    if (check == null) {
      return "String_Node_Str";
    }
 else {
      for (int i=0; i < check.length; i++) {
        if (check[i].equals("String_Node_Str") || check[i].equals("String_Node_Str") || "String_Node_Str".equals(check[i])) {
          return "String_Node_Str";
        }
        Integer orderItemId=Integer.parseInt(check[i]);
        OrderItems entity=orderService.findOrderItemByOrderItemId(orderItemId);
        if ("String_Node_Str".equals(entity.getStatus())) {
          planning2.add(orderItemId);
          if (planning1.size() > 0 || planning3.size() > 0) {
            return INPUT;
          }
        }
 else         if ("String_Node_Str".equals(entity.getStatus())) {
          planning3.add(orderItemId);
          if (planning1.size() > 0 || planning2.size() > 0) {
            return INPUT;
          }
        }
 else         if ("String_Node_Str".equals(entity.getStatus())) {
          onGoing.add(orderItemId);
        }
      }
      Map sessionAttributes=ActionContext.getContext().getSession();
      Orders orderEntity=orderService.findOrdersById((Integer)sessionAttributes.get("String_Node_Str"));
      sessionAttributes.put("String_Node_Str",check);
      order=transformToOrderFormBean(orderEntity);
      if (planning1.size() > 0) {
        nameSizeList=new ArrayList<String>();
        for (int i=0; i < planning1.size(); i++) {
          OrderItems orderItemEntity=orderService.findOrderItemByOrderItemId(planning1.get(i));
          nameSizeList.add(orderItemEntity.getNameSize());
          orderItems.add(transformToOrderItemFormBean(orderItemEntity));
        }
      }
 else       if (planning2.size() > 0) {
        nameSizeList=new ArrayList<String>();
        for (int i=0; i < planning2.size(); i++) {
          OrderItems orderItemEntity=orderService.findOrderItemByOrderItemId(planning2.get(i));
          nameSizeList.add(orderItemEntity.getNameSize());
          orderItems.add(transformToOrderItemFormBean(orderItemEntity));
        }
      }
 else       if (planning3.size() > 0) {
        nameSizeList=new ArrayList<String>();
        for (int i=0; i < planning3.size(); i++) {
          OrderItems orderItemEntity=orderService.findOrderItemByOrderItemId(planning3.get(i));
          nameSizeList.add(orderItemEntity.getNameSize());
          orderItems.add(transformToOrderItemFormBean(orderItemEntity));
        }
      }
 else       if (onGoing.size() > 0) {
        nameSizeList=new ArrayList<String>();
        for (int i=0; i < onGoing.size(); i++) {
          OrderItems orderItemEntity=orderService.findOrderItemByOrderItemId(onGoing.get(i));
          nameSizeList.add(orderItemEntity.getNameSize());
          orderItems.add(transformToOrderItemFormBean(orderItemEntity));
        }
      }
      List<OrderItems> orderItemsListing=orderService.findAllItemByOrderId(orderEntity.getOrderId());
      for (      OrderItems orderItemElem : orderItemsListing) {
        orderItemOriginVendor.add(transformToOrderItemFormBean(orderItemElem));
        orderItemDestinationVendor.add(transformToOrderItemFormBean(orderItemElem));
      }
      vendorTruckingOriginList=vendorService.findVendorTruckByLocation(order.getOriginationPort());
      vendorTruckingDestinationList=vendorService.findVendorTruckByLocation(order.getDestinationPort());
      sessionAttributes.put("String_Node_Str",nameSizeList);
      if (planning2.size() > 0 || planning3.size() > 0 || onGoing.size() > 0) {
        return "String_Node_Str";
      }
 else       if (planning1.size() > 0) {
        return "String_Node_Str";
      }
 else {
        return "String_Node_Str";
      }
    }
  }
}

Fixed version (ground truth):
public String checkItemStatusInland(){
  List<Integer> planning1=new ArrayList();
  List<Integer> planning2=new ArrayList();
  List<Integer> planning3=new ArrayList();
  List<Integer> onGoing=new ArrayList();
  if ("String_Node_Str".equals(orderItem.getEditItem())) {
    if (check == null) {
      return "String_Node_Str";
    }
 else {
      for (int i=0; i < check.length; i++) {
        if (check[i].equals("String_Node_Str") || check[i].equals("String_Node_Str") || "String_Node_Str".equals(check[i])) {
          return "String_Node_Str";
        }
        Integer orderItemId=Integer.parseInt(check[i]);
        OrderItems entity=orderService.findOrderItemByOrderItemId(orderItemId);
        if ("String_Node_Str".equals(entity.getStatus())) {
          planning1.add(orderItemId);
          if (planning2.size() > 0 || planning3.size() > 0) {
            return INPUT;
          }
        }
 else         if ("String_Node_Str".equals(entity.getStatus())) {
          planning2.add(orderItemId);
          if (planning1.size() > 0 || planning3.size() > 0) {
            return INPUT;
          }
        }
 else         if ("String_Node_Str".equals(entity.getStatus())) {
          planning3.add(orderItemId);
          if (planning1.size() > 0 || planning2.size() > 0) {
            return INPUT;
          }
        }
 else         if ("String_Node_Str".equals(entity.getStatus())) {
          onGoing.add(orderItemId);
          if (planning1.size() > 0 || planning2.size() > 0 || planning3.size() > 0) {
            return INPUT;
          }
        }
      }
    }
    Map sessionAttributes=ActionContext.getContext().getSession();
    Orders orderEntity=orderService.findOrdersById((Integer)sessionAttributes.get("String_Node_Str"));
    sessionAttributes.put("String_Node_Str",check);
    order=transformToOrderFormBean(orderEntity);
    nameSizeList=new ArrayList<String>();
    Integer planSize;
    List<Integer> planningList=new ArrayList();
    if (planning1.size() == 0) {
      if (planning2.size() == 0) {
        planSize=planning3.size();
        planningList=planning3;
      }
 else {
        planSize=planning2.size();
        planningList=planning2;
      }
    }
 else {
      planSize=planning1.size();
      planningList=planning1;
    }
    for (int i=0; i < planSize; i++) {
      OrderItems orderItemEntity=orderService.findOrderItemByOrderItemId(planningList.get(i));
      nameSizeList.add(orderItemEntity.getNameSize());
      orderItems.add(transformToOrderItemFormBean(orderItemEntity));
    }
    vendorTruckingOriginList=vendorService.findVendorTruckByLocation(order.getOriginationPort());
    vendorTruckingDestinationList=vendorService.findVendorTruckByLocation(order.getDestinationPort());
    sessionAttributes.put("String_Node_Str",nameSizeList);
    if (planning2.size() > 0) {
      return "String_Node_Str";
    }
 else     if (planning3.size() > 0) {
      if (onGoing.size() > 0) {
        return "String_Node_Str";
      }
      return "String_Node_Str";
    }
 else {
      return "String_Node_Str";
    }
  }
 else {
    orderItem.setEditItem("String_Node_Str");
    if (check == null) {
      return "String_Node_Str";
    }
 else {
      for (int i=0; i < check.length; i++) {
        if (check[i].equals("String_Node_Str") || check[i].equals("String_Node_Str") || "String_Node_Str".equals(check[i])) {
          return "String_Node_Str";
        }
        Integer orderItemId=Integer.parseInt(check[i]);
        OrderItems entity=orderService.findOrderItemByOrderItemId(orderItemId);
        if ("String_Node_Str".equals(entity.getStatus())) {
          planning2.add(orderItemId);
          if (planning1.size() > 0 || planning3.size() > 0) {
            return INPUT;
          }
        }
 else         if ("String_Node_Str".equals(entity.getStatus())) {
          planning3.add(orderItemId);
          if (planning1.size() > 0 || planning2.size() > 0) {
            return INPUT;
          }
        }
 else         if ("String_Node_Str".equals(entity.getStatus())) {
          onGoing.add(orderItemId);
        }
      }
      Map sessionAttributes=ActionContext.getContext().getSession();
      Orders orderEntity=orderService.findOrdersById((Integer)sessionAttributes.get("String_Node_Str"));
      sessionAttributes.put("String_Node_Str",check);
      order=transformToOrderFormBean(orderEntity);
      if (planning1.size() > 0) {
        nameSizeList=new ArrayList<String>();
        for (int i=0; i < planning1.size(); i++) {
          OrderItems orderItemEntity=orderService.findOrderItemByOrderItemId(planning1.get(i));
          nameSizeList.add(orderItemEntity.getNameSize());
          orderItems.add(transformToOrderItemFormBean(orderItemEntity));
        }
      }
 else       if (planning2.size() > 0) {
        nameSizeList=new ArrayList<String>();
        for (int i=0; i < planning2.size(); i++) {
          OrderItems orderItemEntity=orderService.findOrderItemByOrderItemId(planning2.get(i));
          nameSizeList.add(orderItemEntity.getNameSize());
          orderItems.add(transformToOrderItemFormBean(orderItemEntity));
        }
      }
 else       if (planning3.size() > 0) {
        nameSizeList=new ArrayList<String>();
        for (int i=0; i < planning3.size(); i++) {
          OrderItems orderItemEntity=orderService.findOrderItemByOrderItemId(planning3.get(i));
          nameSizeList.add(orderItemEntity.getNameSize());
          orderItems.add(transformToOrderItemFormBean(orderItemEntity));
        }
      }
 else       if (onGoing.size() > 0) {
        nameSizeList=new ArrayList<String>();
        for (int i=0; i < onGoing.size(); i++) {
          OrderItems orderItemEntity=orderService.findOrderItemByOrderItemId(onGoing.get(i));
          nameSizeList.add(orderItemEntity.getNameSize());
          orderItems.add(transformToOrderItemFormBean(orderItemEntity));
        }
      }
      for (int x=0; x < check.length; x++) {
        OrderItems orderItemsListing=orderService.findOrderItemByOrderItemId(Integer.parseInt(check[x]));
        orderItemOriginVendor.add(transformToOrderItemFormBean(orderItemsListing));
        orderItemDestinationVendor.add(transformToOrderItemFormBean(orderItemsListing));
      }
      vendorTruckingOriginList=vendorService.findVendorTruckByLocation(order.getOriginationPort());
      vendorTruckingDestinationList=vendorService.findVendorTruckByLocation(order.getDestinationPort());
      sessionAttributes.put("String_Node_Str",nameSizeList);
      if (planning2.size() > 0 || planning3.size() > 0 || onGoing.size() > 0) {
        return "String_Node_Str";
      }
 else       if (planning1.size() > 0) {
        return "String_Node_Str";
      }
 else {
        return "String_Node_Str";
      }
    }
  }
}