nus-yam/ex-repair huggingface dataset:
Program: 144456
Project: 144456
Buggy source:
@Override public List<Vendor> findAllShippingVendor(){
  log.debug("String_Node_Str");
  try {
    return getSessionFactory().getCurrentSession().createQuery("String_Node_Str").list();
  }
 catch (  RuntimeException re) {
    log.error("String_Node_Str",re);
    throw re;
  }
}

Fixed version (ground truth):
@Override public List<Vendor> findAllShippingVendor(){
  List<String> vendorTypeList=new ArrayList<>();
  vendorTypeList.add("String_Node_Str");
  log.debug("String_Node_Str");
  try {
    log.debug("String_Node_Str");
    Query query=getSessionFactory().getCurrentSession().createQuery("String_Node_Str");
    query.setParameterList("String_Node_Str",vendorTypeList);
    List<Vendor> results=(List<Vendor>)query.list();
    return results;
  }
 catch (  Exception e) {
    log.error("String_Node_Str");
    throw e;
  }
}
Program: 144457
Project: 144457
Buggy source:
public ContainerBean transformContainerToFormBean(Container entity){
  ContainerBean formBean=new ContainerBean();
  formBean.setContainerId(entity.getContainerId());
  formBean.setEirNumber(entity.getEirNumber());
  formBean.setPortCode(entity.getPortCode());
  formBean.setDateTime(entity.getDateTime());
  formBean.setShipping(entity.getShipping());
  formBean.setTrucking(entity.getTrucking());
  formBean.setPlateNumber(entity.getPlateNumber());
  formBean.setVanNumber(entity.getVanNumber());
  formBean.setDriver(entity.getDriver());
  formBean.setOrderNumber(entity.getOrderNumber());
  formBean.setRemarks(entity.getRemarks());
  formBean.setVanTo(entity.getVanTo());
  formBean.setVanFrom(entity.getVanFrom());
  formBean.setContainerNumber(entity.getContainerNumber());
  formBean.setContainerSize(entity.getContainerSize());
  formBean.setContainerType(entity.getContainerType());
  formBean.setEirType(entity.getEirType());
  formBean.setSealNumber(entity.getSealNumber());
  formBean.setVanLocation(entity.getVanLocation());
  formBean.setLadenEmpty(entity.getLadenEmpty());
  formBean.setBookingNum(entity.getBookingNum());
  formBean.setReceiptNumber(entity.getReceiptNumber());
  formBean.setLadenEmpty(entity.getLadenEmpty());
  formBean.setForkliftOperator(entity.getForkliftOperator());
  formBean.setOperationsDept(entity.getOperationsDept());
  formBean.setContainerStatus(entity.getContainerStatus());
  return formBean;
}

Fixed version (ground truth):
public ContainerBean transformContainerToFormBean(Container entity){
  ContainerBean formBean=new ContainerBean();
  formBean.setContainerId(entity.getContainerId());
  formBean.setEirNumber(entity.getEirNumber());
  formBean.setPortCode(entity.getPortCode());
  formBean.setDateTime(entity.getDateTime());
  formBean.setShipping(entity.getShipping());
  formBean.setTrucking(entity.getTrucking());
  formBean.setPlateNumber(entity.getPlateNumber());
  formBean.setVanNumber(entity.getVanNumber());
  formBean.setDriver(entity.getDriver());
  formBean.setOrderNumber(entity.getOrderNumber());
  formBean.setRemarks(entity.getRemarks());
  formBean.setVanTo(entity.getVanTo());
  formBean.setVanFrom(entity.getVanFrom());
  formBean.setContainerNumber(entity.getContainerNumber());
  formBean.setContainerSize(entity.getContainerSize());
  formBean.setContainerType(entity.getContainerType());
  formBean.setEirType(entity.getEirType());
  formBean.setSealNumber(entity.getSealNumber());
  formBean.setVanLocation(entity.getVanLocation());
  formBean.setLadenEmpty(entity.getLadenEmpty());
  formBean.setReceiptNumber(entity.getReceiptNumber());
  formBean.setLadenEmpty(entity.getLadenEmpty());
  formBean.setForkliftOperator(entity.getForkliftOperator());
  formBean.setOperationsDept(entity.getOperationsDept());
  formBean.setContainerStatus(entity.getContainerStatus());
  return formBean;
}
Program: 144461
Project: 144461
Buggy source:
public void addContainer(Container container);

Fixed version (ground truth):
public void addContainer(Container container) throws Exception ;
Program: 144462
Project: 144462
Buggy source:
@Override @Transactional(propagation=Propagation.REQUIRED,readOnly=false) public void addContainer(Container container){
  containerDao.addContainer(container);
}

Fixed version (ground truth):
@Override @Transactional(propagation=Propagation.REQUIRED,readOnly=false) public void addContainer(Container container) throws Exception {
  if (containerDao.findContainerByEIRNumber(container.getEirNumber()).size() > 0) {
    throw new ContainerAlreadyExistsException(container.getEirNumber());
  }
 else {
    containerDao.addContainer(container);
  }
}
Program: 144463
Project: 144463
Buggy source:
public String containerAdd(){
  Container containerEntity=transformContainerToEntityBean(container);
  containerService.addContainer(containerEntity);
  addActionMessage("String_Node_Str");
  return SUCCESS;
}

Fixed version (ground truth):
public String containerAdd(){
  Container containerEntity=transformContainerToEntityBean(container);
  try {
    containerService.addContainer(containerEntity);
  }
 catch (  Exception e) {
    return INPUT;
  }
  addActionMessage("String_Node_Str");
  return SUCCESS;
}
Program: 144464
Project: 144464
Buggy source:
public String editOrderItemsSea(){
  Client client=clientService.findClientById(getClientId().toString());
  try {
    OrderItems entity=transformOrderItemToEntityBeanSea(operationsBean);
    entity.setVesselScheduleId(vesselSchedulesService.findVesselSchedulesById(vesselScheduleIdParam).getVoyageNumber());
    operationsService.updateOrderItem(entity);
    Orders orderEntity=orderService.findOrdersById(entity.getOrderId());
  }
 catch (  Exception e) {
    log.error("String_Node_Str",e);
    return INPUT;
  }
  Map sessionAttributes=ActionContext.getContext().getSession();
  sessionAttributes.put("String_Node_Str",vendorIdParam);
  Integer orderId=(Integer)sessionAttributes.get("String_Node_Str");
  return SUCCESS;
}

Fixed version (ground truth):
public String editOrderItemsSea(){
  Client client=clientService.findClientById(getClientId().toString());
  try {
    OrderItems entity=transformOrderItemToEntityBeanSea(operationsBean);
    entity.setVesselScheduleId(vesselSchedulesService.findVesselSchedulesById(vesselScheduleIdParam).getVoyageNumber());
    operationsService.updateOrderItem(entity);
  }
 catch (  Exception e) {
    log.error("String_Node_Str",e);
    return INPUT;
  }
  Map sessionAttributes=ActionContext.getContext().getSession();
  sessionAttributes.put("String_Node_Str",vendorIdParam);
  Integer orderId=(Integer)sessionAttributes.get("String_Node_Str");
  return SUCCESS;
}
Program: 144467
Project: 144467
Buggy source:
public String editOrderItemsDestination(){
  Map sessionAttributes=ActionContext.getContext().getSession();
  try {
    OrderItems entity=transformOrderItemToEntityBeanDestination(operationsBean);
    Orders orderEntity=orderService.findOrdersById(entity.getOrderId());
    Documents documentEntity=new Documents();
    Client client=clientService.findClientById(getClientId().toString());
    documentEntity.setClient(client);
    documentEntity.setDocumentName(DocumentsConstants.HOUSE_WAYBILL_DESTINATION);
    documentEntity.setReferenceId(orderEntity.getOrderId());
    documentEntity.setReferenceTable("String_Node_Str");
    documentEntity.setOrderNumber(orderEntity.getOrderNumber());
    documentEntity.setReferenceNumber(orderEntity.getOrderNumber());
    documentEntity.setCreatedDate(new Date());
    documentEntity.setDocumentStatus("String_Node_Str");
    documentEntity.setFinalOutboundStage(1);
    documentEntity.setDocumentProcessed(0);
    documentEntity.setOrderItemId(entity.getOrderItemId());
    documentsService.addDocuments(documentEntity);
    operationsService.updateOrderItem(entity);
  }
 catch (  Exception e) {
    log.error("String_Node_Str",e);
    return INPUT;
  }
  return SUCCESS;
}

Fixed version (ground truth):
public String editOrderItemsDestination(){
  Map sessionAttributes=ActionContext.getContext().getSession();
  try {
    OrderItems entity=transformOrderItemToEntityBeanDestination(operationsBean);
    operationsService.updateOrderItem(entity);
  }
 catch (  Exception e) {
    log.error("String_Node_Str",e);
    return INPUT;
  }
  return SUCCESS;
}
Program: 144468
Project: 144468
Buggy source:
public String editOrderItemsOrigin(){
  try {
    OrderItems entity=transformOrderItemToEntityBeanOrigin(operationsBean);
    operationsService.updateOrderItem(entity);
    Orders orderEntity=orderService.findOrdersById(entity.getOrderId());
    Documents documentEntity=new Documents();
    Client client=clientService.findClientById(getClientId().toString());
    documentEntity.setClient(client);
    documentEntity.setDocumentName(DocumentsConstants.HOUSE_WAYBILL_ORIGIN);
    documentEntity.setReferenceId(orderEntity.getOrderId());
    documentEntity.setReferenceTable("String_Node_Str");
    documentEntity.setOrderNumber(orderEntity.getOrderNumber());
    documentEntity.setReferenceNumber(orderEntity.getOrderNumber());
    documentEntity.setCreatedDate(new Date());
    documentEntity.setDocumentStatus("String_Node_Str");
    documentEntity.setOutboundStage(1);
    documentEntity.setDocumentProcessed(0);
    documentEntity.setOrderItemId(entity.getOrderItemId());
    documentsService.addDocuments(documentEntity);
  }
 catch (  Exception e) {
    log.error("String_Node_Str",e);
    return INPUT;
  }
  return SUCCESS;
}

Fixed version (ground truth):
public String editOrderItemsOrigin(){
  try {
    OrderItems entity=transformOrderItemToEntityBeanOrigin(operationsBean);
    operationsService.updateOrderItem(entity);
    Orders orderEntity=orderService.findOrdersById(entity.getOrderId());
  }
 catch (  Exception e) {
    log.error("String_Node_Str",e);
    return INPUT;
  }
  return SUCCESS;
}
Program: 144469
Project: 144469
Buggy source:
public String updateCompleteSeaPlanning(){
  Map sessionAttributes=ActionContext.getContext().getSession();
  Integer orderId=(Integer)sessionAttributes.get("String_Node_Str");
  Orders orderEntity=orderService.findOrdersById(orderId);
  orderEntity.setOrderStatus("String_Node_Str");
  orderService.updateOrder(orderEntity);
  order=transformToOrderFormBean(orderEntity);
  List<OrderItems> orderItemsList=new ArrayList<OrderItems>();
  orderItemsList=operationsService.findAllOrderItemsByOrderId(orderId);
  for (  OrderItems orderItemsElem : orderItemsList) {
    orderItems.add(transformToOrderItemFormBean(orderItemsElem));
  }
  Documents documentEntity=new Documents();
  Client client=clientService.findClientById(getClientId().toString());
  documentEntity.setClient(client);
  documentEntity.setDocumentName(DocumentsConstants.PROFORMA_BILL_OF_LADING);
  documentEntity.setReferenceId(orderEntity.getOrderId());
  documentEntity.setReferenceTable("String_Node_Str");
  documentEntity.setOrderNumber(orderEntity.getOrderNumber());
  documentEntity.setCreatedDate(new Date());
  documentEntity.setDocumentStatus("String_Node_Str");
  documentEntity.setOutboundStage(1);
  documentEntity.setDocumentProcessed(0);
  documentsService.addDocuments(documentEntity);
  clearErrorsAndMessages();
  addActionMessage("String_Node_Str");
  return SUCCESS;
}

Fixed version (ground truth):
public String updateCompleteSeaPlanning(){
  Map sessionAttributes=ActionContext.getContext().getSession();
  Integer orderId=(Integer)sessionAttributes.get("String_Node_Str");
  Orders orderEntity=orderService.findOrdersById(orderId);
  orderEntity.setOrderStatus("String_Node_Str");
  orderService.updateOrder(orderEntity);
  order=transformToOrderFormBean(orderEntity);
  List<OrderItems> orderItemsList=new ArrayList<OrderItems>();
  orderItemsList=operationsService.findAllOrderItemsByOrderId(orderId);
  for (  OrderItems orderItemsElem : orderItemsList) {
    orderItems.add(transformToOrderItemFormBean(orderItemsElem));
  }
  return SUCCESS;
}
Program: 144478
Project: 144478
Buggy source:
public String editOrderItemsDestination(){
  Map sessionAttributes=ActionContext.getContext().getSession();
  try {
    OrderItems entity=transformOrderItemToEntityBeanDestination(operationsBean);
    Orders orderEntity=orderService.findOrdersById(entity.getOrderId());
    Documents documentEntity=new Documents();
    Client client=clientService.findClientById(getClientId().toString());
    documentEntity.setClient(client);
    documentEntity.setDocumentName(DocumentsConstants.HOUSE_WAYBILL_DESTINATION);
    documentEntity.setReferenceId(orderEntity.getOrderId());
    documentEntity.setReferenceTable("String_Node_Str");
    documentEntity.setOrderNumber(orderEntity.getOrderNumber());
    documentEntity.setCreatedDate(new Date());
    documentEntity.setDocumentStatus("String_Node_Str");
    documentEntity.setDocumentProcessed(0);
    documentsService.addDocuments(documentEntity);
    operationsService.updateOrderItem(entity);
  }
 catch (  Exception e) {
    log.error("String_Node_Str",e);
    return INPUT;
  }
  return SUCCESS;
}

Fixed version (ground truth):
public String editOrderItemsDestination(){
  Map sessionAttributes=ActionContext.getContext().getSession();
  try {
    OrderItems entity=transformOrderItemToEntityBeanDestination(operationsBean);
    Orders orderEntity=orderService.findOrdersById(entity.getOrderId());
    operationsService.updateOrderItem(entity);
  }
 catch (  Exception e) {
    log.error("String_Node_Str",e);
    return INPUT;
  }
  return SUCCESS;
}
Program: 144479
Project: 144479
Buggy source:
public String editOrderItemsOrigin(){
  try {
    OrderItems entity=transformOrderItemToEntityBeanOrigin(operationsBean);
    operationsService.updateOrderItem(entity);
    Orders orderEntity=orderService.findOrdersById(entity.getOrderId());
    Documents documentEntity=new Documents();
    Client client=clientService.findClientById(getClientId().toString());
    documentEntity.setClient(client);
    documentEntity.setDocumentName(DocumentsConstants.HOUSE_WAYBILL_ORIGIN);
    documentEntity.setReferenceId(orderEntity.getOrderId());
    documentEntity.setReferenceTable("String_Node_Str");
    documentEntity.setOrderNumber(orderEntity.getOrderNumber());
    documentEntity.setCreatedDate(new Date());
    documentEntity.setDocumentStatus("String_Node_Str");
    documentEntity.setDocumentProcessed(0);
    documentsService.addDocuments(documentEntity);
  }
 catch (  Exception e) {
    log.error("String_Node_Str",e);
    return INPUT;
  }
  return SUCCESS;
}

Fixed version (ground truth):
public String editOrderItemsOrigin(){
  try {
    OrderItems entity=transformOrderItemToEntityBeanOrigin(operationsBean);
    operationsService.updateOrderItem(entity);
    Orders orderEntity=orderService.findOrdersById(entity.getOrderId());
  }
 catch (  Exception e) {
    log.error("String_Node_Str",e);
    return INPUT;
  }
  return SUCCESS;
}
Program: 144482
Project: 144482
Buggy source:
public Driver transformToEntityBeanDriver(DriverBean driverBean){
  Driver entity=new Driver();
  Client client=clientService.findClientById(getClientId().toString());
  entity.setClient(client);
  if (driverBean.getDriverId() != null) {
    entity.setDriverId(driverBean.getDriverId());
  }
  Map sessionAttributes=ActionContext.getContext().getSession();
  entity.setVendorId(driverBean.getVendorId());
  entity.setLicenseNumber(driverBean.getLicenseNumber());
  entity.setLastName(driverBean.getLastName());
  entity.setFirstName(driverBean.getFirstName());
  entity.setMiddleName(driverBean.getMiddleName());
  entity.setTitle(driverBean.getTitle());
  entity.setStatus(driverBean.getStatus());
  entity.setCreatedBy(driverBean.getCreatedBy());
  entity.setCreatedTimestamp(driverBean.getCreatedTimeStamp());
  return entity;
}

Fixed version (ground truth):
public Driver transformToEntityBeanDriver(DriverBean driverBean){
  Driver entity=new Driver();
  Client client=clientService.findClientById(getClientId().toString());
  entity.setClient(client);
  if (driverBean.getDriverId() != null) {
    entity.setDriverId(driverBean.getDriverId());
  }
  Map sessionAttributes=ActionContext.getContext().getSession();
  entity.setVendorId(driverBean.getVendorId());
  entity.setLicenseNumber(driverBean.getLicenseNumber());
  entity.setLastName(driverBean.getLastName());
  entity.setFirstName(driverBean.getFirstName());
  entity.setMiddleName(driverBean.getMiddleName());
  entity.setTitle(driverBean.getTitle());
  entity.setStatus(driverBean.getStatus());
  entity.setCreatedBy(commonUtils.getUserNameFromSession());
  entity.setCreatedTimestamp(driverBean.getCreatedTimeStamp());
  return entity;
}
Program: 144483
Project: 144483
Buggy source:
public String checkItemStatus(){
  List<Integer> planning1=new ArrayList();
  List<Integer> planning2=new ArrayList();
  List<Integer> planning3=new ArrayList();
  System.out.println("String_Node_Str" + check.length);
  for (int i=0; i < check.length; i++) {
    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;
      }
    }
  }
  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) {
    return "String_Node_Str";
  }
 else   if (planning2.size() > 0) {
    return "String_Node_Str";
  }
 else   if (planning3.size() > 0) {
    return "String_Node_Str";
  }
  return INPUT;
}

Fixed version (ground truth):
public String checkItemStatus(){
  List<Integer> planning1=new ArrayList();
  List<Integer> planning2=new ArrayList();
  List<Integer> planning3=new ArrayList();
  if (check == null) {
    return INPUT;
  }
 else {
    for (int i=0; i < check.length; i++) {
      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;
        }
      }
    }
  }
  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) {
    return "String_Node_Str";
  }
 else   if (planning2.size() > 0) {
    return "String_Node_Str";
  }
 else   if (planning3.size() > 0) {
    return "String_Node_Str";
  }
 else {
    return INPUT;
  }
}
Program: 144484
Project: 144484
Buggy source:
public String getNotifications(){
  notificationService.CountAll();
  return SUCCESS;
}

Fixed version (ground truth):
public String getNotifications(){
  notificationService.CountAll();
  BigInteger count=notificationService.CountAll();
  System.out.println("String_Node_Str");
  byte[] bArray;
  if (count != null) {
    inputStream=new ByteArrayInputStream(count.toString().getBytes());
  }
 else {
    inputStream=new ByteArrayInputStream("String_Node_Str".getBytes());
  }
  return SUCCESS;
}
Program: 144485
Project: 144485
Buggy source:
public String customerAction(){
  List<Contacts> shipperContacts=customerService.findContactByRefIdAndType("String_Node_Str",customerID);
  for (int i=0; i < shipperContacts.size(); i++) {
    customerContactsMap.put(shipperContacts.get(i).getContactId(),shipperContacts.get(i).getFirstName() + ' ' + shipperContacts.get(i).getMiddleName()+ ' '+ shipperContacts.get(i).getLastName());
  }
  List<Address> shipperAddresses=customerService.findAddressByShipper("String_Node_Str",customerID);
  for (int i=0; i < shipperAddresses.size(); i++) {
    customerAddressMap.put(shipperAddresses.get(i).getAddressId(),shipperAddresses.get(i).getAddressLine1() + ' ' + shipperAddresses.get(i).getCity());
  }
  List<Contacts> shipperConsignee=customerService.findContactByRefIdAndType("String_Node_Str",customerID);
  for (int i=0; i < shipperConsignee.size(); i++) {
    customerConsigneeMap.put(shipperConsignee.get(i).getContactId(),shipperConsignee.get(i).getFirstName() + ' ' + shipperConsignee.get(i).getMiddleName()+ ' '+ shipperConsignee.get(i).getLastName());
  }
  List<Address> consigneeAddresses=customerService.findAddressByCriteria("String_Node_Str",customerID);
  for (int i=0; i < consigneeAddresses.size(); i++) {
    consigneeAddressMap.put(consigneeAddresses.get(i).getAddressId(),consigneeAddresses.get(i).getAddressLine1() + ' ' + consigneeAddresses.get(i).getAddressLine2()+ ' '+ consigneeAddresses.get(i).getCity());
  }
  return SUCCESS;
}

Fixed version (ground truth):
public String customerAction(){
  List<Contacts> shipperContacts=customerService.findContactByRefIdAndType("String_Node_Str",customerID);
  for (int i=0; i < shipperContacts.size(); i++) {
    customerContactsMap.put(shipperContacts.get(i).getContactId(),shipperContacts.get(i).getFirstName() + ' ' + shipperContacts.get(i).getMiddleName()+ ' '+ shipperContacts.get(i).getLastName());
  }
  List<Address> shipperAddresses=customerService.findAddressByShipper("String_Node_Str",customerID);
  for (int i=0; i < shipperAddresses.size(); i++) {
    customerAddressMap.put(shipperAddresses.get(i).getAddressId(),shipperAddresses.get(i).getAddressLine1() + ' ' + shipperAddresses.get(i).getCity());
  }
  List<Contacts> shipperConsignee=customerService.findContactByRefIdAndType("String_Node_Str",customerID);
  for (int i=0; i < shipperConsignee.size(); i++) {
    customerConsigneeMap.put(shipperConsignee.get(i).getContactId(),shipperConsignee.get(i).getFirstName() + ' ' + shipperConsignee.get(i).getMiddleName()+ ' '+ shipperConsignee.get(i).getLastName());
  }
  List<Address> consigneeAddresses=customerService.findAddressByCriteria("String_Node_Str",customerID);
  for (int i=0; i < consigneeAddresses.size(); i++) {
    consigneeAddressMap.put(consigneeAddresses.get(i).getAddressId(),consigneeAddresses.get(i).getAddressLine1() + ' ' + consigneeAddresses.get(i).getAddressLine2()+ ' '+ consigneeAddresses.get(i).getCity());
  }
  dummyMsg="String_Node_Str";
  return SUCCESS;
}
Program: 144486
Project: 144486
Buggy source:
public String updateCompleteInlandPlanning(){
  Map sessionAttributes=ActionContext.getContext().getSession();
  Integer orderId=(Integer)sessionAttributes.get("String_Node_Str");
  List<OrderItems> orderItemsList=new ArrayList<OrderItems>();
  orderItemsList=operationsService.findAllOrderItemsByOrderId(orderId);
  for (  OrderItems orderItemsElem : orderItemsList) {
    orderItems.add(transformToOrderItemFormBean(orderItemsElem));
  }
  clearErrorsAndMessages();
  addActionMessage("String_Node_Str");
  return SUCCESS;
}

Fixed version (ground truth):
public String updateCompleteInlandPlanning(){
  Map sessionAttributes=ActionContext.getContext().getSession();
  Integer orderId=(Integer)sessionAttributes.get("String_Node_Str");
  Orders orderEntity=orderService.findOrdersById(orderId);
  order=transformToOrderFormBean(orderEntity);
  List<OrderItems> orderItemsList=new ArrayList<OrderItems>();
  orderItemsList=operationsService.findAllOrderItemsByOrderId(orderId);
  for (  OrderItems orderItemsElem : orderItemsList) {
    orderItems.add(transformToOrderItemFormBean(orderItemsElem));
  }
  clearErrorsAndMessages();
  addActionMessage("String_Node_Str");
  return SUCCESS;
}
Program: 144487
Project: 144487
Buggy source:
@Override public void updateParameter(Parameters param){
  log.debug("String_Node_Str");
  try {
    Session session=getSessionFactory().getCurrentSession();
    Query query=session.createQuery("String_Node_Str");
    query.setParameter("String_Node_Str",param.getValue());
    query.setParameter("String_Node_Str",param.getValue());
    query.setParameter("String_Node_Str",param.getParameterId());
    int result=query.executeUpdate();
    log.debug("String_Node_Str");
  }
 catch (  RuntimeException re) {
    log.error("String_Node_Str",re);
    throw re;
  }
}

Fixed version (ground truth):
@Override public void updateParameter(Parameters param){
  log.debug("String_Node_Str");
  try {
    Session session=getSessionFactory().getCurrentSession();
    Query query=session.createQuery("String_Node_Str");
    query.setParameter("String_Node_Str",param.getValue().toUpperCase());
    query.setParameter("String_Node_Str",param.getValue());
    query.setParameter("String_Node_Str",param.getValue());
    query.setParameter("String_Node_Str",param.getParameterId());
    int result=query.executeUpdate();
    log.debug("String_Node_Str");
  }
 catch (  RuntimeException re) {
    log.error("String_Node_Str",re);
    throw re;
  }
}
Program: 144488
Project: 144488
Buggy source:
@Override @Transactional(propagation=Propagation.REQUIRED,readOnly=false) public void addDriver(Driver driver) throws DriverAlreadyExistsException {
  if (driverDao.findDriverByDriverCode(driver.getDriverCode()).size() > 0) {
    throw new DriverAlreadyExistsException(driver.getDriverCode());
  }
 else {
    driver.setDateHired(new Date());
    driverDao.addDriver(driver);
  }
}

Fixed version (ground truth):
@Override @Transactional(propagation=Propagation.REQUIRED,readOnly=false) public void addDriver(Driver driver) throws DriverAlreadyExistsException {
  if (driverDao.findDriverByLicense(driver.getLicenseNumber()).size() > 0) {
    throw new DriverAlreadyExistsException(driver.getDriverCode());
  }
 else {
    driver.setDateHired(new Date());
    driverDao.addDriver(driver);
  }
}
Program: 144489
Project: 144489
Buggy source:
private void addPermissionsToUser(Integer userId){
  PermissionUserGroup permissionUserGroup;
  findCurrentUserPermissions(userId);
  for (  String permissionId : preSelectedPermissions) {
    permissionUserGroup=permissionService.findPermissionUserGroup(getClientId(),getClientId(),userId,Integer.parseInt(permissionId));
    if (permissionUserGroup != null) {
      permissionService.deletePermissionOfUser(permissionUserGroup);
    }
  }
  String[] permissionIdArray=permissionsSelected.split("String_Node_Str");
  for (  String permissionId : permissionIdArray) {
    permissionUserGroup=new PermissionUserGroup();
    permissionUserGroup.setClientId(getClientId());
    permissionUserGroup.setGroupId(getClientId());
    permissionUserGroup.setUserId(userId);
    permissionUserGroup.setPermissionId(Integer.parseInt(permissionId.trim()));
    permissionService.addPermissionToUser(permissionUserGroup);
  }
}

Fixed version (ground truth):
private void addPermissionsToUser(Integer userId){
  PermissionUserGroup permissionUserGroup;
  findCurrentUserPermissions(userId);
  for (  String permissionId : preSelectedPermissions) {
    permissionUserGroup=permissionService.findPermissionUserGroup(getClientId(),getClientId(),userId,Integer.parseInt(permissionId));
    if (permissionUserGroup != null) {
      permissionService.deletePermissionOfUser(permissionUserGroup);
    }
  }
  if (permissionsSelected == null) {
    System.out.print("String_Node_Str");
  }
 else {
    String permissionId=permissionsSelected.trim();
    permissionUserGroup=new PermissionUserGroup();
    permissionUserGroup.setClientId(getClientId());
    permissionUserGroup.setGroupId(getClientId());
    permissionUserGroup.setUserId(userId);
    permissionUserGroup.setPermissionId(Integer.parseInt(permissionId));
    permissionService.addPermissionToUser(permissionUserGroup);
  }
}
Program: 144491
Project: 144491
Buggy source:
public String deleteCustomer(){
  Customer customerEntity=customerService.findCustomerByCustomerCode(customerCodeParam);
  customerService.deleteCustomer(customerEntity);
  return SUCCESS;
}

Fixed version (ground truth):
public String deleteCustomer(){
  Customer customerEntity=customerService.findCustomerByCustomerCode(customerCodeParam);
  customerService.deleteCustomer(customerEntity);
  clearErrorsAndMessages();
  addActionMessage("String_Node_Str");
  return SUCCESS;
}
Program: 144492
Project: 144492
Buggy source:
public String deleteVendor(){
  Vendor vendorEntity=vendorService.findVendorByVendorCode(vendorCodeParam);
  vendorService.deleteVendor(vendorEntity);
  clearErrorsAndMessages();
  addActionMessage("String_Node_Str");
  return SUCCESS;
}

Fixed version (ground truth):
public String deleteVendor(){
  Vendor vendorEntity=vendorService.findVendorByVendorCode(vendorCodeParam);
  vendorService.deleteVendor(vendorEntity);
  return SUCCESS;
}
Program: 144493
Project: 144493
Buggy source:
public String addOrderInfo(){
  Map sessionAttributes=ActionContext.getContext().getSession();
  Orders orderEntityForm=orderService.findOrdersById((Integer)sessionAttributes.get("String_Node_Str"));
  order=transformToOrderFormBean(orderEntityForm);
  Integer contactIdParam=orderEntityForm.getShipperContactId();
  Contacts contactEntity=customerService.findContactById(contactIdParam);
  Customer customerEntity=customerService.findCustomerById(contactEntity.getReferenceId());
  customerItems=customerService.findItemByCustomerId(customerEntity.getCustomerId());
  List<OrderItems> orderItemEntityList=orderService.findAllItemByOrderId((Integer)sessionAttributes.get("String_Node_Str"));
  for (  OrderItems orderItemElem : orderItemEntityList) {
    orderItems.add(transformToOrderItemsFormBean(orderItemElem));
  }
  sessionAttributes.put("String_Node_Str",customerItems);
  ctr=(Integer)sessionAttributes.get(ctr);
  System.out.println("String_Node_Str" + ctr);
  return SUCCESS;
}

Fixed version (ground truth):
public String addOrderInfo(){
  Map sessionAttributes=ActionContext.getContext().getSession();
  Orders orderEntityForm=orderService.findOrdersById((Integer)sessionAttributes.get("String_Node_Str"));
  order=transformToOrderFormBean(orderEntityForm);
  Integer contactIdParam=orderEntityForm.getShipperContactId();
  Contacts contactEntity=customerService.findContactById(contactIdParam);
  Customer customerEntity=customerService.findCustomerById(contactEntity.getReferenceId());
  customerItems=customerService.findItemByCustomerId(customerEntity.getCustomerId());
  List<OrderItems> orderItemEntityList=orderService.findAllItemByOrderId((Integer)sessionAttributes.get("String_Node_Str"));
  for (  OrderItems orderItemElem : orderItemEntityList) {
    orderItems.add(transformToOrderItemsFormBean(orderItemElem));
  }
  sessionAttributes.put("String_Node_Str",customerItems);
  ctr=(Integer)sessionAttributes.get("String_Node_Str");
  System.out.println("String_Node_Str" + ctr);
  return SUCCESS;
}
Program: 144495
Project: 144495
Buggy source:
public String addOrder(){
  Orders orderEntity=transformToOrderEntityBean(order);
  orderService.addOrder(orderEntity);
  orderIdPass=orderEntity.getOrderId();
  Map sessionAttributes=ActionContext.getContext().getSession();
  sessionAttributes.put("String_Node_Str",orderIdPass);
  ctr=ctr + 1;
  sessionAttributes.put("String_Node_Str",ctr);
  System.out.println("String_Node_Str" + ctr);
  return SUCCESS;
}

Fixed version (ground truth):
public String addOrder(){
  Orders orderEntity=transformToOrderEntityBean(order);
  orderService.addOrder(orderEntity);
  orderIdPass=orderEntity.getOrderId();
  Map sessionAttributes=ActionContext.getContext().getSession();
  sessionAttributes.put("String_Node_Str",orderIdPass);
  ctr=(Integer)sessionAttributes.get("String_Node_Str");
  System.out.println("String_Node_Str" + ctr);
  sessionAttributes.put("String_Node_Str",ctr);
  return SUCCESS;
}
Program: 144496
Project: 144496
Buggy source:
public String viewOrders(){
  String column=getColumnFilter();
  List<Orders> orderEntityList=new ArrayList<Orders>();
  if (StringUtils.isNotBlank(column)) {
    orderEntityList=orderService.findOrdersByCriteria(column,order.getOrderKeyword(),getClientId());
  }
 else {
    orderEntityList=orderService.findAllOrders();
  }
  for (  Orders orderElem : orderEntityList) {
    orders.add(transformToOrderFormBean(orderElem));
  }
  Map sessionAttributes=ActionContext.getContext().getSession();
  ctr=(Integer)sessionAttributes.get(ctr);
  return SUCCESS;
}

Fixed version (ground truth):
public String viewOrders(){
  String column=getColumnFilter();
  List<Orders> orderEntityList=new ArrayList<Orders>();
  if (StringUtils.isNotBlank(column)) {
    orderEntityList=orderService.findOrdersByCriteria(column,order.getOrderKeyword(),getClientId());
  }
 else {
    orderEntityList=orderService.findAllOrders();
  }
  for (  Orders orderElem : orderEntityList) {
    orders.add(transformToOrderFormBean(orderElem));
  }
  Map sessionAttributes=ActionContext.getContext().getSession();
  ctr=(Integer)sessionAttributes.get("String_Node_Str");
  System.out.println("String_Node_Str" + ctr);
  return SUCCESS;
}
Program: 144497
Project: 144497
Buggy source:
public void setAaf(String aaf){
  this.aaf=aaf;
}

Fixed version (ground truth):
public void setAaf(int aaf){
  this.aaf=aaf;
}
Program: 144498
Project: 144498
Buggy source:
@Column(name="String_Node_Str") public String getMayorsPermit(){
  return mayorsPermit;
}

Fixed version (ground truth):
@Column(name="String_Node_Str") public int getMayorsPermit(){
  return mayorsPermit;
}
Program: 144499
Project: 144499
Buggy source:
public void setMayorsPermit(String mayorsPermit){
  this.mayorsPermit=mayorsPermit;
}

Fixed version (ground truth):
public void setMayorsPermit(int mayorsPermit){
  this.mayorsPermit=mayorsPermit;
}
Program: 144500
Project: 144500
Buggy source:
public void setSignatureCard(String signatureCard){
  this.signatureCard=signatureCard;
}

Fixed version (ground truth):
public void setSignatureCard(int signatureCard){
  this.signatureCard=signatureCard;
}
Program: 144501
Project: 144501
Buggy source:
public void setDti(String dti){
  this.dti=dti;
}

Fixed version (ground truth):
public void setDti(int dti){
  this.dti=dti;
}
Program: 144502
Project: 144502
Buggy source:
@Column(name="String_Node_Str") public String getAaf(){
  return aaf;
}

Fixed version (ground truth):
@Column(name="String_Node_Str") public int getAaf(){
  return aaf;
}
Program: 144503
Project: 144503
Buggy source:
@Column(name="String_Node_Str") public String getSignatureCard(){
  return signatureCard;
}

Fixed version (ground truth):
@Column(name="String_Node_Str") public int getSignatureCard(){
  return signatureCard;
}
Program: 144504
Project: 144504
Buggy source:
@Column(name="String_Node_Str") public String getDti(){
  return dti;
}

Fixed version (ground truth):
@Column(name="String_Node_Str") public int getDti(){
  return dti;
}
Program: 144505
Project: 144505
Buggy source:
public Items(Integer customerItemsId,Client client,Integer customerId,String itemName,String itemCode,Double length,Double width,Double height,Float srp,Integer criticalQuality,Float basePrice,String note,String description,Date createdTimeStamp,String createdBy,Date modifiedTimeStamp,String modifiedBy){
  this.customerItemsId=customerItemsId;
  this.client=client;
  this.customerId=customerId;
  this.itemName=itemName;
  this.itemCode=itemCode;
  this.length=length;
  this.width=width;
  this.height=height;
  this.srp=srp;
  this.criticalQuality=criticalQuality;
  this.basePrice=basePrice;
  this.note=note;
  this.description=description;
  this.createdTimeStamp=createdTimeStamp;
  this.createdBy=createdBy;
  this.modifiedTimeStamp=modifiedTimeStamp;
  this.modifiedBy=modifiedBy;
}

Fixed version (ground truth):
public Items(Integer customerItemsId,Client client,Integer customerId,String itemName,String itemCode,Double length,Double width,Double height,Float srp,Integer criticalQuality,Float weight,String note,String description,Date createdTimeStamp,String createdBy,Date modifiedTimeStamp,String modifiedBy){
  this.customerItemsId=customerItemsId;
  this.client=client;
  this.customerId=customerId;
  this.itemName=itemName;
  this.itemCode=itemCode;
  this.length=length;
  this.width=width;
  this.height=height;
  this.srp=srp;
  this.criticalQuality=criticalQuality;
  this.weight=weight;
  this.note=note;
  this.description=description;
  this.createdTimeStamp=createdTimeStamp;
  this.createdBy=createdBy;
  this.modifiedTimeStamp=modifiedTimeStamp;
  this.modifiedBy=modifiedBy;
}
Program: 144506
Project: 144506
Buggy source:
@Column(name="String_Node_Str") public Integer getWidth(){
  return width;
}

Fixed version (ground truth):
@Column(name="String_Node_Str") public Double getWidth(){
  return width;
}
Program: 144507
Project: 144507
Buggy source:
@Column(name="String_Node_Str") public Integer getHeight(){
  return height;
}

Fixed version (ground truth):
@Column(name="String_Node_Str") public Double getHeight(){
  return height;
}
Program: 144508
Project: 144508
Buggy source:
public Items(Integer customerItemsId,Client client,Integer customerId,String itemName,String itemCode,Integer length,Integer width,Integer height,Float srp,Integer criticalQuality,Float basePrice,String note,String description,Date createdTimeStamp,String createdBy,Date modifiedTimeStamp,String modifiedBy){
  this.customerItemsId=customerItemsId;
  this.client=client;
  this.customerId=customerId;
  this.itemName=itemName;
  this.itemCode=itemCode;
  this.length=length;
  this.width=width;
  this.height=height;
  this.srp=srp;
  this.criticalQuality=criticalQuality;
  this.basePrice=basePrice;
  this.note=note;
  this.description=description;
  this.createdTimeStamp=createdTimeStamp;
  this.createdBy=createdBy;
  this.modifiedTimeStamp=modifiedTimeStamp;
  this.modifiedBy=modifiedBy;
}

Fixed version (ground truth):
public Items(Integer customerItemsId,Client client,Integer customerId,String itemName,String itemCode,Double length,Double width,Double height,Float srp,Integer criticalQuality,Float basePrice,String note,String description,Date createdTimeStamp,String createdBy,Date modifiedTimeStamp,String modifiedBy){
  this.customerItemsId=customerItemsId;
  this.client=client;
  this.customerId=customerId;
  this.itemName=itemName;
  this.itemCode=itemCode;
  this.length=length;
  this.width=width;
  this.height=height;
  this.srp=srp;
  this.criticalQuality=criticalQuality;
  this.basePrice=basePrice;
  this.note=note;
  this.description=description;
  this.createdTimeStamp=createdTimeStamp;
  this.createdBy=createdBy;
  this.modifiedTimeStamp=modifiedTimeStamp;
  this.modifiedBy=modifiedBy;
}
Program: 144509
Project: 144509
Buggy source:
public void setWidth(Integer width){
  this.width=width;
}

Fixed version (ground truth):
public void setWidth(Double width){
  this.width=width;
}
Program: 144510
Project: 144510
Buggy source:
public void setHeight(Integer height){
  this.height=height;
}

Fixed version (ground truth):
public void setHeight(Double height){
  this.height=height;
}
Program: 144511
Project: 144511
Buggy source:
public void setLength(Integer length){
  this.length=length;
}

Fixed version (ground truth):
public void setLength(Double length){
  this.length=length;
}
Program: 144512
Project: 144512
Buggy source:
@Column(name="String_Node_Str") public Integer getLength(){
  return length;
}

Fixed version (ground truth):
@Column(name="String_Node_Str") public Double getLength(){
  return length;
}
Program: 144513
Project: 144513
Buggy source:
private Items initItem(){
  Client client=new Client("String_Node_Str",new Date(),"String_Node_Str",new Date(),"String_Node_Str");
  Items item=new Items();
  item.setClient(client);
  item.setCustomerId(6);
  item.setItemName("String_Node_Str");
  item.setItemCode("String_Node_Str");
  item.setLength(2);
  item.setWidth(2);
  item.setLength(2);
  item.setSrp(2.00F);
  item.setCriticalQuality(2);
  item.setBasePrice(2.00F);
  item.setNote("String_Node_Str");
  item.setDescription("String_Node_Str");
  return item;
}

Fixed version (ground truth):
private Items initItem(){
  Client client=new Client("String_Node_Str",new Date(),"String_Node_Str",new Date(),"String_Node_Str");
  Items item=new Items();
  item.setClient(client);
  item.setCustomerId(6);
  item.setItemName("String_Node_Str");
  item.setItemCode("String_Node_Str");
  item.setLength(2.0);
  item.setWidth(2.0);
  item.setLength(2.0);
  item.setSrp(2.00F);
  item.setCriticalQuality(2);
  item.setBasePrice(2.00F);
  item.setNote("String_Node_Str");
  item.setDescription("String_Node_Str");
  return item;
}
Program: 144515
Project: 144515
Buggy source:
public ItemBean(Integer customerItemsId,Integer customerId,String itemName,String itemCode,Integer length,Integer width,Integer height,Float srp,Integer criticalQuality,Float basePrice,String note,String description,Date createdTimeStamp,String createdBy,Date modifiedTimeStamp,String modifiedBy){
  this.customerItemsId=customerItemsId;
  this.customerId=customerId;
  this.itemName=itemName;
  this.itemCode=itemCode;
  this.length=length;
  this.width=width;
  this.height=height;
  this.srp=srp;
  this.criticalQuality=criticalQuality;
  this.basePrice=basePrice;
  this.note=note;
  this.description=description;
  this.createdTimeStamp=createdTimeStamp;
  this.createdBy=createdBy;
  this.modifiedTimeStamp=modifiedTimeStamp;
  this.modifiedBy=modifiedBy;
}

Fixed version (ground truth):
public ItemBean(Integer customerItemsId,Integer customerId,String itemName,String itemCode,Double length,Double width,Double height,Float srp,Integer criticalQuality,Float basePrice,String note,String description,Date createdTimeStamp,String createdBy,Date modifiedTimeStamp,String modifiedBy){
  this.customerItemsId=customerItemsId;
  this.customerId=customerId;
  this.itemName=itemName;
  this.itemCode=itemCode;
  this.length=length;
  this.width=width;
  this.height=height;
  this.srp=srp;
  this.criticalQuality=criticalQuality;
  this.basePrice=basePrice;
  this.note=note;
  this.description=description;
  this.createdTimeStamp=createdTimeStamp;
  this.createdBy=createdBy;
  this.modifiedTimeStamp=modifiedTimeStamp;
  this.modifiedBy=modifiedBy;
}
Program: 144516
Project: 144516
Buggy source:
public Integer getWidth(){
  return width;
}

Fixed version (ground truth):
public Double getWidth(){
  return width;
}
Program: 144517
Project: 144517
Buggy source:
public Integer getHeight(){
  return height;
}

Fixed version (ground truth):
public Double getHeight(){
  return height;
}
Program: 144518
Project: 144518
Buggy source:
public void setWidth(Integer width){
  this.width=width;
}

Fixed version (ground truth):
public void setWidth(Double width){
  this.width=width;
}
Program: 144519
Project: 144519
Buggy source:
public void setHeight(Integer height){
  this.height=height;
}

Fixed version (ground truth):
public void setHeight(Double height){
  this.height=height;
}
Program: 144520
Project: 144520
Buggy source:
public void setLength(Integer length){
  this.length=length;
}

Fixed version (ground truth):
public void setLength(Double length){
  this.length=length;
}
Program: 144521
Project: 144521
Buggy source:
public Integer getLength(){
  return length;
}

Fixed version (ground truth):
public Double getLength(){
  return length;
}
Program: 144522
Project: 144522
Buggy source:
public Map<Integer,Integer> getShipperItemVolumeMap(){
  return shipperItemVolumeMap;
}

Fixed version (ground truth):
public Map<Double,Double> getShipperItemVolumeMap(){
  return shipperItemVolumeMap;
}
Program: 144523
Project: 144523
Buggy source:
private Contacts transformToEntityBeanContacts(ContactBean contactBean){
  Contacts entity=new Contacts();
  Client client=clientService.findClientById(getClientId().toString());
  entity.setClient(client);
  if (contactBean.getContactId() != null) {
    entity.setContactId(contactBean.getContactId());
  }
  entity.setReferenceId(contactBean.getReferenceId());
  entity.setReferenceTable("String_Node_Str");
  entity.setContactType(contactBean.getContactType());
  entity.setFirstName(contactBean.getFirstName());
  entity.setMiddleName(contactBean.getMiddleName());
  entity.setLastName(contactBean.getLastName());
  entity.setPhone(contactBean.getPhone());
  entity.setMobile(contactBean.getMobile());
  entity.setFax(contactBean.getFax());
  entity.setEmail(contactBean.getEmail());
  entity.setCreatedBy(contactBean.getCreatedBy());
  entity.setCreatedTimestamp(contactBean.getCreatedTimestamp());
  entity.setPosition(contactBean.getPosition());
  return entity;
}

Fixed version (ground truth):
private Contacts transformToEntityBeanContacts(ContactBean contactBean){
  Contacts entity=new Contacts();
  Client client=clientService.findClientById(getClientId().toString());
  entity.setClient(client);
  if (contactBean.getContactId() != null) {
    entity.setContactId(contactBean.getContactId());
  }
  entity.setReferenceId(contactBean.getReferenceId());
  entity.setReferenceTable("String_Node_Str");
  entity.setContactType("String_Node_Str");
  entity.setFirstName(contactBean.getFirstName());
  entity.setMiddleName(contactBean.getMiddleName());
  entity.setLastName(contactBean.getLastName());
  entity.setPhone(contactBean.getPhone());
  entity.setMobile(contactBean.getMobile());
  entity.setFax(contactBean.getFax());
  entity.setEmail(contactBean.getEmail());
  entity.setCreatedBy(contactBean.getCreatedBy());
  entity.setCreatedTimestamp(contactBean.getCreatedTimestamp());
  entity.setPosition(contactBean.getPosition());
  return entity;
}
Program: 144524
Project: 144524
Buggy source:
public void setShipperItemVolumeMap(Map<Integer,Integer> shipperItemVolumeMap){
  this.shipperItemVolumeMap=shipperItemVolumeMap;
}

Fixed version (ground truth):
public void setShipperItemVolumeMap(Map<Double,Double> shipperItemVolumeMap){
  this.shipperItemVolumeMap=shipperItemVolumeMap;
}