Program: 144414
Project: 144414
Buggy source:
public String checkItemStatus(){
  List<Integer> planning1=new ArrayList();
  List<Integer> planning2=new ArrayList();
  List<Integer> planning3=new ArrayList();
  List<Integer> onGoing=new ArrayList();
  System.out.println("String_Node_Str" + check);
  System.out.println("String_Node_Str" + orderItemIdParam);
  if ("String_Node_Str".equals(orderItem.getEditItem())) {
    if (check == null) {
      return "String_Node_Str";
    }
 else {
      for (int i=0; i < check.length; i++) {
        System.out.println("String_Node_Str" + check[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     if (planning1.size() > 0) {
      planSize=planning1.size();
      planningList=planning1;
    }
 else {
      planSize=onGoing.size();
      planningList=onGoing;
    }
    for (int i=0; i < planSize; i++) {
      OrderItems orderItemEntity=orderService.findOrderItemByOrderItemId(planningList.get(i));
      nameSizeList.add(orderItemEntity.getNameSize());
    }
    List<OrderItems> orderItemsListing=orderService.findAllItemByOrderId(orderEntity.getOrderId());
    for (    OrderItems orderItemElem : orderItemsListing) {
      orderItemVesselSchedule.add(transformToOrderItemFormBean(orderItemElem));
    }
    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",nameSizeList);
    if (planning1.size() > 0) {
      return SUCCESS;
    }
 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())) {
          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);
        }
      }
      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());
        }
      }
 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());
        }
      }
 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());
        }
      }
 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());
        }
      }
      List<OrderItems> orderItemsListing=orderService.findAllItemByOrderId(orderEntity.getOrderId());
      for (      OrderItems orderItemElem : orderItemsListing) {
        orderItemVesselSchedule.add(transformToOrderItemFormBean(orderItemElem));
      }
      List<VesselSchedules> vesselSchedulesList=operationsService.findVesselScheduleByOriDesClass(order.getOriginationPort(),order.getDestinationPort());
      for (      VesselSchedules vesselScheduleElem : vesselSchedulesList) {
        vesselSchedules.add(transformToFormBeanVesselSchedule(vesselScheduleElem));
      }
      sessionAttributes.put("String_Node_Str",nameSizeList);
      if (planning1.size() > 0 || planning2.size() > 0 || planning3.size() > 0 || onGoing.size() > 0) {
        return "String_Node_Str";
      }
 else {
        return "String_Node_Str";
      }
    }
  }
}

Fixed version (ground truth):
public String checkItemStatus(){
  List<Integer> planning1=new ArrayList();
  List<Integer> planning2=new ArrayList();
  List<Integer> planning3=new ArrayList();
  List<Integer> onGoing=new ArrayList();
  System.out.println("String_Node_Str" + check);
  System.out.println("String_Node_Str" + orderItemIdParam);
  if ("String_Node_Str".equals(orderItem.getEditItem())) {
    if (check == null) {
      return "String_Node_Str";
    }
 else {
      for (int i=0; i < check.length; i++) {
        System.out.println("String_Node_Str" + check[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     if (planning1.size() > 0) {
      planSize=planning1.size();
      planningList=planning1;
    }
 else {
      planSize=onGoing.size();
      planningList=onGoing;
    }
    for (int i=0; i < planSize; i++) {
      OrderItems orderItemEntity=orderService.findOrderItemByOrderItemId(planningList.get(i));
      nameSizeList.add(orderItemEntity.getNameSize());
    }
    List<OrderItems> orderItemsListing=orderService.findAllItemByOrderId(orderEntity.getOrderId());
    for (    OrderItems orderItemElem : orderItemsListing) {
      orderItemVesselSchedule.add(transformToOrderItemFormBean(orderItemElem));
    }
    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",nameSizeList);
    if (planning1.size() > 0) {
      return SUCCESS;
    }
 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())) {
          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);
        }
      }
      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());
        }
      }
 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());
        }
      }
 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());
        }
      }
 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());
        }
      }
      List<OrderItems> orderItemsListing=orderService.findAllItemByOrderId(orderEntity.getOrderId());
      for (      OrderItems orderItemElem : orderItemsListing) {
        orderItemVesselSchedule.add(transformToOrderItemFormBean(orderItemElem));
      }
      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",nameSizeList);
      if (planning1.size() > 0 || planning2.size() > 0 || planning3.size() > 0 || onGoing.size() > 0) {
        return "String_Node_Str";
      }
 else {
        return "String_Node_Str";
      }
    }
  }
}