nus-yam/ex-repair huggingface dataset:
Program: 144574
Project: 144574
Buggy source:
@Override @Transactional(propagation=Propagation.REQUIRED,readOnly=false) public void addContact(Contacts contacts) throws ContactAlreadyExistsException {
  if (contactsDao.findDuplicateContactByNameAndId(contacts.getLastName(),contacts.getFirstName(),contacts.getContactId(),contacts.getReferenceId()).size() > 0)   throw new ContactAlreadyExistsException(contacts.getLastName());
 else   contactsDao.addContact(contacts);
}

Fixed version (ground truth):
@Override @Transactional(propagation=Propagation.REQUIRED,readOnly=false) public void addContact(Contacts contacts) throws ContactAlreadyExistsException {
  if (contactsDao.findContactByLastNameAndFirstName(contacts.getLastName(),contacts.getFirstName()).size() > 0)   throw new ContactAlreadyExistsException(contacts.getLastName());
 else   contactsDao.addContact(contacts);
}
Program: 144575
Project: 144575
Buggy source:
@Override @Transactional(propagation=Propagation.REQUIRED,readOnly=false) public void updateContact(Contacts contacts){
  if (contactsDao.findDuplicateContactByLastName(contacts.getLastName(),contacts.getContactId()).size() > 0) {
    System.out.print(contacts.getLastName() + "String_Node_Str" + contacts.getContactId());
    throw new ContactAlreadyExistsException(contacts.getLastName());
  }
 else {
    contactsDao.updateContact(contacts);
  }
}

Fixed version (ground truth):
@Override @Transactional(propagation=Propagation.REQUIRED,readOnly=false) public void updateContact(Contacts contacts){
  List<Contacts> contactList=new ArrayList<Contacts>();
  Map<String,Object> paramMap=new HashMap<String,Object>();
  paramMap.put("String_Node_Str",contacts.getFirstName());
  paramMap.put("String_Node_Str",contacts.getLastName());
  paramMap.put("String_Node_Str",contacts.getReferenceId());
  paramMap.put("String_Node_Str",contacts.getContactType());
  contactList=contactsDao.findContactsByParameterMap(paramMap,"String_Node_Str");
  if (contactList != null && contactList.size() > 0)   throw new ContactAlreadyExistsException(contacts.getLastName());
 else   contactsDao.updateContact(contacts);
}
Program: 144576
Project: 144576
Buggy source:
@Override @Transactional(propagation=Propagation.REQUIRED,readOnly=false) public void updateTrucks(Trucks trucks){
  trucksDao.updateTrucks(trucks);
}

Fixed version (ground truth):
@Override @Transactional(propagation=Propagation.REQUIRED,readOnly=false) public void updateTrucks(Trucks trucks) throws TrucksAlreadyExistsException {
  if (trucksDao.findTrucksByTruckCode(trucks.getTruckCode()).size() > 0) {
    throw new TrucksAlreadyExistsException(trucks.getTruckCode());
  }
 else {
    trucksDao.updateTrucks(trucks);
  }
}
Program: 144577
Project: 144577
Buggy source:
@Override @Transactional(propagation=Propagation.REQUIRED,readOnly=false) public void updateContact(Contacts contacts){
  List<Contacts> contactList=new ArrayList<Contacts>();
  Map<String,Object> paramMap=new HashMap<String,Object>();
  paramMap.put("String_Node_Str",contacts.getFirstName());
  paramMap.put("String_Node_Str",contacts.getLastName());
  paramMap.put("String_Node_Str",contacts.getReferenceId());
  paramMap.put("String_Node_Str",contacts.getContactType());
  contactList=contactsDao.findContactsByParameterMap(paramMap,"String_Node_Str");
  if (contactList != null && contactList.size() > 0)   throw new ContactAlreadyExistsException(contacts.getLastName());
 else   contactsDao.updateContact(contacts);
}

Fixed version (ground truth):
@Override @Transactional(propagation=Propagation.REQUIRED,readOnly=false) public void updateContact(Contacts contacts) throws ContactAlreadyExistsException {
  List<Contacts> contactList=new ArrayList<Contacts>();
  Map<String,Object> paramMap=new HashMap<String,Object>();
  paramMap.put("String_Node_Str",contacts.getFirstName());
  paramMap.put("String_Node_Str",contacts.getLastName());
  paramMap.put("String_Node_Str",contacts.getReferenceId());
  paramMap.put("String_Node_Str",contacts.getContactType());
  contactList=contactsDao.findContactsByParameterMap(paramMap,"String_Node_Str");
  if (contactList != null && contactList.size() > 0)   throw new ContactAlreadyExistsException(contacts.getLastName());
 else   contactsDao.updateContact(contacts);
}
Program: 144578
Project: 144578
Buggy source:
@Override @Transactional(propagation=Propagation.REQUIRED,readOnly=false) public void updateContact(Contacts contacts){
  contactsDao.updateContact(contacts);
}

Fixed version (ground truth):
@Override @Transactional(propagation=Propagation.REQUIRED,readOnly=false) public void updateContact(Contacts contacts) throws ContactAlreadyExistsException {
  List<Contacts> contactList=new ArrayList<Contacts>();
  Map<String,Object> paramMap=new HashMap<String,Object>();
  paramMap.put("String_Node_Str",contacts.getFirstName());
  paramMap.put("String_Node_Str",contacts.getLastName());
  paramMap.put("String_Node_Str",contacts.getReferenceId());
  paramMap.put("String_Node_Str",contacts.getContactType());
  contactList=contactsDao.findContactsByParameterMap(paramMap,"String_Node_Str");
  if (contactList != null && contactList.size() > 0)   throw new ContactAlreadyExistsException(contacts.getLastName());
 else   contactsDao.updateContact(contacts);
}
Program: 144579
Project: 144579
Buggy source:
@Override @Transactional(propagation=Propagation.REQUIRED,readOnly=false) public void addContact(Contacts contacts){
  contactsDao.addContact(contacts);
}

Fixed version (ground truth):
@Override @Transactional(propagation=Propagation.REQUIRED,readOnly=false) public void addContact(Contacts contacts) throws ContactAlreadyExistsException {
  List<Contacts> contactList=new ArrayList<Contacts>();
  Map<String,Object> paramMap=new HashMap<String,Object>();
  paramMap.put("String_Node_Str",contacts.getFirstName());
  paramMap.put("String_Node_Str",contacts.getLastName());
  paramMap.put("String_Node_Str",contacts.getReferenceId());
  paramMap.put("String_Node_Str",contacts.getContactType());
  contactList=contactsDao.findContactsByParameterMap(paramMap,"String_Node_Str");
  if (contactList != null && contactList.size() > 0)   throw new ContactAlreadyExistsException(contacts.getLastName());
 else   contactsDao.addContact(contacts);
}
Program: 144580
Project: 144580
Buggy source:
@Override @Transactional(propagation=Propagation.REQUIRED,readOnly=false) public void updateDriver(Driver driver){
  driverDao.updateDriver(driver);
}

Fixed version (ground truth):
@Override @Transactional(propagation=Propagation.REQUIRED,readOnly=false) public void updateDriver(Driver driver) throws DriverAlreadyExistsException {
  if (driverDao.findDriverByDriverCode(driver.getDriverCode()).size() > 0) {
    throw new DriverAlreadyExistsException(driver.getDriverCode());
  }
 else {
    driver.setDateHired(new Date());
    driverDao.updateDriver(driver);
  }
}
Program: 144581
Project: 144581
Buggy source:
@Override @Transactional(propagation=Propagation.REQUIRED,readOnly=false) public void addDriver(Driver driver) throws DriverAlreadyExistsException {
  if (driverDao.findDriverByLastName(driver.getLastName()).size() > 0)   throw new DriverAlreadyExistsException(driver.getLastName());
 else   driverDao.addDriver(driver);
}

Fixed version (ground truth):
@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);
  }
}
Program: 144582
Project: 144582
Buggy source:
public String loadEditOrder(){
  Orders orderEntity=orderService.findOrdersById(orderIdParam);
  order=transformToOrderFormBean(orderEntity);
  return SUCCESS;
}

Fixed version (ground truth):
public String loadEditOrder(){
  Orders orderEntity=orderService.findOrdersById(orderIdParam);
  order=transformToFormBeanOrder(orderEntity);
  return SUCCESS;
}
Program: 144583
Project: 144583
Buggy source:
public String customerInfo(){
  Customer customerEntity=customerService.findCustomerByCustomerCode(customerCodeParam);
  customer=transformToFormBean(customerEntity);
  Map sessionAttributes=ActionContext.getContext().getSession();
  sessionAttributes.put("String_Node_Str",customer.getCustomerId());
  return SUCCESS;
}

Fixed version (ground truth):
public String customerInfo(){
  Customer customerEntity=new Customer();
  if (!StringUtils.isBlank(customerCodeParam))   customerEntity=customerService.findCustomerByCustomerCode(customerCodeParam);
 else   customerEntity=customerService.findCustomerById(getCustomerSessionId());
  customer=transformToFormBean(customerEntity);
  Map sessionAttributes=ActionContext.getContext().getSession();
  sessionAttributes.put("String_Node_Str",customer.getCustomerId());
  return SUCCESS;
}
Program: 144584
Project: 144584
Buggy source:
public String customerEditExecute(){
  validateOnSubmit(customer);
  if (hasActionErrors())   return INPUT;
  customerService.updateCustomer(transformToEntityBean(customer));
  clearErrorsAndMessages();
  addActionMessage("String_Node_Str");
  return SUCCESS;
}

Fixed version (ground truth):
public String customerEditExecute(){
  validateOnSubmit(customer);
  if (hasActionErrors()) {
    return INPUT;
  }
  try {
    Customer customerEntity=transformToEntityBean(customer);
    customerEntity.setModifiedBy(commonUtils.getUserNameFromSession());
    customerService.updateCustomer(customerEntity);
  }
 catch (  CustomerAlreadyExistsException e) {
    addFieldError("String_Node_Str",getText("String_Node_Str"));
    return INPUT;
  }
  clearErrorsAndMessages();
  addActionMessage("String_Node_Str");
  return SUCCESS;
}
Program: 144585
Project: 144585
Buggy source:
public String loadSaveCompleteContacts(){
  Integer customerId=getCustomerSessionId();
  List<Contacts> contactEntityList=new ArrayList<Contacts>();
  contactEntityList=customerService.findContactByReferenceId(customerId);
  for (  Contacts contactElem : contactEntityList) {
    contacts.add(transformToFormBeanContacts(contactElem));
  }
  return SUCCESS;
}

Fixed version (ground truth):
public String loadSaveCompleteContacts(){
  Integer customerId=getCustomerSessionId();
  List<Contacts> contactEntityList=new ArrayList<Contacts>();
  contactEntityList=customerService.findContactByReferenceId(customerId);
  for (  Contacts contactElem : contactEntityList) {
    contacts.add(transformToFormBeanContacts(contactElem));
  }
  clearErrorsAndMessages();
  addActionMessage("String_Node_Str");
  return SUCCESS;
}
Program: 144586
Project: 144586
Buggy source:
public String loadSaveCompleteAddress(){
  Integer customerId=getCustomerSessionId();
  List<Address> addressEntityList=new ArrayList<Address>();
  addressEntityList=customerService.findAllAddressByRefId(customerId);
  for (  Address addressElem : addressEntityList) {
    addresss.add(transformToFormBeanAddress(addressElem));
  }
  return SUCCESS;
}

Fixed version (ground truth):
public String loadSaveCompleteAddress(){
  Integer customerId=getCustomerSessionId();
  List<Address> addressEntityList=new ArrayList<Address>();
  addressEntityList=customerService.findAllAddressByRefId(customerId);
  for (  Address addressElem : addressEntityList) {
    addresss.add(transformToFormBeanAddress(addressElem));
  }
  clearErrorsAndMessages();
  addActionMessage("String_Node_Str");
  return SUCCESS;
}
Program: 144587
Project: 144587
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());
  }
  System.out.println(commonUtils.getUserNameFromSession());
  Integer customerId=getCustomerSessionId();
  entity.setReferenceId(customerId);
  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.setCreatedTimestamp(new Date());
  entity.setCreatedBy(commonUtils.getUserNameFromSession());
  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());
  }
  System.out.println(commonUtils.getUserNameFromSession());
  Integer customerId=getCustomerSessionId();
  entity.setReferenceId(customerId);
  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.setCreatedTimestamp(new Date());
  entity.setCreatedBy(commonUtils.getUserNameFromSession());
  entity.setModifiedTimestamp(new Date());
  entity.setModifiedBy(commonUtils.getUserNameFromSession());
  return entity;
}
Program: 144588
Project: 144588
Buggy source:
public void validateOnSubmitDriver(DriverBean driverBean){
  clearErrorsAndMessages();
  if (StringUtils.isBlank(driverBean.getDriverCode())) {
    addFieldError("String_Node_Str",getText("String_Node_Str"));
  }
  if (StringUtils.isBlank(driverBean.getLicenseNumber())) {
    addFieldError("String_Node_Str",getText("String_Node_Str"));
  }
  if (StringUtils.isBlank(driverBean.getLastName())) {
    addFieldError("String_Node_Str",getText("String_Node_Str"));
  }
  if (StringUtils.isBlank(driverBean.getFirstName())) {
    addFieldError("String_Node_Str",getText("String_Node_Str"));
  }
  if (StringUtils.isBlank(driverBean.getMiddleName())) {
    addFieldError("String_Node_Str",getText("String_Node_Str"));
  }
  if (StringUtils.isBlank(driverBean.getTitle())) {
    addFieldError("String_Node_Str",getText("String_Node_Str"));
  }
}

Fixed version (ground truth):
public void validateOnSubmitDriver(DriverBean driverBean){
  clearErrorsAndMessages();
  if (StringUtils.isBlank(driverBean.getDriverCode())) {
    addFieldError("String_Node_Str",getText("String_Node_Str"));
  }
  if (StringUtils.isBlank(driverBean.getLicenseNumber())) {
    addFieldError("String_Node_Str",getText("String_Node_Str"));
  }
  if (StringUtils.isBlank(driverBean.getLastName())) {
    addFieldError("String_Node_Str",getText("String_Node_Str"));
  }
  if (StringUtils.isBlank(driverBean.getFirstName())) {
    addFieldError("String_Node_Str",getText("String_Node_Str"));
  }
  if (StringUtils.isBlank(driverBean.getTitle())) {
    addFieldError("String_Node_Str",getText("String_Node_Str"));
  }
}
Program: 144589
Project: 144589
Buggy source:
public String loadVendorInfo(){
  return SUCCESS;
}

Fixed version (ground truth):
public String loadVendorInfo(){
  Map sessionAttributes=ActionContext.getContext().getSession();
  sessionAttributes.put("String_Node_Str",vendor.getVendorId());
  return SUCCESS;
}
Program: 144590
Project: 144590
Buggy source:
public List<Contacts> findAllContacts(long clientId);

Fixed version (ground truth):
public List<Contacts> findAllContacts();
Program: 144591
Project: 144591
Buggy source:
public Contacts findContactById(long contactId);

Fixed version (ground truth):
public Contacts findContactById(Integer contactId);
Program: 144592
Project: 144592
Buggy source:
@Override public List<Contacts> findAllContacts(long clientId){
  List<Contacts> contacts=contactsDao.findAllContacts(clientId);
  return contacts;
}

Fixed version (ground truth):
@Override public List<Contacts> findAllContacts(){
  List<Contacts> contacts=contactsDao.findAllContacts();
  return contacts;
}
Program: 144593
Project: 144593
Buggy source:
@Override public Contacts findContactById(long contactId){
  return contactsDao.findContactById(contactId);
}

Fixed version (ground truth):
@Override public Contacts findContactById(Integer contactId){
  return contactsDao.findContactById(contactId);
}
Program: 144594
Project: 144594
Buggy source:
public List<Contacts> findAllContacts(long clientId);

Fixed version (ground truth):
public List<Contacts> findAllContacts();
Program: 144595
Project: 144595
Buggy source:
public Contacts findContactById(long contactId);

Fixed version (ground truth):
public Contacts findContactById(Integer contactId);
Program: 144596
Project: 144596
Buggy source:
@Override public List<Contacts> findAllContacts(long clientId){
  List<Contacts> contacts=contactsDao.findAllContacts(clientId);
  return contacts;
}

Fixed version (ground truth):
@Override public List<Contacts> findAllContacts(){
  List<Contacts> contacts=contactsDao.findAllContacts();
  return contacts;
}
Program: 144597
Project: 144597
Buggy source:
@Override public Contacts findContactById(long contactId){
  return contactsDao.findContactById(contactId);
}

Fixed version (ground truth):
@Override public Contacts findContactById(Integer contactId){
  return contactsDao.findContactById(contactId);
}
Program: 144598
Project: 144598
Buggy source:
public String addVendor() throws Exception {
  validateOnSubmit(vendor);
  if (hasFieldErrors()) {
    return INPUT;
  }
  Integer vendorId=vendorService.addVendor(transformToEntityBean(vendor));
  Map sessionAttributes=ActionContext.getContext().getSession();
  sessionAttributes.put("String_Node_Str",vendorId);
  return SUCCESS;
}

Fixed version (ground truth):
public String addVendor() throws Exception {
  validateOnSubmit(vendor);
  if (hasFieldErrors()) {
    return INPUT;
  }
  vendorService.addVendor(transformToEntityBean(vendor));
  if ("String_Node_Str".equals(vendor.getVendorType())) {
    return "String_Node_Str";
  }
 else {
    return "String_Node_Str";
  }
}
Program: 144599
Project: 144599
Buggy source:
public String editDriver(){
  validateOnSubmitDriver(driver);
  if (hasFieldErrors()) {
    return INPUT;
  }
  driverService.updateDriver(transformToEntityBeanDriver(driver));
  return SUCCESS;
}

Fixed version (ground truth):
public String editDriver(){
  validateOnSubmitDriver(driver);
  if (hasFieldErrors()) {
    return INPUT;
  }
  vendorService.updateDriver(transformToEntityBeanDriver(driver));
  return SUCCESS;
}
Program: 144600
Project: 144600
Buggy source:
public void setDriverService(DriverService driverService){
  this.driverService=driverService;
}

Fixed version (ground truth):
public void setDriverService(VendorService driverService){
  this.driverService=driverService;
}
Program: 144601
Project: 144601
Buggy source:
public String deleteDriver(){
  Driver driverEntity=driverService.findDriverByDriverCode(driverCodeParam);
  driverService.deleteDriver(driverEntity);
  return SUCCESS;
}

Fixed version (ground truth):
public String deleteDriver(){
  Driver driverEntity=vendorService.findDriverByDriverCode(driverCodeParam);
  vendorService.deleteDriver(driverEntity);
  return SUCCESS;
}
Program: 144602
Project: 144602
Buggy source:
public String loadEditDriverPage(){
  Integer vendorId=getSessionVendorId();
  List<Driver> driverEntityList=driverService.findDriverByVendorId(vendorId);
  for (  Driver driverE1em : driverEntityList) {
    drivers.add(transformToFormBeanDriver(driverE1em));
  }
  Driver driverEntity=driverService.findDriverByDriverCode(driverCodeParam);
  driver=transformToFormBeanDriver(driverEntity);
  return SUCCESS;
}

Fixed version (ground truth):
public String loadEditDriverPage(){
  Integer vendorId=getSessionVendorId();
  List<Driver> driverEntityList=vendorService.findDriverByVendorId(vendorId);
  for (  Driver driverE1em : driverEntityList) {
    drivers.add(transformToFormBeanDriver(driverE1em));
  }
  Driver driverEntity=vendorService.findDriverByDriverCode(driverCodeParam);
  driver=transformToFormBeanDriver(driverEntity);
  return SUCCESS;
}
Program: 144603
Project: 144603
Buggy source:
public String viewVendors(){
  String column=searchVendor();
  List<Vendor> vendorEntityList=vendorService.findVendorsByCriteria(column,vendor.getVendorKeyword(),getClientId());
  for (  Vendor vendorElem : vendorEntityList) {
    vendors.add(transformToFormBean(vendorElem));
  }
  return SUCCESS;
}

Fixed version (ground truth):
public String viewVendors(){
  String column=getColumnFilter();
  List<Vendor> vendorEntityList=new ArrayList<Vendor>();
  if (StringUtils.isNotBlank(column)) {
    vendorEntityList=vendorService.findVendorsByCriteria(column,vendor.getVendorKeyword(),getClientId());
  }
 else {
    vendorEntityList=vendorService.findAllVendors();
  }
  for (  Vendor vendorElem : vendorEntityList) {
    vendors.add(transformToFormBean(vendorElem));
  }
  return SUCCESS;
}
Program: 144604
Project: 144604
Buggy source:
public String loadAddDriverPage(){
  Integer vendorId=getSessionVendorId();
  List<Driver> driverEntityList=driverService.findDriverByVendorId(vendorId);
  for (  Driver driverE1em : driverEntityList) {
    drivers.add(transformToFormBeanDriver(driverE1em));
  }
  return SUCCESS;
}

Fixed version (ground truth):
public String loadAddDriverPage(){
  Integer vendorId=getSessionVendorId();
  List<Driver> driverEntityList=vendorService.findDriverByVendorId(vendorId);
  for (  Driver driverE1em : driverEntityList) {
    drivers.add(transformToFormBeanDriver(driverE1em));
  }
  return SUCCESS;
}
Program: 144605
Project: 144605
Buggy source:
public String addDriver() throws Exception {
  validateOnSubmitDriver(driver);
  if (hasFieldErrors()) {
    return INPUT;
  }
  driverService.addDriver(transformToEntityBeanDriver(driver));
  return SUCCESS;
}

Fixed version (ground truth):
public String addDriver() throws Exception {
  validateOnSubmitDriver(driver);
  if (hasFieldErrors()) {
    return INPUT;
  }
  vendorService.addDriver(transformToEntityBeanDriver(driver));
  return SUCCESS;
}
Program: 144606
Project: 144606
Buggy source:
private Orders initOrder(){
  Client client=new Client("String_Node_Str",new Date(),"String_Node_Str",new Date(),"String_Node_Str");
  Orders orders=new Orders();
  orders.setClientId(1);
  orders.setOrderNumber(213);
  orders.setServiceType("String_Node_Str");
  orders.setServiceMode("String_Node_Str");
  orders.setNotificationType("String_Node_Str");
  orders.setPaymentMode("String_Node_Str");
  orders.setComments("String_Node_Str");
  orders.setOrderStatus("String_Node_Str");
  orders.setVendorCode("String_Node_Str");
  orders.setTruckCode("String_Node_Str");
  orders.setTrailerCode("String_Node_Str");
  orders.setDriverCode("String_Node_Str");
  orders.setVesselNumber("String_Node_Str");
  orders.setAccountRep("String_Node_Str");
  return orders;
}

Fixed version (ground truth):
private Orders initOrder(){
  Client client=new Client("String_Node_Str",new Date(),"String_Node_Str",new Date(),"String_Node_Str");
  Orders orders=new Orders();
  orders.setClientId(1);
  orders.setOrderNumber("String_Node_Str");
  orders.setServiceType("String_Node_Str");
  orders.setServiceMode("String_Node_Str");
  orders.setNotificationType("String_Node_Str");
  orders.setPaymentMode("String_Node_Str");
  orders.setComments("String_Node_Str");
  orders.setOrderStatus("String_Node_Str");
  orders.setVendorCode("String_Node_Str");
  orders.setTruckCode("String_Node_Str");
  orders.setTrailerCode("String_Node_Str");
  orders.setDriverCode("String_Node_Str");
  orders.setVesselNumber("String_Node_Str");
  orders.setAccountRep("String_Node_Str");
  return orders;
}
Program: 144607
Project: 144607
Buggy source:
private CustomerBean transformToFormBean(Customer entity){
  CustomerBean formBean=new CustomerBean();
  formBean.setCustomerId(Long.toString(entity.getCustomerId()));
  formBean.setCustomerName(entity.getCustomerName());
  formBean.setPhone(entity.getPhone());
  formBean.setEmail(entity.getEmail());
  formBean.setWebsite(entity.getWebsite());
  formBean.setFax(entity.getFax());
  formBean.setMobile(entity.getMobile());
  formBean.setCustomerType(entity.getCustomerType());
  return formBean;
}

Fixed version (ground truth):
private CustomerBean transformToFormBean(Customer entity){
  CustomerBean formBean=new CustomerBean();
  formBean.setCustomerId(entity.getCustomerId());
  formBean.setCustomerName(entity.getCustomerName());
  formBean.setPhone(entity.getPhone());
  formBean.setEmail(entity.getEmail());
  formBean.setWebsite(entity.getWebsite());
  formBean.setFax(entity.getFax());
  formBean.setMobile(entity.getMobile());
  formBean.setCustomerType(entity.getCustomerType());
  return formBean;
}
Program: 144608
Project: 144608
Buggy source:
public void setAaf(Boolean aaf){
  this.aaf=aaf;
}

Fixed version (ground truth):
public void setAaf(int aaf){
  this.aaf=aaf;
}
Program: 144609
Project: 144609
Buggy source:
public Boolean getMayorsPermit(){
  return mayorsPermit;
}

Fixed version (ground truth):
public int getMayorsPermit(){
  return mayorsPermit;
}
Program: 144610
Project: 144610
Buggy source:
public void setMayorsPermit(Boolean mayorsPermit){
  this.mayorsPermit=mayorsPermit;
}

Fixed version (ground truth):
public void setMayorsPermit(int mayorsPermit){
  this.mayorsPermit=mayorsPermit;
}
Program: 144611
Project: 144611
Buggy source:
public String getCustomerId(){
  return customerId;
}

Fixed version (ground truth):
public Integer getCustomerId(){
  return customerId;
}
Program: 144612
Project: 144612
Buggy source:
public void setSignatureCard(Boolean signatureCard){
  this.signatureCard=signatureCard;
}

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

Fixed version (ground truth):
public void setDti(int dti){
  this.dti=dti;
}
Program: 144614
Project: 144614
Buggy source:
public Boolean getAaf(){
  return aaf;
}

Fixed version (ground truth):
public int getAaf(){
  return aaf;
}
Program: 144615
Project: 144615
Buggy source:
public Boolean getSignatureCard(){
  return signatureCard;
}

Fixed version (ground truth):
public int getSignatureCard(){
  return signatureCard;
}
Program: 144616
Project: 144616
Buggy source:
public CustomerBean(String customerId,String customerName,String phone,String email,String customerType,String website,String mobile,String fax,Boolean dti,Boolean mayorsPermit,Boolean aaf,Boolean signatureCard){
  this.customerId=customerId;
  this.customerName=customerName;
  this.phone=phone;
  this.email=email;
  this.customerType=customerType;
  this.website=website;
  this.mobile=mobile;
  this.fax=fax;
  this.dti=dti;
  this.mayorsPermit=mayorsPermit;
  this.aaf=aaf;
  this.signatureCard=signatureCard;
}

Fixed version (ground truth):
public CustomerBean(Integer customerId,String customerCode,String customerName,String customerType,String website,String phone,String mobile,String fax,String email,int dti,int mayorsPermit,int aaf,int signatureCard,Date createdTimestamp,String createdBy,Date modifiedTimestamp,String modifiedBy){
  this.customerId=customerId;
  this.customerCode=customerCode;
  this.customerName=customerName;
  this.customerType=customerType;
  this.website=website;
  this.phone=phone;
  this.mobile=mobile;
  this.fax=fax;
  this.email=email;
  this.dti=dti;
  this.mayorsPermit=mayorsPermit;
  this.aaf=aaf;
  this.signatureCard=signatureCard;
  this.createdTimestamp=createdTimestamp;
  this.createdBy=createdBy;
  this.modifiedTimestamp=modifiedTimestamp;
  this.modifiedBy=modifiedBy;
}
Program: 144617
Project: 144617
Buggy source:
public Boolean getDti(){
  return dti;
}

Fixed version (ground truth):
public int getDti(){
  return dti;
}
Program: 144618
Project: 144618
Buggy source:
public void setCustomerId(String customerId){
  this.customerId=customerId;
}

Fixed version (ground truth):
public void setCustomerId(Integer customerId){
  this.customerId=customerId;
}
Program: 144619
Project: 144619
Buggy source:
@Column(name="String_Node_Str",unique=true) public String getPhone(){
  return phone;
}

Fixed version (ground truth):
@Column(name="String_Node_Str") public String getPhone(){
  return phone;
}
Program: 144620
Project: 144620
Buggy source:
public Customer(long customerId,Client client,String customerName,String customerType,String website,String phone,String mobile,String fax,String email,boolean dti,boolean mayorsPermit,boolean aaf,boolean signatureCard,Date createdTime,String createdBy,Date modifiedTimeStamp,String modifiedBy){
  this.customerId=customerId;
  this.client=client;
  this.customerName=customerName;
  this.customerType=customerType;
  this.website=website;
  this.phone=phone;
  this.mobile=mobile;
  this.fax=fax;
  this.email=email;
  this.dti=dti;
  this.mayorsPermit=mayorsPermit;
  this.aaf=aaf;
  this.signatureCard=signatureCard;
  this.createdTime=createdTime;
  this.createdBy=createdBy;
  this.modifiedTimeStamp=modifiedTimeStamp;
  this.modifiedBy=modifiedBy;
}

Fixed version (ground truth):
public Customer(Integer customerId,Client client,String customerCode,String customerName,String customerType,String website,String phone,String mobile,String fax,String email,int dti,int mayorsPermit,int aaf,int signatureCard,Date createdTimestamp,String createdBy,Date modifiedTimestamp,String modifiedBy){
  this.customerId=customerId;
  this.client=client;
  this.customerCode=customerCode;
  this.customerName=customerName;
  this.customerType=customerType;
  this.website=website;
  this.phone=phone;
  this.mobile=mobile;
  this.fax=fax;
  this.email=email;
  this.dti=dti;
  this.mayorsPermit=mayorsPermit;
  this.aaf=aaf;
  this.signatureCard=signatureCard;
  this.createdTimestamp=createdTimestamp;
  this.createdBy=createdBy;
  this.modifiedTimestamp=modifiedTimestamp;
  this.modifiedBy=modifiedBy;
}
Program: 144621
Project: 144621
Buggy source:
public void setAaf(boolean aaf){
  this.aaf=aaf;
}

Fixed version (ground truth):
public void setAaf(int aaf){
  this.aaf=aaf;
}
Program: 144622
Project: 144622
Buggy source:
public void setMayorsPermit(boolean mayorsPermit){
  this.mayorsPermit=mayorsPermit;
}

Fixed version (ground truth):
public void setMayorsPermit(int mayorsPermit){
  this.mayorsPermit=mayorsPermit;
}
Program: 144623
Project: 144623
Buggy source:
@Id @GeneratedValue(strategy=GenerationType.AUTO) @Column(name="String_Node_Str",unique=true) public long getCustomerId(){
  return customerId;
}

Fixed version (ground truth):
@Id @GeneratedValue(strategy=GenerationType.AUTO) @Column(name="String_Node_Str",unique=true) public Integer getCustomerId(){
  return customerId;
}
Program: 144624
Project: 144624
Buggy source:
public void setSignatureCard(boolean signatureCard){
  this.signatureCard=signatureCard;
}

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

Fixed version (ground truth):
public void setDti(int dti){
  this.dti=dti;
}
Program: 144626
Project: 144626
Buggy source:
@Column(name="String_Node_Str",unique=true) public String getWebsite(){
  return website;
}

Fixed version (ground truth):
@Column(name="String_Node_Str") public String getWebsite(){
  return website;
}
Program: 144627
Project: 144627
Buggy source:
@ManyToOne(fetch=FetchType.EAGER) @JoinColumn(name="String_Node_Str") public Client getClient(){
  return this.client;
}

Fixed version (ground truth):
@ManyToOne(fetch=FetchType.EAGER) @JoinColumn(name="String_Node_Str") public Client getClient(){
  return client;
}
Program: 144628
Project: 144628
Buggy source:
@Column(name="String_Node_Str",unique=true) public String getFax(){
  return fax;
}

Fixed version (ground truth):
@Column(name="String_Node_Str") public String getFax(){
  return fax;
}
Program: 144629
Project: 144629
Buggy source:
@Column(name="String_Node_Str",nullable=false) public String getCustomerType(){
  return customerType;
}

Fixed version (ground truth):
@Column(name="String_Node_Str") public String getCustomerType(){
  return customerType;
}
Program: 144630
Project: 144630
Buggy source:
@Column(name="String_Node_Str",unique=true) public String getMobile(){
  return mobile;
}

Fixed version (ground truth):
@Column(name="String_Node_Str") public String getMobile(){
  return mobile;
}
Program: 144631
Project: 144631
Buggy source:
@Column(name="String_Node_Str",unique=true,nullable=true) public String getEmail(){
  return email;
}

Fixed version (ground truth):
@Column(name="String_Node_Str") public String getEmail(){
  return email;
}
Program: 144632
Project: 144632
Buggy source:
public void setCustomerId(long customerId){
  this.customerId=customerId;
}

Fixed version (ground truth):
public void setCustomerId(Integer customerId){
  this.customerId=customerId;
}
Program: 144633
Project: 144633
Buggy source:
public Vendor(Client client,String vendorCode,String vendorName,String vendorType,String vendorClass,String vendorStatus,String createdTimeStamp,String createdBy,String modifiedTimeStamp,String modifiedBY){
  this.client=client;
  this.vendorCode=vendorCode;
  this.vendorName=vendorName;
  this.vendorType=vendorType;
  this.vendorClass=vendorClass;
  this.vendorStatus=vendorStatus;
  this.createdTimeStamp=createdTimeStamp;
  this.createdBy=createdBy;
  this.modifiedTimeStamp=modifiedTimeStamp;
  this.modifiedBY=modifiedBY;
}

Fixed version (ground truth):
public Vendor(Client client,String vendorCode,String vendorName,String vendorType,String vendorClass,String vendorStatus,Date createdTimeStamp,String createdBy,Date modifiedTimeStamp,String modifiedBY){
  this.client=client;
  this.vendorCode=vendorCode;
  this.vendorName=vendorName;
  this.vendorType=vendorType;
  this.vendorClass=vendorClass;
  this.vendorStatus=vendorStatus;
  this.createdTimeStamp=createdTimeStamp;
  this.createdBy=createdBy;
  this.modifiedTimeStamp=modifiedTimeStamp;
  this.modifiedBY=modifiedBY;
}
Program: 144634
Project: 144634
Buggy source:
public void setCreatedTimeStamp(String createdTimeStamp){
  this.createdTimeStamp=createdTimeStamp;
}

Fixed version (ground truth):
public void setCreatedTimeStamp(Date createdTimeStamp){
  this.createdTimeStamp=createdTimeStamp;
}
Program: 144635
Project: 144635
Buggy source:
public void setModifiedTimeStamp(String modifiedTimeStamp){
  this.modifiedTimeStamp=modifiedTimeStamp;
}

Fixed version (ground truth):
public void setModifiedTimeStamp(Date modifiedTimeStamp){
  this.modifiedTimeStamp=modifiedTimeStamp;
}
Program: 144636
Project: 144636
Buggy source:
@Column(name="String_Node_Str") public String getCreatedTimeStamp(){
  return this.createdTimeStamp;
}

Fixed version (ground truth):
@Column(name="String_Node_Str") public Date getCreatedTimeStamp(){
  return this.createdTimeStamp;
}
Program: 144637
Project: 144637
Buggy source:
@Column(name="String_Node_Str") public String getModifiedTimeStamp(){
  return modifiedTimeStamp;
}

Fixed version (ground truth):
@Column(name="String_Node_Str") public Date getModifiedTimeStamp(){
  return modifiedTimeStamp;
}
Program: 144639
Project: 144639
Buggy source:
@Override public void onRead(SelectionKey key) throws Exception {
  ByteBuffer cursor=null;
  if (key.attachment() instanceof Object[]) {
    for (    Object a : (Object[])key.attachment()) {
      if (a instanceof ByteBuffer) {
        cursor=(ByteBuffer)a;
        break;
      }
    }
  }
  if (cursor == null) {
    Errors.$500(key);
    return;
  }
  final HttpRequest req=(HttpRequest)new Rfc822HeaderState().addHeaderInterest(Host).$req().apply(cursor);
  String[] pathParts=req.path().split("String_Node_Str");
  if (pathParts.length != 2) {
    Errors.$500(key);
  }
  String[] args=pathParts[1].split("String_Node_Str");
  String code=null;
  String state=null;
  String error=null;
  for (  String arg : args) {
    if (arg.startsWith("String_Node_Str")) {
      code=arg.substring("String_Node_Str".length());
    }
 else     if (arg.startsWith("String_Node_Str")) {
      state=arg.substring("String_Node_Str".length());
    }
 else     if (arg.startsWith("String_Node_Str")) {
      error=arg.substring("String_Node_Str".length());
    }
  }
  if (error != null) {
    Errors.$400(key);
    return;
  }
  execs.submit(new AccessTokenFetch(code,key));
}

Fixed version (ground truth):
@Override public void onRead(SelectionKey key) throws Exception {
  ByteBuffer cursor=null;
  if (key.attachment() instanceof Object[]) {
    for (    Object a : (Object[])key.attachment()) {
      if (a instanceof ByteBuffer) {
        cursor=(ByteBuffer)a;
        break;
      }
    }
  }
  if (cursor == null) {
    Errors.$500(key);
    return;
  }
  final HttpRequest req=(HttpRequest)new Rfc822HeaderState().addHeaderInterest(Host).$req().apply(cursor);
  String[] pathParts=req.path().split("String_Node_Str");
  if (pathParts.length != 2) {
    Errors.$500(key);
  }
  String[] args=pathParts[1].split("String_Node_Str");
  String code=null;
  String state=null;
  String error=null;
  for (  String arg : args) {
    if (arg.startsWith("String_Node_Str")) {
      code=arg.substring("String_Node_Str".length());
    }
 else     if (arg.startsWith("String_Node_Str")) {
      state=arg.substring("String_Node_Str".length());
    }
 else     if (arg.startsWith("String_Node_Str")) {
      error=arg.substring("String_Node_Str".length());
    }
  }
  if (error != null) {
    Errors.$400(key);
    return;
  }
  execs.submit(new AccessTokenFetch(code,key));
  key.interestOps(SelectionKey.OP_READ).attach(null);
}
Program: 144640
Project: 144640
Buggy source:
@Override public Hits search(String searchEngineId,long companyId,Query query,Sort[] sort,int start,int end) throws SearchException {
  try {
    Client client=getClient();
    SearchRequestBuilder searchRequestBuilder=client.prepareSearch("String_Node_Str" + String.valueOf(companyId));
    QueryBuilder queryBuilder=QueryBuilders.queryString(query.toString());
    _log.info("String_Node_Str" + queryBuilder.toString());
    searchRequestBuilder.setQuery(queryBuilder);
    searchRequestBuilder.setTypes("String_Node_Str");
    addSortToSearch(sort,searchRequestBuilder);
    SearchRequest searchRequest=searchRequestBuilder.request();
    ActionFuture<SearchResponse> future=client.search(searchRequest);
    SearchResponse searchResponse=future.actionGet();
    Hits hits=processSearchHits(searchResponse.getHits(),query.getQueryConfig());
    hits.setQuery(query);
    TimeValue timeValue=searchResponse.getTook();
    hits.setSearchTime((float)timeValue.getSecondsFrac());
    return hits;
  }
 catch (  Exception e) {
    throw new SearchException(e);
  }
}

Fixed version (ground truth):
@Override public Hits search(String searchEngineId,long companyId,Query query,Sort[] sort,int start,int end) throws SearchException {
  try {
    Client client=getClient();
    SearchRequestBuilder searchRequestBuilder=client.prepareSearch("String_Node_Str" + String.valueOf(companyId));
    QueryBuilder queryBuilder=QueryBuilders.queryString(query.toString());
    _log.info("String_Node_Str" + queryBuilder.toString());
    searchRequestBuilder.setQuery(queryBuilder);
    searchRequestBuilder.setTypes("String_Node_Str");
    addSortToSearch(sort,searchRequestBuilder);
    searchRequestBuilder.setFrom(start).setSize(end);
    SearchRequest searchRequest=searchRequestBuilder.request();
    ActionFuture<SearchResponse> future=client.search(searchRequest);
    SearchResponse searchResponse=future.actionGet();
    Hits hits=processSearchHits(searchResponse.getHits(),query.getQueryConfig());
    hits.setQuery(query);
    TimeValue timeValue=searchResponse.getTook();
    hits.setSearchTime((float)timeValue.getSecondsFrac());
    return hits;
  }
 catch (  Exception e) {
    throw new SearchException(e);
  }
}
Program: 144641
Project: 144641
Buggy source:
public void afterPropertiesSet(){
  client=new TransportClient().addTransportAddress(new InetSocketTransportAddress(serverIP,port));
}

Fixed version (ground truth):
public void afterPropertiesSet(){
  Settings settings=ImmutableSettings.settingsBuilder().classLoader(ElasticsearchIndexSearcher.class.getClassLoader()).build();
  client=new TransportClient(settings).addTransportAddress(new InetSocketTransportAddress(serverIP,port));
}
Program: 144642
Project: 144642
Buggy source:
private Client getClient(){
  if (client == null) {
    client=new TransportClient().addTransportAddress(new InetSocketTransportAddress(serverIP,port));
  }
  return client;
}

Fixed version (ground truth):
private Client getClient(){
  if (client == null) {
    Settings settings=ImmutableSettings.settingsBuilder().classLoader(ElasticsearchIndexSearcher.class.getClassLoader()).build();
    client=new TransportClient(settings).addTransportAddress(new InetSocketTransportAddress(serverIP,port));
  }
  return client;
}
Program: 144643
Project: 144643
Buggy source:
private Client getClient(){
  if (client == null) {
    client=new TransportClient().addTransportAddress(new InetSocketTransportAddress(serverIP,port));
  }
  return client;
}

Fixed version (ground truth):
private Client getClient(){
  if (client == null) {
    Settings settings=ImmutableSettings.settingsBuilder().classLoader(ElasticsearchIndexSearcher.class.getClassLoader()).build();
    client=new TransportClient(settings).addTransportAddress(new InetSocketTransportAddress(serverIP,port));
  }
  return client;
}
Program: 144644
Project: 144644
Buggy source:
public void afterPropertiesSet(){
  client=new TransportClient().addTransportAddress(new InetSocketTransportAddress(serverIP,port));
}

Fixed version (ground truth):
public void afterPropertiesSet(){
  Settings settings=ImmutableSettings.settingsBuilder().classLoader(ElasticsearchIndexSearcher.class.getClassLoader()).build();
  client=new TransportClient(settings).addTransportAddress(new InetSocketTransportAddress(serverIP,port));
}
Program: 144645
Project: 144645
Buggy source:
/** 
 * Deletes the inner-most repeat that this node belongs to and returns the corresponding FormIndex. Behavior is currently undefined if you call this method on a node that is not contained within a repeat.
 */
public FormIndex deleteRepeat(FormIndex index){
  Vector indexes=new Vector();
  Vector multiplicities=new Vector();
  Vector elements=new Vector();
  collapseIndex(index,indexes,multiplicities,elements);
  for (int i=elements.size() - 1; i >= 0; i--) {
    IFormElement e=(IFormElement)elements.elementAt(i);
    if (e instanceof GroupDef && ((GroupDef)e).getRepeat()) {
      break;
    }
 else {
      indexes.removeElementAt(i);
      multiplicities.removeElementAt(i);
      elements.removeElementAt(i);
    }
  }
  FormIndex newIndex=buildIndex(indexes,multiplicities,elements);
  TreeReference deleteRef=getChildInstanceRef(newIndex);
  TreeElement deleteElement=mainInstance.resolveReference(deleteRef);
  TreeReference parentRef=deleteRef.getParentRef();
  TreeElement parentElement=mainInstance.resolveReference(parentRef);
  int childMult=deleteElement.getMult();
  parentElement.removeChild(deleteElement);
  for (int i=0; i < parentElement.getNumChildren(); i++) {
    TreeElement child=parentElement.getChildAt(i);
    if (child.getMult() > childMult) {
      child.setMult(child.getMult() - 1);
    }
  }
  this.getMainInstance().cleanCache();
  triggerTriggerables(deleteRef);
  return newIndex;
}

Fixed version (ground truth):
/** 
 * Deletes the inner-most repeat that this node belongs to and returns the corresponding FormIndex. Behavior is currently undefined if you call this method on a node that is not contained within a repeat.
 */
public FormIndex deleteRepeat(FormIndex index){
  Vector indexes=new Vector();
  Vector multiplicities=new Vector();
  Vector elements=new Vector();
  collapseIndex(index,indexes,multiplicities,elements);
  for (int i=elements.size() - 1; i >= 0; i--) {
    IFormElement e=(IFormElement)elements.elementAt(i);
    if (e instanceof GroupDef && ((GroupDef)e).getRepeat()) {
      break;
    }
 else {
      indexes.removeElementAt(i);
      multiplicities.removeElementAt(i);
      elements.removeElementAt(i);
    }
  }
  FormIndex newIndex=buildIndex(indexes,multiplicities,elements);
  TreeReference deleteRef=getChildInstanceRef(newIndex);
  TreeElement deleteElement=mainInstance.resolveReference(deleteRef);
  TreeReference parentRef=deleteRef.getParentRef();
  TreeElement parentElement=mainInstance.resolveReference(parentRef);
  int childMult=deleteElement.getMult();
  parentElement.removeChild(deleteElement);
  for (int i=0; i < parentElement.getNumChildren(); i++) {
    TreeElement child=parentElement.getChildAt(i);
    if (child.doFieldsMatch(deleteElement) && child.getMult() > childMult) {
      child.setMult(child.getMult() - 1);
    }
  }
  this.getMainInstance().cleanCache();
  triggerTriggerables(deleteRef);
  return newIndex;
}
Program: 144647
Project: 144647
Buggy source:
@Override public TreeReference getRef(){
  if (ref == null) {
    ref=TreeReference.buildRefFromTreeElement(this);
  }
  return ref;
}

Fixed version (ground truth):
@Override public TreeReference getRef(){
  if (ref == null) {
    ref=TreeReference.buildRefFromTreeElement((AbstractTreeElement)this);
  }
  return ref;
}
Program: 144648
Project: 144648
Buggy source:
@Override public TreeReference getRef(){
  if (cachedRef == null) {
    cachedRef=TreeReference.buildRefFromTreeElement(this);
  }
  return cachedRef;
}

Fixed version (ground truth):
@Override public TreeReference getRef(){
  if (cachedRef == null) {
    cachedRef=TreeReference.buildRefFromTreeElement((AbstractTreeElement)this);
  }
  return cachedRef;
}
Program: 144649
Project: 144649
Buggy source:
public TreeReference getRef(){
  if (ref == null) {
    ref=TreeReference.buildRefFromTreeElement(this);
  }
  return ref;
}

Fixed version (ground truth):
public TreeReference getRef(){
  if (ref == null) {
    ref=TreeReference.buildRefFromTreeElement((AbstractTreeElement)this);
  }
  return ref;
}
Program: 144650
Project: 144650
Buggy source:
@Override public TreeReference getRef(){
  if (cachedRef == null) {
    cachedRef=TreeReference.buildRefFromTreeElement(this);
  }
  return cachedRef;
}

Fixed version (ground truth):
@Override public TreeReference getRef(){
  if (cachedRef == null) {
    cachedRef=TreeReference.buildRefFromTreeElement((AbstractTreeElement)this);
  }
  return cachedRef;
}
Program: 144651
Project: 144651
Buggy source:
@Override public TreeReference getRef(){
  if (ref == null) {
    ref=TreeReference.buildRefFromTreeElement((AbstractTreeElement)this);
  }
  return ref;
}

Fixed version (ground truth):
@Override public TreeReference getRef(){
  if (ref == null) {
    ref=TreeReference.buildRefFromTreeElement(this);
  }
  return ref;
}
Program: 144652
Project: 144652
Buggy source:
@Override public TreeReference getRef(){
  if (cachedRef == null) {
    cachedRef=TreeReference.buildRefFromTreeElement((AbstractTreeElement)this);
  }
  return cachedRef;
}

Fixed version (ground truth):
@Override public TreeReference getRef(){
  if (cachedRef == null) {
    cachedRef=TreeReference.buildRefFromTreeElement(this);
  }
  return cachedRef;
}
Program: 144653
Project: 144653
Buggy source:
public TreeReference getRef(){
  if (ref == null) {
    ref=TreeReference.buildRefFromTreeElement((AbstractTreeElement)this);
  }
  return ref;
}

Fixed version (ground truth):
public TreeReference getRef(){
  if (ref == null) {
    ref=TreeReference.buildRefFromTreeElement(this);
  }
  return ref;
}
Program: 144654
Project: 144654
Buggy source:
@Override public TreeReference getRef(){
  if (cachedRef == null) {
    cachedRef=TreeReference.buildRefFromTreeElement((AbstractTreeElement)this);
  }
  return cachedRef;
}

Fixed version (ground truth):
@Override public TreeReference getRef(){
  if (cachedRef == null) {
    cachedRef=TreeReference.buildRefFromTreeElement(this);
  }
  return cachedRef;
}
Program: 144655
Project: 144655
Buggy source:
@Override public void writeExternal(DataOutputStream out) throws IOException {
  ExtUtil.write(out,new ExtWrapMap(params));
  ExtUtil.writeString(out,url);
}

Fixed version (ground truth):
@Override public void writeExternal(DataOutputStream out) throws IOException {
  ExtUtil.write(out,new ExtWrapMapPoly(params));
  ExtUtil.writeString(out,url);
}