Program: 144373
Project: 144373
Buggy source:
public OrderBean transformToOrderFormBean(Orders entity){
  OrderBean formBean=new OrderBean();
  formBean.setOrderNumber(entity.getOrderNumber());
  Contacts shipperContactName=customerService.findContactById(entity.getShipperContactId());
  Customer customerName=customerService.findCustomerById(shipperContactName.getReferenceId());
  formBean.setCustomerName((customerName.getCustomerName()));
  formBean.setServiceRequirement(entity.getServiceRequirement());
  formBean.setModeOfService(entity.getServiceMode());
  Contacts consigneeName=customerService.findContactById(entity.getConsigneeContactId());
  formBean.setConsigneeCode(getFullName(consigneeName.getLastName(),consigneeName.getFirstName(),consigneeName.getMiddleName()));
  formBean.setOrderId(entity.getOrderId());
  formBean.setOrderStatus(entity.getOrderStatus());
  formBean.setFreightType(entity.getServiceType());
  formBean.setOriginationPort(entity.getOriginationPort());
  formBean.setModeOfPayment(entity.getPaymentMode());
  formBean.setNotifyBy(entity.getNotificationType());
  formBean.setBookingDate(entity.getOrderDate());
  formBean.setDestinationPort(entity.getDestinationPort());
  formBean.setRates(entity.getRates());
  formBean.setComments(entity.getComments());
  formBean.setPickupDate(entity.getPickupDate());
  formBean.setDeliveryDate(entity.getDeliveryDate());
  formBean.setAging(entity.getAging());
  Contacts contactShipperName=customerService.findContactById(entity.getShipperContactId());
  Customer shipperName=customerService.findCustomerById(contactShipperName.getReferenceId());
  if (shipperName != null) {
    formBean.setCustomerId(shipperName.getCustomerId());
    formBean.setCustomerName(shipperName.getCustomerName());
  }
  Contacts contacts=customerService.findContactById(entity.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());
  formBean.setShipperInfoContact(contact);
  if (order.getShipperAddressId() != null && !"String_Node_Str".equals(order.getShipperAddressId())) {
    Address addresses=customerService.findAddressById(entity.getShipperAddressId());
    address=new AddressBean();
    address.setAddress(getAddress(addresses));
    formBean.setShipperInfoAddress(address);
  }
 else {
    address=new AddressBean();
    address.setAddress("String_Node_Str");
    formBean.setShipperInfoAddress(address);
  }
  Contacts consigneeContact=customerService.findContactById(entity.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());
  formBean.setConsigneeInfoContact(contact);
  if (order.getConsigneeAddressId() != null && !"String_Node_Str".equals(order.getConsigneeAddressId())) {
    Address consigneeAddress=customerService.findAddressById(entity.getConsigneeAddressId());
    address=new AddressBean();
    address.setAddress(getAddress(consigneeAddress));
    formBean.setConsigneeInfoAddress(address);
  }
 else {
    address=new AddressBean();
    address.setAddress("String_Node_Str");
    formBean.setConsigneeInfoAddress(address);
  }
  return formBean;
}

Fixed version (ground truth):
public OrderBean transformToOrderFormBean(Orders entity){
  OrderBean formBean=new OrderBean();
  formBean.setOrderNumber(entity.getOrderNumber());
  Contacts shipperContactName=customerService.findContactById(entity.getShipperContactId());
  Customer customerName=customerService.findCustomerById(shipperContactName.getReferenceId());
  formBean.setCustomerName((customerName.getCustomerName()));
  formBean.setServiceRequirement(entity.getServiceRequirement());
  formBean.setModeOfService(entity.getServiceMode());
  Contacts consigneeName=customerService.findContactById(entity.getConsigneeContactId());
  formBean.setConsigneeCode(getFullName(consigneeName.getLastName(),consigneeName.getFirstName(),consigneeName.getMiddleName()));
  formBean.setOrderId(entity.getOrderId());
  formBean.setOrderStatus(entity.getOrderStatus());
  formBean.setFreightType(entity.getServiceType());
  formBean.setModeOfPayment(entity.getPaymentMode());
  formBean.setNotifyBy(entity.getNotificationType());
  formBean.setBookingDate(entity.getOrderDate());
  formBean.setRates(entity.getRates());
  formBean.setComments(entity.getComments());
  formBean.setAging(entity.getAging());
  if (entity.getOriginationPort() != null) {
    formBean.setOriginationPort(entity.getOriginationPort());
  }
 else   if (entity.getServiceMode().equals("String_Node_Str")) {
    formBean.setOriginationPort("String_Node_Str");
  }
 else {
    formBean.setOriginationPort("String_Node_Str");
  }
  if (entity.getDestinationPort() != null) {
    formBean.setDestinationPort(entity.getDestinationPort());
  }
 else   if (entity.getServiceMode().equals("String_Node_Str")) {
    formBean.setDestinationPort("String_Node_Str");
  }
 else {
    formBean.setDestinationPort("String_Node_Str");
  }
  SimpleDateFormat formatter=new SimpleDateFormat("String_Node_Str");
  if (entity.getPickupDate() != null) {
    formBean.setStrPickupDate(formatter.format(entity.getPickupDate()));
  }
 else   if (entity.getServiceMode().equals("String_Node_Str")) {
    formBean.setStrPickupDate("String_Node_Str");
  }
 else {
    formBean.setStrPickupDate("String_Node_Str");
  }
  if (entity.getDeliveryDate() != null) {
    formBean.setStrDeliveryDate(formatter.format(entity.getDeliveryDate()));
  }
 else   if (entity.getServiceMode().equals("String_Node_Str")) {
    formBean.setStrDeliveryDate("String_Node_Str");
  }
 else {
    formBean.setStrDeliveryDate("String_Node_Str");
  }
  Contacts contactShipperName=customerService.findContactById(entity.getShipperContactId());
  Customer shipperName=customerService.findCustomerById(contactShipperName.getReferenceId());
  if (shipperName != null) {
    formBean.setCustomerId(shipperName.getCustomerId());
    formBean.setCustomerName(shipperName.getCustomerName());
  }
  Contacts contacts=customerService.findContactById(entity.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());
  formBean.setShipperInfoContact(contact);
  if (entity.getShipperAddressId() != null && !"String_Node_Str".equals(entity.getShipperAddressId())) {
    Address addresses=customerService.findAddressById(entity.getShipperAddressId());
    address=new AddressBean();
    address.setAddress(getAddress(addresses));
    formBean.setShipperInfoAddress(address);
  }
 else {
    address=new AddressBean();
    address.setAddress("String_Node_Str");
    formBean.setShipperInfoAddress(address);
  }
  Contacts consigneeContact=customerService.findContactById(entity.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());
  formBean.setConsigneeInfoContact(contact);
  if (entity.getConsigneeAddressId() != null && !"String_Node_Str".equals(entity.getConsigneeAddressId())) {
    Address consigneeAddress=customerService.findAddressById(entity.getConsigneeAddressId());
    address=new AddressBean();
    address.setAddress(getAddress(consigneeAddress));
    formBean.setConsigneeInfoAddress(address);
  }
 else {
    address=new AddressBean();
    address.setAddress("String_Node_Str");
    formBean.setConsigneeInfoAddress(address);
  }
  return formBean;
}