Program: 144356
Project: 144356
Buggy source:
public String viewArchivedOrders(){
  String column=getColumnFilter();
  List<Orders> orderEntityList=new ArrayList<Orders>();
  if (StringUtils.isNotBlank(column)) {
    if (column.equals("String_Node_Str")) {
      List<Customer> customerEntityList=customerService.findCustomersByCriteria("String_Node_Str",order.getOrderKeyword(),getClientId());
      List<Orders> allOrderEntityList=orderService.findAllOrders();
      for (      Customer customerElem : customerEntityList) {
        for (        Orders orderElem : allOrderEntityList) {
          if (customerElem.getCustomerId().equals(orderElem.getCustomerId())) {
            if (orderElem.getOrderStatus().equals("String_Node_Str")) {
              orders.add(transformToOrderFormBean(orderElem));
            }
          }
        }
      }
    }
 else     if (column.equals("String_Node_Str")) {
      List<Contacts> consigneeEntityList=customerService.findConsigneeByCriteria("String_Node_Str",order.getOrderKeyword(),getClientId());
      List<Orders> allOrderEntityList=orderService.findAllOrders();
      for (      Contacts consigneeElem : consigneeEntityList) {
        for (        Orders orderElem : allOrderEntityList) {
          if (consigneeElem.getContactId().equals(orderElem.getConsigneeContactId())) {
            if (orderElem.getOrderStatus().equals("String_Node_Str")) {
              orders.add(transformToOrderFormBean(orderElem));
            }
          }
        }
      }
    }
 else {
      orderEntityList=orderService.findOrdersByCriteria(column,order.getOrderKeyword(),getClientId());
      for (      Orders orderElem : orderEntityList) {
        if (orderElem.getOrderStatus().equals("String_Node_Str")) {
          orders.add(transformToOrderFormBean(orderElem));
        }
      }
    }
  }
 else {
    orderEntityList=orderService.findAllOrders();
    for (    Orders orderElem : orderEntityList) {
      if (orderElem.getOrderStatus().equals("String_Node_Str")) {
        orders.add(transformToOrderFormBean(orderElem));
      }
    }
  }
  return SUCCESS;
}

Fixed version (ground truth):
public String viewArchivedOrders(){
  String column=getColumnFilter();
  List<Orders> orderEntityList=new ArrayList<Orders>();
  if (StringUtils.isNotBlank(column)) {
    if (column.equals("String_Node_Str")) {
      List<Customer> customerEntityList=customerService.findCustomersByCriteria("String_Node_Str",order.getOrderKeyword(),getClientId());
      List<Orders> allOrderEntityList=orderService.findAllOrders();
      for (      Customer customerElem : customerEntityList) {
        for (        Orders orderElem : allOrderEntityList) {
          if (customerElem.getCustomerId().equals(orderElem.getCustomerId())) {
            String strOrig=orderElem.getOrderStatus();
            int intIndex=strOrig.indexOf("String_Node_Str");
            if (intIndex != -1) {
              orders.add(transformToOrderFormBean(orderElem));
            }
          }
        }
      }
    }
 else     if (column.equals("String_Node_Str")) {
      List<Contacts> consigneeEntityList=customerService.findConsigneeByCriteria("String_Node_Str",order.getOrderKeyword(),getClientId());
      List<Orders> allOrderEntityList=orderService.findAllOrders();
      for (      Contacts consigneeElem : consigneeEntityList) {
        for (        Orders orderElem : allOrderEntityList) {
          if (consigneeElem.getContactId().equals(orderElem.getConsigneeContactId())) {
            String strOrig=orderElem.getOrderStatus();
            int intIndex=strOrig.indexOf("String_Node_Str");
            if (intIndex != -1) {
              orders.add(transformToOrderFormBean(orderElem));
            }
          }
        }
      }
    }
 else {
      orderEntityList=orderService.findOrdersByCriteria(column,order.getOrderKeyword(),getClientId());
      for (      Orders orderElem : orderEntityList) {
        String strOrig=orderElem.getOrderStatus();
        int intIndex=strOrig.indexOf("String_Node_Str");
        if (intIndex != -1) {
          orders.add(transformToOrderFormBean(orderElem));
        }
      }
    }
  }
 else {
    orderEntityList=orderService.findAllOrders();
    for (    Orders orderElem : orderEntityList) {
      String strOrig=orderElem.getOrderStatus();
      int intIndex=strOrig.indexOf("String_Node_Str");
      if (intIndex != -1) {
        orders.add(transformToOrderFormBean(orderElem));
      }
    }
  }
  return SUCCESS;
}