Program: 144540
Project: 144540
Buggy source:
private OrderBean transformToOrderFormBean(Orders order){
  OrderBean orderBean=new OrderBean();
  orderBean.setOrderId(order.getOrderId());
  orderBean.setOrderNumber(order.getOrderNumber());
  orderBean.setFreightType(order.getServiceType());
  orderBean.setModeOfService(order.getServiceMode());
  orderBean.setNotifyBy(order.getNotificationType());
  orderBean.setOrderDate(order.getOrderDate());
  orderBean.setModeOfPayment(order.getPaymentMode());
  orderBean.setComments(order.getComments());
  orderBean.setOrderStatus(order.getOrderStatus());
  orderBean.setShipperCode(order.getVendorCode());
  orderBean.setTruckCode(order.getTruckCode());
  orderBean.setTrailerCode(order.getTrailerCode());
  orderBean.setDriverCode(order.getDriverCode());
  orderBean.setVesselNumber(order.getVesselNumber());
  orderBean.setShipperAddressId(order.getShipperAddressId());
  orderBean.setShipperContactId(order.getShipperContactId());
  Contacts shipperContactName=customerService.findContactById(order.getShipperContactId());
  orderBean.setShipperContactName(getFullName(shipperContactName.getLastName(),shipperContactName.getFirstName(),shipperContactName.getMiddleName()));
  orderBean.setConsigneeAddressId(order.getConsigneeAddressId());
  orderBean.setConsigneeContactId(order.getConsigneeContactId());
  Contacts consigneeContactName=customerService.findContactById(order.getConsigneeContactId());
  orderBean.setConsigneeName(getFullName(consigneeContactName.getLastName(),consigneeContactName.getFirstName(),consigneeContactName.getMiddleName()));
  orderBean.setAccountRep(order.getAccountRep());
  orderBean.setCreatedTimestamp(order.getCreatedTimestamp());
  orderBean.setCreatedBy(order.getCreatedBy());
  orderBean.setModifiedTimestamp(order.getModifiedTimestamp());
  orderBean.setModifiedBy(order.getModifiedBy());
  orderBean.setPickupDate(order.getPickupDate());
  orderBean.setOriginationPort(order.getOriginationPort());
  orderBean.setDeliveryDate(order.getDeliveryDate());
  orderBean.setDestinationPort(order.getDestinationPort());
  orderBean.setRates(order.getRates());
  orderBean.setServiceRequirement(order.getServiceRequirement());
  orderBean.setModeOfService(order.getServiceMode());
  Contacts contactShipperName=customerService.findContactById(order.getShipperContactId());
  Customer shipperName=customerService.findCustomerById(contactShipperName.getReferenceId());
  if (shipperName != null) {
    orderBean.setCustomerId(shipperName.getCustomerId());
    orderBean.setCustomerName(shipperName.getCustomerName());
  }
 else {
    orderBean.setCustomerId(0);
    orderBean.setCustomerName("String_Node_Str");
  }
  orderBean.setPickupDate(order.getPickupDate());
  orderBean.setDeliveryDate(order.getDeliveryDate());
  Contacts contacts=customerService.findContactById(order.getShipperContactId());
  contact=new ContactBean();
  contact.setName(getFullName(contacts.getLastName(),contacts.getFirstName(),contacts.getMiddleName()));
  contact.setPhone(contacts.getPhone());
  contact.setEmail(contacts.getEmail());
  contact.setFax(contacts.getFax());
  contact.setMobile(contacts.getMobile());
  orderBean.setShipperInfoContact(contact);
  System.out.println("String_Node_Str" + order.getShipperAddressId());
  if (order.getShipperAddressId() != null) {
    Address addresses=customerService.findAddressById(order.getShipperAddressId());
    address=new AddressBean();
    address.setAddress(getAddress(addresses));
    orderBean.setShipperInfoAddress(address);
  }
 else {
    address=new AddressBean();
    address.setAddress("String_Node_Str");
    orderBean.setShipperInfoAddress(address);
  }
  Contacts consigneeContact=customerService.findContactById(order.getConsigneeContactId());
  contact=new ContactBean();
  contact.setName(getFullName(consigneeContact.getLastName(),consigneeContact.getFirstName(),consigneeContact.getMiddleName()));
  contact.setPhone(consigneeContact.getPhone());
  contact.setEmail(consigneeContact.getEmail());
  contact.setFax(consigneeContact.getFax());
  contact.setMobile(consigneeContact.getMobile());
  orderBean.setConsigneeInfoContact(contact);
  if (order.getConsigneeAddressId() != null) {
    Address consigneeAddress=customerService.findAddressById(order.getConsigneeAddressId());
    address=new AddressBean();
    address.setAddress(getAddress(consigneeAddress));
    orderBean.setConsigneeInfoAddress(address);
  }
 else {
    address=new AddressBean();
    address.setAddress("String_Node_Str");
    orderBean.setConsigneeInfoAddress(address);
  }
  return orderBean;
}

Fixed version (ground truth):
private OrderBean transformToOrderFormBean(Orders order){
  OrderBean orderBean=new OrderBean();
  orderBean.setOrderId(order.getOrderId());
  orderBean.setOrderNumber(order.getOrderNumber());
  orderBean.setFreightType(order.getServiceType());
  orderBean.setModeOfService(order.getServiceMode());
  orderBean.setNotifyBy(order.getNotificationType());
  orderBean.setOrderDate(order.getOrderDate());
  orderBean.setModeOfPayment(order.getPaymentMode());
  orderBean.setComments(order.getComments());
  orderBean.setOrderStatus(order.getOrderStatus());
  orderBean.setShipperCode(order.getVendorCode());
  orderBean.setTruckCode(order.getTruckCode());
  orderBean.setTrailerCode(order.getTrailerCode());
  orderBean.setDriverCode(order.getDriverCode());
  orderBean.setVesselNumber(order.getVesselNumber());
  orderBean.setShipperAddressId(order.getShipperAddressId());
  orderBean.setShipperContactId(order.getShipperContactId());
  Contacts shipperContactName=customerService.findContactById(order.getShipperContactId());
  orderBean.setShipperContactName(getFullName(shipperContactName.getLastName(),shipperContactName.getFirstName(),shipperContactName.getMiddleName()));
  orderBean.setConsigneeAddressId(order.getConsigneeAddressId());
  orderBean.setConsigneeContactId(order.getConsigneeContactId());
  Contacts consigneeContactName=customerService.findContactById(order.getConsigneeContactId());
  orderBean.setConsigneeName(getFullName(consigneeContactName.getLastName(),consigneeContactName.getFirstName(),consigneeContactName.getMiddleName()));
  orderBean.setAccountRep(order.getAccountRep());
  orderBean.setCreatedTimestamp(order.getCreatedTimestamp());
  orderBean.setCreatedBy(order.getCreatedBy());
  orderBean.setModifiedTimestamp(order.getModifiedTimestamp());
  orderBean.setModifiedBy(order.getModifiedBy());
  orderBean.setPickupDate(order.getPickupDate());
  orderBean.setOriginationPort(order.getOriginationPort());
  orderBean.setDeliveryDate(order.getDeliveryDate());
  orderBean.setDestinationPort(order.getDestinationPort());
  orderBean.setRates(order.getRates());
  orderBean.setServiceRequirement(order.getServiceRequirement());
  orderBean.setModeOfService(order.getServiceMode());
  Contacts contactShipperName=customerService.findContactById(order.getShipperContactId());
  Customer shipperName=customerService.findCustomerById(contactShipperName.getReferenceId());
  if (shipperName != null) {
    orderBean.setCustomerId(shipperName.getCustomerId());
    orderBean.setCustomerName(shipperName.getCustomerName());
  }
 else {
    orderBean.setCustomerId(0);
    orderBean.setCustomerName("String_Node_Str");
  }
  orderBean.setPickupDate(order.getPickupDate());
  orderBean.setDeliveryDate(order.getDeliveryDate());
  Contacts contacts=customerService.findContactById(order.getShipperContactId());
  contact=new ContactBean();
  contact.setName(getFullName(contacts.getLastName(),contacts.getFirstName(),contacts.getMiddleName()));
  contact.setPhone(contacts.getPhone());
  contact.setEmail(contacts.getEmail());
  contact.setFax(contacts.getFax());
  contact.setMobile(contacts.getMobile());
  orderBean.setShipperInfoContact(contact);
  if (order.getShipperAddressId() != null) {
    Address addresses=customerService.findAddressById(order.getShipperAddressId());
    address=new AddressBean();
    address.setAddress(getAddress(addresses));
    orderBean.setShipperInfoAddress(address);
  }
 else {
    address=new AddressBean();
    address.setAddress("String_Node_Str");
    orderBean.setShipperInfoAddress(address);
  }
  Contacts consigneeContact=customerService.findContactById(order.getConsigneeContactId());
  contact=new ContactBean();
  contact.setName(getFullName(consigneeContact.getLastName(),consigneeContact.getFirstName(),consigneeContact.getMiddleName()));
  contact.setPhone(consigneeContact.getPhone());
  contact.setEmail(consigneeContact.getEmail());
  contact.setFax(consigneeContact.getFax());
  contact.setMobile(consigneeContact.getMobile());
  orderBean.setConsigneeInfoContact(contact);
  if (order.getConsigneeAddressId() != null) {
    Address consigneeAddress=customerService.findAddressById(order.getConsigneeAddressId());
    address=new AddressBean();
    address.setAddress(getAddress(consigneeAddress));
    orderBean.setConsigneeInfoAddress(address);
  }
 else {
    address=new AddressBean();
    address.setAddress("String_Node_Str");
    orderBean.setConsigneeInfoAddress(address);
  }
  return orderBean;
}