nus-yam/ex-repair huggingface dataset:
Program: 58996
Project: 58996
Buggy source:
/** 
 * Procédure mettant à jour les soldes du compte client des tiers pour une société
 * @param partnerList Une liste de tiers à mettre à jour
 * @param company Une société
 */
public void updatePartnerAccountingSituation(List<Partner> partnerList,Company company,boolean updateCustAccount,boolean updateDueCustAccount,boolean updateDueReminderCustAccount){
  for (  Partner partner : partnerList) {
    AccountingSituation accountingSituation=this.getAccountingSituation(partner,company);
    if (accountingSituation != null) {
      this.updateAccountingSituationCustomerAccount(accountingSituation,updateCustAccount,updateDueCustAccount,updateDueReminderCustAccount);
    }
  }
}

Fixed version (ground truth):
/** 
 * Procédure mettant à jour les soldes du compte client des tiers pour une société
 * @param partnerList Une liste de tiers à mettre à jour
 * @param company Une société
 */
public void updatePartnerAccountingSituation(List<Partner> partnerList,Company company,boolean updateCustAccount,boolean updateDueCustAccount,boolean updateDueReminderCustAccount){
  for (  Partner partner : partnerList) {
    AccountingSituation accountingSituation=accountingSituationService.getAccountingSituation(partner,company);
    if (accountingSituation != null) {
      this.updateAccountingSituationCustomerAccount(accountingSituation,updateCustAccount,updateDueCustAccount,updateDueReminderCustAccount);
    }
  }
}
Program: 58997
Project: 58997
Buggy source:
@Transactional(rollbackOn={AxelorException.class,Exception.class}) public void flagPartners(List<Partner> partnerList,Company company){
  for (  Partner partner : partnerList) {
    AccountingSituation accountingSituation=this.getAccountingSituation(partner,company);
    accountingSituation.setCustAccountMustBeUpdateOk(true);
    accountingSituationRepo.save(accountingSituation);
  }
}

Fixed version (ground truth):
@Transactional(rollbackOn={AxelorException.class,Exception.class}) public void flagPartners(List<Partner> partnerList,Company company){
  for (  Partner partner : partnerList) {
    AccountingSituation accountingSituation=accountingSituationService.getAccountingSituation(partner,company);
    accountingSituation.setCustAccountMustBeUpdateOk(true);
    accountingSituationService.save(accountingSituation);
  }
}
Program: 58998
Project: 58998
Buggy source:
@Inject public MoveLineService(){
  toDay=GeneralService.getTodayDate();
}

Fixed version (ground truth):
@Inject public MoveLineService(AccountManagementServiceAccountImpl accountManagementService,TaxAccountService taxAccountService,FiscalPositionServiceAccountImpl fiscalPositionService){
  toDay=GeneralService.getTodayDate();
  this.accountManagementService=accountManagementService;
  this.taxAccountService=taxAccountService;
  this.fiscalPositionService=fiscalPositionService;
}
Program: 58999
Project: 58999
Buggy source:
/** 
 * Procédure permettant d'impacter la case à cocher "Passage à l'huissier" sur la facture liée à l'écriture
 * @param moveLine Une ligne d'écriture
 */
@Transactional public void usherProcess(MoveLine moveLine){
  Invoice invoice=moveLine.getMove().getInvoice();
  if (invoice != null) {
    if (moveLine.getUsherPassageOk()) {
      invoice.setUsherPassageOk(true);
    }
 else {
      invoice.setUsherPassageOk(false);
    }
    invoiceRepo.save(invoice);
  }
}

Fixed version (ground truth):
/** 
 * Procédure permettant d'impacter la case à cocher "Passage à l'huissier" sur la facture liée à l'écriture
 * @param moveLine Une ligne d'écriture
 */
@Transactional public void usherProcess(MoveLine moveLine){
  Invoice invoice=moveLine.getMove().getInvoice();
  if (invoice != null) {
    if (moveLine.getUsherPassageOk()) {
      invoice.setUsherPassageOk(true);
    }
 else {
      invoice.setUsherPassageOk(false);
    }
    Beans.get(InvoiceRepository.class).save(invoice);
  }
}
Program: 59000
Project: 59000
Buggy source:
public Account getCustomerAccount(Partner partner,Company company,boolean isSupplierAccount) throws AxelorException {
  AccountingSituation accountingSituation=accountCustomerService.getAccountingSituation(partner,company);
  if (accountingSituation != null) {
    if (!isSupplierAccount && accountingSituation.getCustomerAccount() != null) {
      return accountingSituation.getCustomerAccount();
    }
 else     if (isSupplierAccount && accountingSituation.getSupplierAccount() != null) {
      return accountingSituation.getSupplierAccount();
    }
  }
  AccountConfig accountConfig=accountConfigService.getAccountConfig(company);
  if (isSupplierAccount) {
    return accountConfigService.getSupplierAccount(accountConfig);
  }
 else {
    return accountConfigService.getCustomerAccount(accountConfig);
  }
}

Fixed version (ground truth):
public Account getCustomerAccount(Partner partner,Company company,boolean isSupplierAccount) throws AxelorException {
  AccountingSituation accountingSituation=accountCustomerService.getAccountingSituationService().getAccountingSituation(partner,company);
  if (accountingSituation != null) {
    if (!isSupplierAccount && accountingSituation.getCustomerAccount() != null) {
      return accountingSituation.getCustomerAccount();
    }
 else     if (isSupplierAccount && accountingSituation.getSupplierAccount() != null) {
      return accountingSituation.getSupplierAccount();
    }
  }
  AccountConfig accountConfig=accountConfigService.getAccountConfig(company);
  if (isSupplierAccount) {
    return accountConfigService.getSupplierAccount(accountConfig);
  }
 else {
    return accountConfigService.getCustomerAccount(accountConfig);
  }
}
Program: 59001
Project: 59001
Buggy source:
@Transactional(rollbackOn={AxelorException.class,Exception.class}) public BigDecimal getInTaxTotalRemaining(Invoice invoice) throws AxelorException {
  BigDecimal inTaxTotalRemaining=BigDecimal.ZERO;
  LOG.debug("String_Node_Str",invoice.getInvoiceId());
  if (invoice != null) {
    boolean isMinus=this.isMinus(invoice);
    LOG.debug("String_Node_Str");
    invoiceRepo.save(invoice);
    LOG.debug("String_Node_Str");
    MoveLine moveLine=this.getCustomerMoveLineByLoop(invoice);
    LOG.debug("String_Node_Str");
    LOG.debug("String_Node_Str");
    LOG.debug("String_Node_Str");
    if (moveLine != null) {
      inTaxTotalRemaining=inTaxTotalRemaining.add(moveLine.getAmountRemaining());
      if (isMinus) {
        inTaxTotalRemaining=inTaxTotalRemaining.negate();
      }
    }
  }
  return inTaxTotalRemaining;
}

Fixed version (ground truth):
@Transactional(rollbackOn={AxelorException.class,Exception.class}) public BigDecimal getInTaxTotalRemaining(Invoice invoice) throws AxelorException {
  BigDecimal inTaxTotalRemaining=BigDecimal.ZERO;
  LOG.debug("String_Node_Str",invoice.getInvoiceId());
  if (invoice != null) {
    boolean isMinus=this.isMinus(invoice);
    LOG.debug("String_Node_Str");
    Beans.get(InvoiceRepository.class).save(invoice);
    LOG.debug("String_Node_Str");
    MoveLine moveLine=this.getCustomerMoveLineByLoop(invoice);
    LOG.debug("String_Node_Str");
    LOG.debug("String_Node_Str");
    LOG.debug("String_Node_Str");
    if (moveLine != null) {
      inTaxTotalRemaining=inTaxTotalRemaining.add(moveLine.getAmountRemaining());
      if (isMinus) {
        inTaxTotalRemaining=inTaxTotalRemaining.negate();
      }
    }
  }
  return inTaxTotalRemaining;
}
Program: 59002
Project: 59002
Buggy source:
@Transactional(rollbackOn={AxelorException.class,Exception.class}) public void setExcessPayment(AccountClearance accountClearance) throws AxelorException {
  accountClearance.setMoveLineSet(new HashSet<MoveLine>());
  List<MoveLine> moveLineList=this.getExcessPayment(accountClearance);
  if (moveLineList != null && moveLineList.size() != 0) {
    accountClearance.getMoveLineSet().addAll(moveLineList);
  }
  accountClearance.save();
}

Fixed version (ground truth):
@Transactional(rollbackOn={AxelorException.class,Exception.class}) public void setExcessPayment(AccountClearance accountClearance) throws AxelorException {
  accountClearance.setMoveLineSet(new HashSet<MoveLine>());
  List<MoveLine> moveLineList=(List<MoveLine>)this.getExcessPayment(accountClearance);
  if (moveLineList != null && moveLineList.size() != 0) {
    accountClearance.getMoveLineSet().addAll(moveLineList);
  }
  accountClearance.save();
}
Program: 59003
Project: 59003
Buggy source:
@Override public boolean checkAddressUsed(Long addressId){
  super.checkAddressUsed(addressId);
  if (addressId != null) {
    if (Invoice.all_().filter("String_Node_Str",addressId).fetchOne() != null)     return true;
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean checkAddressUsed(Long addressId){
  super.checkAddressUsed(addressId);
  if (addressId != null) {
    if (Invoice.all().filter("String_Node_Str",addressId).fetchOne() != null)     return true;
  }
  return false;
}
Program: 59004
Project: 59004
Buggy source:
/** 
 * Fonction permettant de récupérer la liste des factures rejetées à passer en irrécouvrable d'une société
 * @param company Une société
 * @return
 */
public List<Invoice> getRejectInvoiceList(Company company){
  return Invoice.filter("String_Node_Str",IInvoice.TO_PASS_IN_IRRECOUVRABLE,company).fetch();
}

Fixed version (ground truth):
/** 
 * Fonction permettant de récupérer la liste des factures rejetées à passer en irrécouvrable d'une société
 * @param company Une société
 * @return
 */
public List<Invoice> getRejectInvoiceList(Company company){
  return (List<Invoice>)Invoice.filter("String_Node_Str",IInvoice.TO_PASS_IN_IRRECOUVRABLE,company).fetch();
}
Program: 59012
Project: 59012
Buggy source:
/** 
 * Procédure permettant de récupérer l'objet de gestion déjà créé lors du prélèvement d'une autre facture
 * @param mlList La liste des lignes d'écriture de facture à prélever
 * @param ml Une ligne d'écriture de facture ) prélever
 * @return L'objet de gestion trouvé
 */
public DirectDebitManagement getDirectDebitManagement(List<MoveLine> moveLineList,MoveLine ml,long directDebitManagementMaxId){
  Partner partner=ml.getPartner();
  LOG.debug("String_Node_Str",partner.getFullName());
  List<MoveLine> moveLineListResult=MoveLine.filter("String_Node_Str",moveLineList,partner).fetch();
  for (  MoveLine moveLine : moveLineListResult) {
    Invoice invoice=cfonbExportService.getInvoice(moveLine);
    DirectDebitManagement directDebitManagement=invoice.getDirectDebitManagement();
    if (directDebitManagement != null && directDebitManagement.getId() > directDebitManagementMaxId) {
      LOG.debug("String_Node_Str",partner.getFullName());
      return invoice.getDirectDebitManagement();
    }
  }
  LOG.debug("String_Node_Str",partner.getFullName());
  return null;
}

Fixed version (ground truth):
/** 
 * Procédure permettant de récupérer l'objet de gestion déjà créé lors du prélèvement d'une autre facture
 * @param mlList La liste des lignes d'écriture de facture à prélever
 * @param ml Une ligne d'écriture de facture ) prélever
 * @return L'objet de gestion trouvé
 */
public DirectDebitManagement getDirectDebitManagement(List<MoveLine> moveLineList,MoveLine ml,long directDebitManagementMaxId){
  Partner partner=ml.getPartner();
  LOG.debug("String_Node_Str",partner.getFullName());
  List<MoveLine> moveLineListResult=(List<MoveLine>)MoveLine.filter("String_Node_Str",moveLineList,partner).fetch();
  for (  MoveLine moveLine : moveLineListResult) {
    Invoice invoice=cfonbExportService.getInvoice(moveLine);
    DirectDebitManagement directDebitManagement=invoice.getDirectDebitManagement();
    if (directDebitManagement != null && directDebitManagement.getId() > directDebitManagementMaxId) {
      LOG.debug("String_Node_Str",partner.getFullName());
      return invoice.getDirectDebitManagement();
    }
  }
  LOG.debug("String_Node_Str",partner.getFullName());
  return null;
}
Program: 59013
Project: 59013
Buggy source:
/** 
 * Methode permettant de récupérer la liste des échéances à prélever en fonction de la société et de la date de prélèvement
 * @param company Une société
 * @param debitDate Une date de prélèvement
 * @return
 */
public List<PaymentScheduleLine> getPaymentScheduleLineToDebit(AccountingBatch accountingBatch){
  Company company=accountingBatch.getCompany();
  LocalDate debitDate=accountingBatch.getDebitDate();
  Currency currency=accountingBatch.getCurrency();
  PaymentMode paymentMode=company.getAccountConfig().getDirectDebitPaymentMode();
  List<PaymentScheduleLine> paymentScheduleLineList=PaymentScheduleLine.filter("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str",company,debitDate,currency,paymentMode).fetch();
  if (paymentScheduleLineList.size() < 50) {
    LOG.debug("String_Node_Str",this.toStringPaymentScheduleLineList(paymentScheduleLineList));
  }
 else {
    LOG.debug("String_Node_Str",paymentScheduleLineList.size());
  }
  return paymentScheduleLineList;
}

Fixed version (ground truth):
/** 
 * Methode permettant de récupérer la liste des échéances à prélever en fonction de la société et de la date de prélèvement
 * @param company Une société
 * @param debitDate Une date de prélèvement
 * @return
 */
public List<PaymentScheduleLine> getPaymentScheduleLineToDebit(AccountingBatch accountingBatch){
  Company company=accountingBatch.getCompany();
  LocalDate debitDate=accountingBatch.getDebitDate();
  Currency currency=accountingBatch.getCurrency();
  PaymentMode paymentMode=company.getAccountConfig().getDirectDebitPaymentMode();
  List<PaymentScheduleLine> paymentScheduleLineList=(List<PaymentScheduleLine>)PaymentScheduleLine.filter("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str",company,debitDate,currency,paymentMode).fetch();
  if (paymentScheduleLineList.size() < 50) {
    LOG.debug("String_Node_Str",this.toStringPaymentScheduleLineList(paymentScheduleLineList));
  }
 else {
    LOG.debug("String_Node_Str",paymentScheduleLineList.size());
  }
  return paymentScheduleLineList;
}
Program: 59014
Project: 59014
Buggy source:
/** 
 * Méthode permettant de récupérer les factures d'échéance mensu grand compte d'un échéancier
 * @param paymentSchedule Un échéancier
 * @return
 */
public List<MoveLine> getInvoiceMoveLineListToReconcile(PaymentSchedule paymentSchedule){
  return MoveLine.filter("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str",IMove.VALIDATED_MOVE,true,IInvoice.CLIENT_SALE,paymentSchedule).fetch();
}

Fixed version (ground truth):
/** 
 * Méthode permettant de récupérer les factures d'échéance mensu grand compte d'un échéancier
 * @param paymentSchedule Un échéancier
 * @return
 */
public List<MoveLine> getInvoiceMoveLineListToReconcile(PaymentSchedule paymentSchedule){
  return (List<MoveLine>)MoveLine.filter("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str",IMove.VALIDATED_MOVE,true,IInvoice.CLIENT_SALE,paymentSchedule).fetch();
}
Program: 59015
Project: 59015
Buggy source:
public List<MoveLine> getInvoiceToExport(Company company,LocalDate scheduleDate,Currency currency){
  List<MoveLine> moveLineInvoiceList=new ArrayList<MoveLine>();
  PaymentMode paymentMode=company.getAccountConfig().getDirectDebitPaymentMode();
  List<MoveLine> moveLineList=MoveLine.filter("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str",IMove.VALIDATED_MOVE,company,true,paymentMode,currency).fetch();
  for (  MoveLine moveLine : moveLineList) {
    if (!this.isDebitBlocking(moveLine.getMove().getInvoice())) {
      moveLineInvoiceList.add(moveLine);
    }
  }
  List<Invoice> invoiceRejectList=Invoice.filter("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str",paymentMode,company,IMove.VALIDATED_MOVE,currency).fetch();
  for (  Invoice invoice : invoiceRejectList) {
    if (!this.isDebitBlocking(invoice)) {
      moveLineInvoiceList.add(invoice.getRejectMoveLine());
    }
  }
  return moveLineInvoiceList;
}

Fixed version (ground truth):
public List<MoveLine> getInvoiceToExport(Company company,LocalDate scheduleDate,Currency currency){
  List<MoveLine> moveLineInvoiceList=new ArrayList<MoveLine>();
  PaymentMode paymentMode=company.getAccountConfig().getDirectDebitPaymentMode();
  List<MoveLine> moveLineList=(List<MoveLine>)MoveLine.filter("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str",IMove.VALIDATED_MOVE,company,true,paymentMode,currency).fetch();
  for (  MoveLine moveLine : moveLineList) {
    if (!this.isDebitBlocking(moveLine.getMove().getInvoice())) {
      moveLineInvoiceList.add(moveLine);
    }
  }
  List<Invoice> invoiceRejectList=(List<Invoice>)Invoice.filter("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str",paymentMode,company,IMove.VALIDATED_MOVE,currency).fetch();
  for (  Invoice invoice : invoiceRejectList) {
    if (!this.isDebitBlocking(invoice)) {
      moveLineInvoiceList.add(invoice.getRejectMoveLine());
    }
  }
  return moveLineInvoiceList;
}
Program: 59016
Project: 59016
Buggy source:
@Override public void process(){
  AccountingBatch accountingBatch=batch.getAccountingBatch();
  Company company=accountingBatch.getCompany();
  boolean updateCustAccountOk=accountingBatch.getUpdateCustAccountOk();
  boolean updateDueCustAccountOk=accountingBatch.getUpdateDueCustAccountOk();
  boolean updateDueReminderCustAccountOk=accountingBatch.getUpdateDueReminderCustAccountOk();
  List<AccountingSituation> accountingSituationList=AccountingSituation.all().filter("String_Node_Str",company).fetch();
  int i=0;
  JPA.clear();
  for (  AccountingSituation accountingSituation : accountingSituationList) {
    try {
      accountingSituation=accountCustomerService.updateAccountingSituationCustomerAccount(AccountingSituation.find(accountingSituation.getId()),updateCustAccountOk,updateDueCustAccountOk,updateDueReminderCustAccountOk);
      if (accountingSituation != null) {
        this.updateAccountingSituation(accountingSituation);
        i++;
      }
    }
 catch (    Exception e) {
      TraceBackService.trace(new Exception(String.format("String_Node_Str",AccountingSituation.find(accountingSituation.getId()).getName()),e),IException.ACCOUNT_CUSTOMER,batch.getId());
      incrementAnomaly();
      LOG.error("String_Node_Str",AccountingSituation.find(accountingSituation.getId()).getName());
    }
 finally {
      if (i % 1 == 0) {
        JPA.clear();
      }
    }
  }
}

Fixed version (ground truth):
@Override public void process(){
  AccountingBatch accountingBatch=batch.getAccountingBatch();
  Company company=accountingBatch.getCompany();
  boolean updateCustAccountOk=accountingBatch.getUpdateCustAccountOk();
  boolean updateDueCustAccountOk=accountingBatch.getUpdateDueCustAccountOk();
  boolean updateDueReminderCustAccountOk=accountingBatch.getUpdateDueReminderCustAccountOk();
  List<AccountingSituation> accountingSituationList=(List<AccountingSituation>)AccountingSituation.all().filter("String_Node_Str",company).fetch();
  int i=0;
  JPA.clear();
  for (  AccountingSituation accountingSituation : accountingSituationList) {
    try {
      accountingSituation=accountCustomerService.updateAccountingSituationCustomerAccount(AccountingSituation.find(accountingSituation.getId()),updateCustAccountOk,updateDueCustAccountOk,updateDueReminderCustAccountOk);
      if (accountingSituation != null) {
        this.updateAccountingSituation(accountingSituation);
        i++;
      }
    }
 catch (    Exception e) {
      TraceBackService.trace(new Exception(String.format("String_Node_Str",AccountingSituation.find(accountingSituation.getId()).getName()),e),IException.ACCOUNT_CUSTOMER,batch.getId());
      incrementAnomaly();
      LOG.error("String_Node_Str",AccountingSituation.find(accountingSituation.getId()).getName());
    }
 finally {
      if (i % 1 == 0) {
        JPA.clear();
      }
    }
  }
}
Program: 59017
Project: 59017
Buggy source:
public String updateAccountingSituationMarked(Company company){
  int anomaly=0;
  List<AccountingSituation> accountingSituationList=null;
  if (company != null) {
    accountingSituationList=AccountingSituation.all().filter("String_Node_Str",company).fetch();
  }
 else {
    accountingSituationList=AccountingSituation.all().filter("String_Node_Str").fetch();
  }
  int i=0;
  JPA.clear();
  for (  AccountingSituation accountingSituation : accountingSituationList) {
    try {
      accountingSituation=accountCustomerService.updateAccountingSituationCustomerAccount(AccountingSituation.find(accountingSituation.getId()),true,true,false);
      if (accountingSituation != null) {
        i++;
      }
    }
 catch (    Exception e) {
      TraceBackService.trace(new Exception(String.format("String_Node_Str",AccountingSituation.find(accountingSituation.getId()).getName()),e),IException.ACCOUNT_CUSTOMER,batch.getId());
      anomaly++;
      LOG.error("String_Node_Str",AccountingSituation.find(accountingSituation.getId()));
    }
 finally {
      if (i % 5 == 0) {
        JPA.clear();
      }
    }
  }
  if (anomaly != 0) {
    return "String_Node_Str" + anomaly + "String_Node_Str";
  }
 else {
    return "String_Node_Str" + i + "String_Node_Str";
  }
}

Fixed version (ground truth):
public String updateAccountingSituationMarked(Company company){
  int anomaly=0;
  List<AccountingSituation> accountingSituationList=null;
  if (company != null) {
    accountingSituationList=(List<AccountingSituation>)AccountingSituation.all().filter("String_Node_Str",company).fetch();
  }
 else {
    accountingSituationList=(List<AccountingSituation>)AccountingSituation.all().filter("String_Node_Str").fetch();
  }
  int i=0;
  JPA.clear();
  for (  AccountingSituation accountingSituation : accountingSituationList) {
    try {
      accountingSituation=accountCustomerService.updateAccountingSituationCustomerAccount(AccountingSituation.find(accountingSituation.getId()),true,true,false);
      if (accountingSituation != null) {
        i++;
      }
    }
 catch (    Exception e) {
      TraceBackService.trace(new Exception(String.format("String_Node_Str",AccountingSituation.find(accountingSituation.getId()).getName()),e),IException.ACCOUNT_CUSTOMER,batch.getId());
      anomaly++;
      LOG.error("String_Node_Str",AccountingSituation.find(accountingSituation.getId()));
    }
 finally {
      if (i % 5 == 0) {
        JPA.clear();
      }
    }
  }
  if (anomaly != 0) {
    return "String_Node_Str" + anomaly + "String_Node_Str";
  }
 else {
    return "String_Node_Str" + i + "String_Node_Str";
  }
}
Program: 59018
Project: 59018
Buggy source:
@Override protected void process(){
  if (!stop) {
    Company company=batch.getAccountingBatch().getCompany();
    AccountConfig accountConfig=company.getAccountConfig();
    Account doubtfulCustomerAccount=accountConfig.getDoubtfulCustomerAccount();
    String sixMonthDebtPassReason=accountConfig.getSixMonthDebtPassReason();
    String threeMonthDebtPassReason=accountConfig.getThreeMonthDebtPassReason();
    List<Move> moveList=doubtfulCustomerService.getMove(0,doubtfulCustomerAccount,company);
    LOG.debug("String_Node_Str",moveList.size());
    this.createDoubtFulCustomerMove(moveList,doubtfulCustomerAccount,sixMonthDebtPassReason);
    moveList=doubtfulCustomerService.getMove(1,doubtfulCustomerAccount,company);
    LOG.debug("String_Node_Str",moveList.size());
    this.createDoubtFulCustomerMove(moveList,doubtfulCustomerAccount,threeMonthDebtPassReason);
    List<MoveLine> moveLineList=doubtfulCustomerService.getRejectMoveLine(0,doubtfulCustomerAccount,company);
    LOG.debug("String_Node_Str",moveLineList.size());
    this.createDoubtFulCustomerRejectMove(moveLineList,doubtfulCustomerAccount,sixMonthDebtPassReason);
    moveLineList=doubtfulCustomerService.getRejectMoveLine(1,doubtfulCustomerAccount,company);
    LOG.debug("String_Node_Str",moveLineList.size());
    this.createDoubtFulCustomerRejectMove(moveLineList,doubtfulCustomerAccount,threeMonthDebtPassReason);
    updateCustomerAccountLog+=batchAccountCustomer.updateAccountingSituationMarked(Company.find(company.getId()));
  }
}

Fixed version (ground truth):
@Override protected void process(){
  if (!stop) {
    Company company=batch.getAccountingBatch().getCompany();
    AccountConfig accountConfig=company.getAccountConfig();
    Account doubtfulCustomerAccount=accountConfig.getDoubtfulCustomerAccount();
    String sixMonthDebtPassReason=accountConfig.getSixMonthDebtPassReason();
    String threeMonthDebtPassReason=accountConfig.getThreeMonthDebtPassReason();
    List<Move> moveList=doubtfulCustomerService.getMove(0,doubtfulCustomerAccount,company);
    LOG.debug("String_Node_Str",moveList.size());
    this.createDoubtFulCustomerMove(moveList,doubtfulCustomerAccount,sixMonthDebtPassReason);
    moveList=doubtfulCustomerService.getMove(1,doubtfulCustomerAccount,company);
    LOG.debug("String_Node_Str",moveList.size());
    this.createDoubtFulCustomerMove(moveList,doubtfulCustomerAccount,threeMonthDebtPassReason);
    List<MoveLine> moveLineList=(List<MoveLine>)doubtfulCustomerService.getRejectMoveLine(0,doubtfulCustomerAccount,company);
    LOG.debug("String_Node_Str",moveLineList.size());
    this.createDoubtFulCustomerRejectMove(moveLineList,doubtfulCustomerAccount,sixMonthDebtPassReason);
    moveLineList=(List<MoveLine>)doubtfulCustomerService.getRejectMoveLine(1,doubtfulCustomerAccount,company);
    LOG.debug("String_Node_Str",moveLineList.size());
    this.createDoubtFulCustomerRejectMove(moveLineList,doubtfulCustomerAccount,threeMonthDebtPassReason);
    updateCustomerAccountLog+=batchAccountCustomer.updateAccountingSituationMarked(Company.find(company.getId()));
  }
}
Program: 59019
Project: 59019
Buggy source:
protected void createInvoiceCfonbFile(Batch batchToExport){
  try {
    AccountingBatch accountingBatch=Batch.find(batch.getId()).getAccountingBatch();
    cfonbExportService.exportInvoiceCFONB(batch.getStartDate(),accountingBatch.getDebitDate(),Invoice.filter("String_Node_Str",batchToExport).fetch(),accountingBatch.getCompany(),accountingBatch.getBankDetails());
  }
 catch (  AxelorException e) {
    TraceBackService.trace(new AxelorException(String.format("String_Node_Str",batch.getId()),e,e.getcategory()),IException.DIRECT_DEBIT,batch.getId());
    incrementAnomaly();
  }
catch (  Exception e) {
    TraceBackService.trace(new Exception(String.format("String_Node_Str",batch.getId()),e),IException.DIRECT_DEBIT,batch.getId());
    incrementAnomaly();
    LOG.error("String_Node_Str",batch.getId());
  }
}

Fixed version (ground truth):
protected void createInvoiceCfonbFile(Batch batchToExport){
  try {
    AccountingBatch accountingBatch=Batch.find(batch.getId()).getAccountingBatch();
    cfonbExportService.exportInvoiceCFONB(batch.getStartDate(),accountingBatch.getDebitDate(),(List<Invoice>)Invoice.filter("String_Node_Str",batchToExport).fetch(),accountingBatch.getCompany(),accountingBatch.getBankDetails());
  }
 catch (  AxelorException e) {
    TraceBackService.trace(new AxelorException(String.format("String_Node_Str",batch.getId()),e,e.getcategory()),IException.DIRECT_DEBIT,batch.getId());
    incrementAnomaly();
  }
catch (  Exception e) {
    TraceBackService.trace(new Exception(String.format("String_Node_Str",batch.getId()),e),IException.DIRECT_DEBIT,batch.getId());
    incrementAnomaly();
    LOG.error("String_Node_Str",batch.getId());
  }
}
Program: 59020
Project: 59020
Buggy source:
protected void createMonthlyCfonbFile(Batch batchToExport){
  try {
    AccountingBatch accountingBatch=Batch.find(batch.getId()).getAccountingBatch();
    cfonbExportService.exportPaymentScheduleCFONB(batch.getStartDate(),accountingBatch.getDebitDate(),PaymentScheduleLine.filter("String_Node_Str",batchToExport).fetch(),accountingBatch.getCompany(),accountingBatch.getBankDetails());
  }
 catch (  AxelorException e) {
    TraceBackService.trace(new AxelorException(String.format("String_Node_Str",batch.getId()),e,e.getcategory()),IException.DIRECT_DEBIT,batch.getId());
    incrementAnomaly();
  }
catch (  Exception e) {
    TraceBackService.trace(new Exception(String.format("String_Node_Str",batch.getId()),e),IException.DIRECT_DEBIT,batch.getId());
    incrementAnomaly();
    LOG.error("String_Node_Str",batch.getId());
  }
}

Fixed version (ground truth):
protected void createMonthlyCfonbFile(Batch batchToExport){
  try {
    AccountingBatch accountingBatch=Batch.find(batch.getId()).getAccountingBatch();
    cfonbExportService.exportPaymentScheduleCFONB(batch.getStartDate(),accountingBatch.getDebitDate(),(List<PaymentScheduleLine>)PaymentScheduleLine.filter("String_Node_Str",batchToExport).fetch(),accountingBatch.getCompany(),accountingBatch.getBankDetails());
  }
 catch (  AxelorException e) {
    TraceBackService.trace(new AxelorException(String.format("String_Node_Str",batch.getId()),e,e.getcategory()),IException.DIRECT_DEBIT,batch.getId());
    incrementAnomaly();
  }
catch (  Exception e) {
    TraceBackService.trace(new Exception(String.format("String_Node_Str",batch.getId()),e),IException.DIRECT_DEBIT,batch.getId());
    incrementAnomaly();
    LOG.error("String_Node_Str",batch.getId());
  }
}
Program: 59023
Project: 59023
Buggy source:
public void generateMail(){
  List<Mail> mailList=Mail.all().filter("String_Node_Str").fetch();
  LOG.debug("String_Node_Str",mailList.size());
  for (  Mail mail : mailList) {
    try {
      mailService.generatePdfMail(Mail.find(mail.getId()));
      mailDone++;
    }
 catch (    AxelorException e) {
      TraceBackService.trace(new AxelorException(String.format("String_Node_Str",mail.getName()),e,e.getcategory()),IException.REMINDER,batch.getId());
      mailAnomaly++;
    }
catch (    Exception e) {
      TraceBackService.trace(new Exception(String.format("String_Node_Str",mail.getName()),e),IException.REMINDER,batch.getId());
      mailAnomaly++;
      LOG.error("String_Node_Str",mail.getName());
    }
  }
}

Fixed version (ground truth):
public void generateMail(){
  List<Mail> mailList=(List<Mail>)Mail.all().filter("String_Node_Str").fetch();
  LOG.debug("String_Node_Str",mailList.size());
  for (  Mail mail : mailList) {
    try {
      mailService.generatePdfMail(Mail.find(mail.getId()));
      mailDone++;
    }
 catch (    AxelorException e) {
      TraceBackService.trace(new AxelorException(String.format("String_Node_Str",mail.getName()),e,e.getcategory()),IException.REMINDER,batch.getId());
      mailAnomaly++;
    }
catch (    Exception e) {
      TraceBackService.trace(new Exception(String.format("String_Node_Str",mail.getName()),e),IException.REMINDER,batch.getId());
      mailAnomaly++;
      LOG.error("String_Node_Str",mail.getName());
    }
  }
}
Program: 59024
Project: 59024
Buggy source:
public void reminderPartner(){
  int i=0;
  List<Partner> partnerList=Partner.all().filter("String_Node_Str",batch.getAccountingBatch().getCompany()).fetch();
  for (  Partner partner : partnerList) {
    try {
      boolean remindedOk=reminderService.reminderGenerate(Partner.find(partner.getId()),batch.getAccountingBatch().getCompany());
      if (remindedOk == true) {
        updatePartner(partner);
        i++;
      }
      LOG.debug("String_Node_Str",partner.getName());
    }
 catch (    AxelorException e) {
      TraceBackService.trace(new AxelorException(String.format("String_Node_Str",partner.getName()),e,e.getcategory()),IException.REMINDER,batch.getId());
      incrementAnomaly();
    }
catch (    Exception e) {
      TraceBackService.trace(new Exception(String.format("String_Node_Str",partner.getName()),e),IException.REMINDER,batch.getId());
      incrementAnomaly();
      LOG.error("String_Node_Str",partner.getName());
    }
 finally {
      if (i % 10 == 0) {
        JPA.clear();
      }
    }
  }
}

Fixed version (ground truth):
public void reminderPartner(){
  int i=0;
  List<Partner> partnerList=(List<Partner>)Partner.all().filter("String_Node_Str",batch.getAccountingBatch().getCompany()).fetch();
  for (  Partner partner : partnerList) {
    try {
      boolean remindedOk=reminderService.reminderGenerate(Partner.find(partner.getId()),batch.getAccountingBatch().getCompany());
      if (remindedOk == true) {
        updatePartner(partner);
        i++;
      }
      LOG.debug("String_Node_Str",partner.getName());
    }
 catch (    AxelorException e) {
      TraceBackService.trace(new AxelorException(String.format("String_Node_Str",partner.getName()),e,e.getcategory()),IException.REMINDER,batch.getId());
      incrementAnomaly();
    }
catch (    Exception e) {
      TraceBackService.trace(new Exception(String.format("String_Node_Str",partner.getName()),e),IException.REMINDER,batch.getId());
      incrementAnomaly();
      LOG.error("String_Node_Str",partner.getName());
    }
 finally {
      if (i % 10 == 0) {
        JPA.clear();
      }
    }
  }
}
Program: 59025
Project: 59025
Buggy source:
public List<BillOfMaterial> getBillOfMaterialList(Product product){
  return BillOfMaterial.filter("String_Node_Str",product).fetch();
}

Fixed version (ground truth):
public List<BillOfMaterial> getBillOfMaterialList(Product product){
  return (List<BillOfMaterial>)BillOfMaterial.filter("String_Node_Str",product).fetch();
}
Program: 59026
Project: 59026
Buggy source:
@Transactional(rollbackOn={AxelorException.class,Exception.class}) public void start(ManufOrder manufOrder){
  if (manufOrder.getOperationOrderList() != null) {
    OperationOrder operationOrderPriority=OperationOrder.filter("String_Node_Str",manufOrder).order("String_Node_Str").fetchOne();
    List<OperationOrder> operationOrderList=OperationOrder.filter("String_Node_Str",manufOrder,operationOrderPriority.getPriority()).fetch();
    for (    OperationOrder operationOrder : operationOrderList) {
      operationOrderWorkflowService.start(operationOrder);
    }
  }
  manufOrder.setStatusSelect(IManufOrder.STATUS_IN_PROGRESS);
  manufOrder.save();
}

Fixed version (ground truth):
@Transactional(rollbackOn={AxelorException.class,Exception.class}) public void start(ManufOrder manufOrder){
  if (manufOrder.getOperationOrderList() != null) {
    OperationOrder operationOrderPriority=OperationOrder.filter("String_Node_Str",manufOrder).order("String_Node_Str").fetchOne();
    List<OperationOrder> operationOrderList=(List<OperationOrder>)OperationOrder.filter("String_Node_Str",manufOrder,operationOrderPriority.getPriority()).fetch();
    for (    OperationOrder operationOrder : operationOrderList) {
      operationOrderWorkflowService.start(operationOrder);
    }
  }
  manufOrder.setStatusSelect(IManufOrder.STATUS_IN_PROGRESS);
  manufOrder.save();
}
Program: 59027
Project: 59027
Buggy source:
public List<TimesheetLine> createTimesheetLines(Timesheet timesheet,Task task) throws AxelorException {
  List<TimesheetLine> timesheetLineList=Lists.newArrayList();
  List<SpentTime> spentTimeList=SpentTime.all().filter("String_Node_Str",timesheet.getUser(),task).fetch();
  for (  SpentTime spentTime : spentTimeList) {
    timesheetLineList.add(this.createTimesheetLine(timesheet,task,spentTime));
    spentTime.setTimesheetImputed(true);
    spentTime.save();
  }
  return timesheetLineList;
}

Fixed version (ground truth):
public List<TimesheetLine> createTimesheetLines(Timesheet timesheet,Task task) throws AxelorException {
  List<TimesheetLine> timesheetLineList=Lists.newArrayList();
  List<SpentTime> spentTimeList=(List<SpentTime>)SpentTime.all().filter("String_Node_Str",timesheet.getUser(),task).fetch();
  for (  SpentTime spentTime : spentTimeList) {
    timesheetLineList.add(this.createTimesheetLine(timesheet,task,spentTime));
    spentTime.setTimesheetImputed(true);
    spentTime.save();
  }
  return timesheetLineList;
}
Program: 59028
Project: 59028
Buggy source:
public List<TimesheetLine> getTimesheetLineToInvoice(Task task){
  return TimesheetLine.all().filter("String_Node_Str",task.getId()).fetch();
}

Fixed version (ground truth):
public List<TimesheetLine> getTimesheetLineToInvoice(Task task){
  return (List<TimesheetLine>)TimesheetLine.all().filter("String_Node_Str",task.getId()).fetch();
}
Program: 59029
Project: 59029
Buggy source:
public List<ExpenseLine> getExpenseLineToInvoice(Task task){
  return ExpenseLine.all().filter("String_Node_Str",task.getId()).fetch();
}

Fixed version (ground truth):
public List<ExpenseLine> getExpenseLineToInvoice(Task task){
  return (List<ExpenseLine>)ExpenseLine.all().filter("String_Node_Str",task.getId()).fetch();
}
Program: 59030
Project: 59030
Buggy source:
@Transactional void validatePurchaseOrder(Long poId){
  try {
    PurchaseOrder purchaseOrder=PurchaseOrder.find(poId);
    purchaseOrderServiceSupplychainImpl.computePurchaseOrder(purchaseOrder);
    if (purchaseOrder.getStatusSelect() == 4 || purchaseOrder.getStatusSelect() == 5 && purchaseOrder.getLocation() == null) {
      purchaseOrderServiceSupplychainImpl.createStocksMoves(purchaseOrder);
      StockMove stockMove=StockMove.all_().filter("String_Node_Str",purchaseOrder.getId()).fetchOne();
      if (stockMove != null) {
        stockMoveService.copyQtyToRealQty(stockMove);
        stockMoveService.realize(stockMove);
        stockMove.setRealDate(purchaseOrder.getDeliveryDate());
      }
      purchaseOrder.setValidationDate(purchaseOrder.getOrderDate());
      purchaseOrder.setValidatedByUser(userSerivce.getUser());
      purchaseOrder.setSupplierPartner(purchaseOrderServiceSupplychainImpl.validateSupplier(purchaseOrder));
      Invoice invoice=purchaseOrderInvoiceService.generateInvoice(purchaseOrder);
      invoice.setInvoiceDate(purchaseOrder.getValidationDate());
      invoiceService.compute(invoice);
      invoiceService.validate(invoice);
      invoiceService.ventilate(invoice);
    }
    purchaseOrder.save();
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
@Transactional void validatePurchaseOrder(Long poId){
  try {
    PurchaseOrder purchaseOrder=PurchaseOrder.find(poId);
    purchaseOrderServiceSupplychainImpl.computePurchaseOrder(purchaseOrder);
    if (purchaseOrder.getStatusSelect() == 4 || purchaseOrder.getStatusSelect() == 5 && purchaseOrder.getLocation() == null) {
      purchaseOrderServiceSupplychainImpl.createStocksMoves(purchaseOrder);
      StockMove stockMove=StockMove.all().filter("String_Node_Str",purchaseOrder.getId()).fetchOne();
      if (stockMove != null) {
        stockMoveService.copyQtyToRealQty(stockMove);
        stockMoveService.realize(stockMove);
        stockMove.setRealDate(purchaseOrder.getDeliveryDate());
      }
      purchaseOrder.setValidationDate(purchaseOrder.getOrderDate());
      purchaseOrder.setValidatedByUser(userSerivce.getUser());
      purchaseOrder.setSupplierPartner(purchaseOrderServiceSupplychainImpl.validateSupplier(purchaseOrder));
      Invoice invoice=purchaseOrderInvoiceService.generateInvoice(purchaseOrder);
      invoice.setInvoiceDate(purchaseOrder.getValidationDate());
      invoiceService.compute(invoice);
      invoiceService.validate(invoice);
      invoiceService.ventilate(invoice);
    }
    purchaseOrder.save();
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}
Program: 59032
Project: 59032
Buggy source:
public boolean checkAddressUsed(Long addressId){
  LOG.debug("String_Node_Str",addressId);
  if (addressId != null) {
    if (Partner.all_().filter("String_Node_Str",addressId).fetchOne() != null)     return true;
  }
  return false;
}

Fixed version (ground truth):
public boolean checkAddressUsed(Long addressId){
  LOG.debug("String_Node_Str",addressId);
  if (addressId != null) {
    if (Partner.all().filter("String_Node_Str",addressId).fetchOne() != null)     return true;
  }
  return false;
}
Program: 59033
Project: 59033
Buggy source:
private void updateSalePriceOfVariant(Product product){
  List<Product> productVariantList=Product.filter("String_Node_Str",product).fetch();
  for (  Product productVariant : productVariantList) {
    productVariant.setCostPrice(product.getCostPrice());
    productVariant.setSalePrice(product.getSalePrice());
    productVariant.setManagPriceCoef(product.getManagPriceCoef());
    this.updateSalePrice(productVariant);
  }
}

Fixed version (ground truth):
private void updateSalePriceOfVariant(Product product){
  List<? extends Product> productVariantList=Product.filter("String_Node_Str",product).fetch();
  for (  Product productVariant : productVariantList) {
    productVariant.setCostPrice(product.getCostPrice());
    productVariant.setSalePrice(product.getSalePrice());
    productVariant.setManagPriceCoef(product.getManagPriceCoef());
    this.updateSalePrice(productVariant);
  }
}
Program: 59035
Project: 59035
Buggy source:
/** 
 * Obtenir le coefficient entre deux unités dans une liste de conversion. Si l'unité de départ et l'unité d'arrivée ne se trouve pas dans la liste alors on inverse l'unité de départ avec l'unité d'arrivée. Si il n'y a toujours pas de résultat alors on déclenche une exception.
 * @param unitConversionList La liste des unités de conversion.
 * @param startUnit L'unité de départ.
 * @param endUnit L'unité d'arrivée.
 * @return Le coefficient de conversion.
 * @throws AxelorException Les unités demandés ne se trouvent pas dans la liste de conversion
 */
public BigDecimal getCoefficient(List<UnitConversion> unitConversionList,Unit startUnit,Unit endUnit) throws AxelorException {
  for (  UnitConversion unitConversion : unitConversionList) {
    if (unitConversion.getStartUnit().equals(startUnit) && unitConversion.getEndUnit().equals(endUnit)) {
      return unitConversion.getCoef();
    }
  }
  for (  UnitConversion unitConversion : unitConversionList) {
    if (unitConversion.getStartUnit().equals(endUnit) && unitConversion.getEndUnit().equals(startUnit)) {
      return BigDecimal.ONE.divide(unitConversion.getCoef(),6,RoundingMode.HALF_EVEN);
    }
  }
  throw new AxelorException(String.format(I18n.get(IExceptionMessage.UNIT_CONVERSION_1),startUnit.getName(),endUnit.getName()),IException.CONFIGURATION_ERROR);
}

Fixed version (ground truth):
/** 
 * Obtenir le coefficient entre deux unités dans une liste de conversion. Si l'unité de départ et l'unité d'arrivée ne se trouve pas dans la liste alors on inverse l'unité de départ avec l'unité d'arrivée. Si il n'y a toujours pas de résultat alors on déclenche une exception.
 * @param unitConversionList La liste des unités de conversion.
 * @param startUnit L'unité de départ.
 * @param endUnit L'unité d'arrivée.
 * @return Le coefficient de conversion.
 * @throws AxelorException Les unités demandés ne se trouvent pas dans la liste de conversion
 */
public BigDecimal getCoefficient(List<? extends UnitConversion> unitConversionList,Unit startUnit,Unit endUnit) throws AxelorException {
  for (  UnitConversion unitConversion : unitConversionList) {
    if (unitConversion.getStartUnit().equals(startUnit) && unitConversion.getEndUnit().equals(endUnit)) {
      return unitConversion.getCoef();
    }
  }
  for (  UnitConversion unitConversion : unitConversionList) {
    if (unitConversion.getStartUnit().equals(endUnit) && unitConversion.getEndUnit().equals(startUnit)) {
      return BigDecimal.ONE.divide(unitConversion.getCoef(),6,RoundingMode.HALF_EVEN);
    }
  }
  throw new AxelorException(String.format(I18n.get(IExceptionMessage.UNIT_CONVERSION_1),startUnit.getName(),endUnit.getName()),IException.CONFIGURATION_ERROR);
}
Program: 59036
Project: 59036
Buggy source:
private void generateMenuGraph(List<? extends MetaMenu> menuList){
  for (  MetaMenu menu : menuList) {
    String model=menu.getAction() != null ? menu.getAction().getModel() : null;
    if (model != null && !objectList.contains(model)) {
      updateFieldData(menu.getAction());
    }
    List<? extends MetaMenu> childList=MetaMenu.all_().filter("String_Node_Str",menu,group).order("String_Node_Str").order("String_Node_Str").fetch();
    generateMenuGraph(childList);
  }
}

Fixed version (ground truth):
private void generateMenuGraph(List<? extends MetaMenu> menuList){
  for (  MetaMenu menu : menuList) {
    String model=menu.getAction() != null ? menu.getAction().getModel() : null;
    if (model != null && !objectList.contains(model)) {
      updateFieldData(menu.getAction());
    }
    List<? extends MetaMenu> childList=MetaMenu.all().filter("String_Node_Str",menu,group).order("String_Node_Str").order("String_Node_Str").fetch();
    generateMenuGraph(childList);
  }
}
Program: 59037
Project: 59037
Buggy source:
private void writeObjects(File objectFile){
  try {
    List<? extends MetaMenu> menuList=MetaMenu.all_().filter("String_Node_Str",group).order("String_Node_Str").order("String_Node_Str").fetch();
    log.debug("String_Node_Str",menuList.size());
    generateMenuGraph(menuList);
    CsvTool.csvWriter(objectFile.getParent(),objectFile.getName(),';',csvHeaders,fieldDataList);
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
private void writeObjects(File objectFile){
  try {
    List<? extends MetaMenu> menuList=MetaMenu.all().filter("String_Node_Str",group).order("String_Node_Str").order("String_Node_Str").fetch();
    log.debug("String_Node_Str",menuList.size());
    generateMenuGraph(menuList);
    CsvTool.csvWriter(objectFile.getParent(),objectFile.getName(),';',csvHeaders,fieldDataList);
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}
Program: 59038
Project: 59038
Buggy source:
public Set<MetaField> setFields(String model) throws IOException {
  LOG.debug("String_Node_Str",model);
  Set<MetaField> fieldSet=new HashSet<MetaField>();
  List<String> fields=new ArrayList<String>();
  for (  MetaField field : MetaField.all_().filter("String_Node_Str",model).fetch()) {
    fieldSet.add(field);
    fields.add(field.getName());
  }
  LOG.debug("String_Node_Str",fields);
  return fieldSet;
}

Fixed version (ground truth):
public Set<MetaField> setFields(String model) throws IOException {
  LOG.debug("String_Node_Str",model);
  Set<MetaField> fieldSet=new HashSet<MetaField>();
  List<String> fields=new ArrayList<String>();
  for (  MetaField field : MetaField.all().filter("String_Node_Str",model).fetch()) {
    fieldSet.add(field);
    fields.add(field.getName());
  }
  LOG.debug("String_Node_Str",fields);
  return fieldSet;
}
Program: 59039
Project: 59039
Buggy source:
public List<MoveLine> getExcessPayment(AccountClearance accountClearance) throws AxelorException {
  Company company=accountClearance.getCompany();
  this.testCompanyField(company);
  List<MoveLine> moveLineList=MoveLine.filter("String_Node_Str" + "String_Node_Str",company,IMove.VALIDATED_MOVE,accountClearance.getAmountThreshold(),company.getAccountConfig().getClearanceAccountSet(),accountClearance.getDateThreshold()).fetch();
  LOG.debug("String_Node_Str",moveLineList);
  return moveLineList;
}

Fixed version (ground truth):
public List<? extends MoveLine> getExcessPayment(AccountClearance accountClearance) throws AxelorException {
  Company company=accountClearance.getCompany();
  this.testCompanyField(company);
  List<? extends MoveLine> moveLineList=MoveLine.filter("String_Node_Str" + "String_Node_Str",company,IMove.VALIDATED_MOVE,accountClearance.getAmountThreshold(),company.getAccountConfig().getClearanceAccountSet(),accountClearance.getDateThreshold()).fetch();
  LOG.debug("String_Node_Str",moveLineList);
  return moveLineList;
}
Program: 59040
Project: 59040
Buggy source:
/** 
 * Méthode permettant de récupérer l'ensemble des lignes d'écriture pour une société et un tiers
 * @param partner Un tiers
 * @param company Une société
 * @return
 */
public List<MoveLine> getMoveLine(Partner partner,Company company){
  return MoveLine.filter("String_Node_Str",partner,company).fetch();
}

Fixed version (ground truth):
/** 
 * Méthode permettant de récupérer l'ensemble des lignes d'écriture pour une société et un tiers
 * @param partner Un tiers
 * @param company Une société
 * @return
 */
public List<? extends MoveLine> getMoveLine(Partner partner,Company company){
  return MoveLine.filter("String_Node_Str",partner,company).fetch();
}