nus-yam/ex-repair huggingface dataset:
Program: 59041
Project: 59041
Buggy source:
/** 
 * Procédure permettant de remplacer les tags défini dans un mail par des valeurs
 * @param mail Un mail
 */
public Mail replaceTag(Mail mail){
  List<MailModelTag> mailModelTagList=MailModelTag.all().fetch();
  String content=mail.getContent();
  String subject=mail.getSubject();
  for (  MailModelTag mailModelTag : mailModelTagList) {
    LOG.debug("String_Node_Str",mailModelTag.getTag());
    String link=mailModelTag.getLink();
    LOG.debug("String_Node_Str",link);
    String[] links=link.split("String_Node_Str");
    LOG.debug("String_Node_Str",links.length);
    @SuppressWarnings("String_Node_Str") Class classGotten=mail.getClass();
    Field f=null;
    Object obj=mail;
    for (    String fieldName : links) {
      LOG.debug("String_Node_Str",fieldName);
      f=ObjectTool.getField(fieldName,classGotten);
      classGotten=f.getType();
      obj=ObjectTool.getObject(obj,fieldName);
      if (obj == null) {
        obj=new String("String_Node_Str");
        break;
      }
    }
    content=content.replaceAll(mailModelTag.getTag(),obj.toString());
    subject=subject.replaceAll(mailModelTag.getTag(),obj.toString());
  }
  mail.setContent(content);
  mail.setSubject(subject);
  return mail;
}

Fixed version (ground truth):
/** 
 * Procédure permettant de remplacer les tags défini dans un mail par des valeurs
 * @param mail Un mail
 */
public Mail replaceTag(Mail mail){
  List<? extends MailModelTag> mailModelTagList=MailModelTag.all().fetch();
  String content=mail.getContent();
  String subject=mail.getSubject();
  for (  MailModelTag mailModelTag : mailModelTagList) {
    LOG.debug("String_Node_Str",mailModelTag.getTag());
    String link=mailModelTag.getLink();
    LOG.debug("String_Node_Str",link);
    String[] links=link.split("String_Node_Str");
    LOG.debug("String_Node_Str",links.length);
    @SuppressWarnings("String_Node_Str") Class classGotten=mail.getClass();
    Field f=null;
    Object obj=mail;
    for (    String fieldName : links) {
      LOG.debug("String_Node_Str",fieldName);
      f=ObjectTool.getField(fieldName,classGotten);
      classGotten=f.getType();
      obj=ObjectTool.getObject(obj,fieldName);
      if (obj == null) {
        obj=new String("String_Node_Str");
        break;
      }
    }
    content=content.replaceAll(mailModelTag.getTag(),obj.toString());
    subject=subject.replaceAll(mailModelTag.getTag(),obj.toString());
  }
  mail.setContent(content);
  mail.setSubject(subject);
  return mail;
}
Program: 59042
Project: 59042
Buggy source:
/** 
 * Procédure permettant de générer les fichiers pdf des emails et courriers en masse
 */
@Transactional(rollbackOn={AxelorException.class,Exception.class}) public void generateAllPdfMail(){
  LOG.debug("String_Node_Str");
  List<Mail> mailList=Mail.filter("String_Node_Str").fetch();
  LOG.debug("String_Node_Str",mailList.size());
  for (  Mail mail : mailList) {
    try {
      this.generatePdfMail(mail);
    }
 catch (    AxelorException e) {
      TraceBackService.trace(e);
      LOG.error("String_Node_Str",mail.getName());
    }
  }
}

Fixed version (ground truth):
/** 
 * Procédure permettant de générer les fichiers pdf des emails et courriers en masse
 */
@Transactional(rollbackOn={AxelorException.class,Exception.class}) public void generateAllPdfMail(){
  LOG.debug("String_Node_Str");
  List<? extends Mail> mailList=Mail.filter("String_Node_Str").fetch();
  LOG.debug("String_Node_Str",mailList.size());
  for (  Mail mail : mailList) {
    try {
      this.generatePdfMail(mail);
    }
 catch (    AxelorException e) {
      TraceBackService.trace(e);
      LOG.error("String_Node_Str",mail.getName());
    }
  }
}
Program: 59043
Project: 59043
Buggy source:
/** 
 * Methode permettant de récupérer l'ensemble des emails/courriers associés à un contrat
 * @param contractLine Un contrat
 * @return
 */
public List<Mail> getMailList(Partner partner){
  return Mail.filter("String_Node_Str",partner).fetch();
}

Fixed version (ground truth):
/** 
 * Methode permettant de récupérer l'ensemble des emails/courriers associés à un contrat
 * @param contractLine Un contrat
 * @return
 */
public List<? extends Mail> getMailList(Partner partner){
  return Mail.filter("String_Node_Str",partner).fetch();
}
Program: 59046
Project: 59046
Buggy source:
public BigDecimal getSumDebit(String queryFilter,List<Move> moveList){
  Query q=JPA.em().createQuery("String_Node_Str" + queryFilter,BigDecimal.class);
  q.setParameter(1,moveList);
  BigDecimal result=(BigDecimal)q.getSingleResult();
  LOG.debug("String_Node_Str",result);
  if (result != null) {
    return result;
  }
 else {
    return BigDecimal.ZERO;
  }
}

Fixed version (ground truth):
public BigDecimal getSumDebit(String queryFilter,List<? extends Move> moveList){
  Query q=JPA.em().createQuery("String_Node_Str" + queryFilter,BigDecimal.class);
  q.setParameter(1,moveList);
  BigDecimal result=(BigDecimal)q.getSingleResult();
  LOG.debug("String_Node_Str",result);
  if (result != null) {
    return result;
  }
 else {
    return BigDecimal.ZERO;
  }
}
Program: 59047
Project: 59047
Buggy source:
/** 
 * Procédure permettant de créer un remboursement si un trop perçu est généré à la facture fin de cycle grand comptes
 * @param invoice Une facture
 * @throws AxelorException
 */
@Transactional(rollbackOn={AxelorException.class,Exception.class}) public void createReimbursementInvoice(Invoice invoice) throws AxelorException {
  Company company=invoice.getCompany();
  Partner partner=invoice.getPartner();
  List<MoveLine> moveLineList=MoveLine.filter("String_Node_Str" + "String_Node_Str",IMove.VALIDATED_MOVE,partner,IAccount.NULL).fetch();
  this.createReimbursementInvoice(partner,company,moveLineList);
}

Fixed version (ground truth):
/** 
 * Procédure permettant de créer un remboursement si un trop perçu est généré à la facture fin de cycle grand comptes
 * @param invoice Une facture
 * @throws AxelorException
 */
@Transactional(rollbackOn={AxelorException.class,Exception.class}) public void createReimbursementInvoice(Invoice invoice) throws AxelorException {
  Company company=invoice.getCompany();
  Partner partner=invoice.getPartner();
  List<? extends MoveLine> moveLineList=MoveLine.filter("String_Node_Str" + "String_Node_Str",IMove.VALIDATED_MOVE,partner,IAccount.NULL).fetch();
  this.createReimbursementInvoice(partner,company,moveLineList);
}
Program: 59049
Project: 59049
Buggy source:
@Deprecated public BigDecimal computeReportedBalance2(LocalDate fromDate,LocalDate toDate,Partner partner,Account account){
  List<MoveLine> moveLineList=MoveLine.all().filter("String_Node_Str",partner,fromDate,toDate,account).fetch();
  BigDecimal reportedBalanceAmount=BigDecimal.ZERO;
  for (  MoveLine moveLine : moveLineList) {
    if (moveLine.getDebit().compareTo(BigDecimal.ZERO) > 0) {
      reportedBalanceAmount=reportedBalanceAmount.subtract(moveLine.getAmountRemaining());
    }
 else     if (moveLine.getCredit().compareTo(BigDecimal.ZERO) > 0) {
      reportedBalanceAmount=reportedBalanceAmount.add(moveLine.getAmountRemaining());
    }
  }
  if (LOG.isDebugEnabled()) {
    LOG.debug("String_Node_Str",reportedBalanceAmount);
  }
  return reportedBalanceAmount;
}

Fixed version (ground truth):
@Deprecated public BigDecimal computeReportedBalance2(LocalDate fromDate,LocalDate toDate,Partner partner,Account account){
  List<? extends MoveLine> moveLineList=MoveLine.all().filter("String_Node_Str",partner,fromDate,toDate,account).fetch();
  BigDecimal reportedBalanceAmount=BigDecimal.ZERO;
  for (  MoveLine moveLine : moveLineList) {
    if (moveLine.getDebit().compareTo(BigDecimal.ZERO) > 0) {
      reportedBalanceAmount=reportedBalanceAmount.subtract(moveLine.getAmountRemaining());
    }
 else     if (moveLine.getCredit().compareTo(BigDecimal.ZERO) > 0) {
      reportedBalanceAmount=reportedBalanceAmount.add(moveLine.getAmountRemaining());
    }
  }
  if (LOG.isDebugEnabled()) {
    LOG.debug("String_Node_Str",reportedBalanceAmount);
  }
  return reportedBalanceAmount;
}
Program: 59050
Project: 59050
Buggy source:
/** 
 * Fonction permettant de récupérer les lignes d'écriture de rejet de facture à transférer sur le compte client douteux 
 * @param rule Le règle à appliquer : <ul> <li>0 = Créance de + 6 mois</li> <li>1 = Créance de + 3 mois</li> </ul>
 * @param doubtfulCustomerAccount Le compte client douteux
 * @param company La société
 * @return Les lignes d'écriture de rejet de facture à transférer sur le comtpe client douteux
 */
public List<MoveLine> getRejectMoveLine(int rule,Account doubtfulCustomerAccount,Company company){
  LocalDate date=null;
  List<MoveLine> moveLineList=null;
switch (rule) {
case 0:
    date=this.today.minusMonths(company.getAccountConfig().getSixMonthDebtMonthNumber());
  moveLineList=MoveLine.filter("String_Node_Str" + "String_Node_Str" + "String_Node_Str",company,date,doubtfulCustomerAccount).fetch();
break;
case 1:
date=this.today.minusMonths(company.getAccountConfig().getThreeMonthDebtMontsNumber());
moveLineList=MoveLine.filter("String_Node_Str" + "String_Node_Str" + "String_Node_Str",company,date,doubtfulCustomerAccount).fetch();
break;
default :
break;
}
LOG.debug("String_Node_Str",date);
return moveLineList;
}

Fixed version (ground truth):
/** 
 * Fonction permettant de récupérer les lignes d'écriture de rejet de facture à transférer sur le compte client douteux 
 * @param rule Le règle à appliquer : <ul> <li>0 = Créance de + 6 mois</li> <li>1 = Créance de + 3 mois</li> </ul>
 * @param doubtfulCustomerAccount Le compte client douteux
 * @param company La société
 * @return Les lignes d'écriture de rejet de facture à transférer sur le comtpe client douteux
 */
public List<? extends MoveLine> getRejectMoveLine(int rule,Account doubtfulCustomerAccount,Company company){
  LocalDate date=null;
  List<? extends MoveLine> moveLineList=null;
switch (rule) {
case 0:
    date=this.today.minusMonths(company.getAccountConfig().getSixMonthDebtMonthNumber());
  moveLineList=MoveLine.filter("String_Node_Str" + "String_Node_Str" + "String_Node_Str",company,date,doubtfulCustomerAccount).fetch();
break;
case 1:
date=this.today.minusMonths(company.getAccountConfig().getThreeMonthDebtMontsNumber());
moveLineList=MoveLine.filter("String_Node_Str" + "String_Node_Str" + "String_Node_Str",company,date,doubtfulCustomerAccount).fetch();
break;
default :
break;
}
LOG.debug("String_Node_Str",date);
return moveLineList;
}
Program: 59051
Project: 59051
Buggy source:
/** 
 * Méthode permettant de récupérer l'ensemble des lignes d'écriture d'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 d'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();
}
Program: 59052
Project: 59052
Buggy source:
public BigDecimal getSubstractBalanceDue(Partner partner){
  List<MoveLine> moveLineQuery=MoveLine.filter("String_Node_Str",partner).fetch();
  BigDecimal balance=BigDecimal.ZERO;
  for (  MoveLine moveLine : moveLineQuery) {
    if (moveLine.getCredit().compareTo(BigDecimal.ZERO) > 0) {
      if (moveLine.getAccount() != null && moveLine.getAccount().getReconcileOk()) {
        balance=balance.subtract(moveLine.getAmountRemaining());
      }
    }
  }
  return balance;
}

Fixed version (ground truth):
public BigDecimal getSubstractBalanceDue(Partner partner){
  List<? extends MoveLine> moveLineQuery=MoveLine.filter("String_Node_Str",partner).fetch();
  BigDecimal balance=BigDecimal.ZERO;
  for (  MoveLine moveLine : moveLineQuery) {
    if (moveLine.getCredit().compareTo(BigDecimal.ZERO) > 0) {
      if (moveLine.getAccount() != null && moveLine.getAccount().getReconcileOk()) {
        balance=balance.subtract(moveLine.getAmountRemaining());
      }
    }
  }
  return balance;
}
Program: 59053
Project: 59053
Buggy source:
/** 
 * Récupérer la liste des factures à traiter.
 * @param invoiceBatch Le batch de facturation concerné.
 * @return Une liste de facture.
 */
protected static Collection<Invoice> invoices(InvoiceBatch invoiceBatch,boolean isTo){
  if (invoiceBatch.getOnSelectOk()) {
    return invoiceBatch.getInvoiceSet();
  }
 else {
    return invoiceQuery(invoiceBatch,isTo);
  }
}

Fixed version (ground truth):
/** 
 * Récupérer la liste des factures à traiter.
 * @param invoiceBatch Le batch de facturation concerné.
 * @return Une liste de facture.
 */
protected static Collection<? extends Invoice> invoices(InvoiceBatch invoiceBatch,boolean isTo){
  if (invoiceBatch.getOnSelectOk()) {
    return invoiceBatch.getInvoiceSet();
  }
 else {
    return invoiceQuery(invoiceBatch,isTo);
  }
}
Program: 59054
Project: 59054
Buggy source:
public static List<Invoice> invoiceQuery(InvoiceBatch invoiceBatch,boolean isTo){
  if (invoiceBatch != null) {
    List<Object> params=new ArrayList<Object>();
    String query="String_Node_Str";
    params.add(invoiceBatch.getCompany());
    query+="String_Node_Str";
    if (isTo) {
      params.add(invoiceBatch.getToStatusSelect());
    }
 else {
      params.add(invoiceBatch.getFromStatusSelect());
    }
    LOG.debug("String_Node_Str",query);
    return Invoice.filter(query,params.toArray()).fetch();
  }
 else {
    return new ArrayList<Invoice>();
  }
}

Fixed version (ground truth):
public static List<? extends Invoice> invoiceQuery(InvoiceBatch invoiceBatch,boolean isTo){
  if (invoiceBatch != null) {
    List<Object> params=new ArrayList<Object>();
    String query="String_Node_Str";
    params.add(invoiceBatch.getCompany());
    query+="String_Node_Str";
    if (isTo) {
      params.add(invoiceBatch.getToStatusSelect());
    }
 else {
      params.add(invoiceBatch.getFromStatusSelect());
    }
    LOG.debug("String_Node_Str",query);
    return Invoice.filter(query,params.toArray()).fetch();
  }
 else {
    return new ArrayList<Invoice>();
  }
}
Program: 59055
Project: 59055
Buggy source:
/** 
 * Méthode permettant de récupérer les trop-perçus pour un compte donné (411) et une facture
 * @param invoice Une facture
 * @param account Un compte
 * @return
 * @throws AxelorException
 */
public List<MoveLine> getExcessPayment(Invoice invoice,Account account) throws AxelorException {
  Company company=invoice.getCompany();
  List<MoveLine> creditMoveLines=MoveLine.filter("String_Node_Str" + "String_Node_Str" + "String_Node_Str",company,"String_Node_Str",true,invoice.getPartner(),account).fetch();
  LOG.debug("String_Node_Str",creditMoveLines.size());
  return creditMoveLines;
}

Fixed version (ground truth):
/** 
 * Méthode permettant de récupérer les trop-perçus pour un compte donné (411) et une facture
 * @param invoice Une facture
 * @param account Un compte
 * @return
 * @throws AxelorException
 */
public List<? extends MoveLine> getExcessPayment(Invoice invoice,Account account) throws AxelorException {
  Company company=invoice.getCompany();
  List<? extends MoveLine> creditMoveLines=MoveLine.filter("String_Node_Str" + "String_Node_Str" + "String_Node_Str",company,"String_Node_Str",true,invoice.getPartner(),account).fetch();
  LOG.debug("String_Node_Str",creditMoveLines.size());
  return creditMoveLines;
}
Program: 59056
Project: 59056
Buggy source:
public List<MoveLine> getInvoiceDue(Invoice invoice,boolean useOthersInvoiceDue) throws AxelorException {
  Company company=invoice.getCompany();
  Partner partner=invoice.getPartner();
  List<MoveLine> debitMoveLines=ms.getOrignalInvoiceFromRefund(invoice);
  List<MoveLine> othersDebitMoveLines=null;
  if (useOthersInvoiceDue) {
    if (debitMoveLines != null && debitMoveLines.size() != 0) {
      othersDebitMoveLines=MoveLine.filter("String_Node_Str" + "String_Node_Str" + "String_Node_Str",company,"String_Node_Str",true,partner,debitMoveLines).fetch();
    }
 else {
      othersDebitMoveLines=MoveLine.filter("String_Node_Str" + "String_Node_Str" + "String_Node_Str",company,"String_Node_Str",true,partner).fetch();
    }
    debitMoveLines.addAll(othersDebitMoveLines);
  }
  LOG.debug("String_Node_Str",debitMoveLines.size());
  return debitMoveLines;
}

Fixed version (ground truth):
public List<? extends MoveLine> getInvoiceDue(Invoice invoice,boolean useOthersInvoiceDue) throws AxelorException {
  Company company=invoice.getCompany();
  Partner partner=invoice.getPartner();
  List<? extends MoveLine> debitMoveLines=ms.getOrignalInvoiceFromRefund(invoice);
  List<? extends MoveLine> othersDebitMoveLines=null;
  if (useOthersInvoiceDue) {
    if (debitMoveLines != null && debitMoveLines.size() != 0) {
      othersDebitMoveLines=MoveLine.filter("String_Node_Str" + "String_Node_Str" + "String_Node_Str",company,"String_Node_Str",true,partner,debitMoveLines).fetch();
    }
 else {
      othersDebitMoveLines=MoveLine.filter("String_Node_Str" + "String_Node_Str" + "String_Node_Str",company,"String_Node_Str",true,partner).fetch();
    }
    debitMoveLines.addAll(othersDebitMoveLines);
  }
  LOG.debug("String_Node_Str",debitMoveLines.size());
  return debitMoveLines;
}
Program: 59057
Project: 59057
Buggy source:
/** 
 * Récupérer les éléments à payer dans le bon ordre
 * @return
 */
public List<PaymentInvoiceToPay> getPaymentInvoiceToPayList(PaymentVoucher paymentVoucher){
  return PaymentInvoiceToPay.filter("String_Node_Str",paymentVoucher).fetch();
}

Fixed version (ground truth):
/** 
 * Récupérer les éléments à payer dans le bon ordre
 * @return
 */
public List<? extends PaymentInvoiceToPay> getPaymentInvoiceToPayList(PaymentVoucher paymentVoucher){
  return PaymentInvoiceToPay.filter("String_Node_Str",paymentVoucher).fetch();
}
Program: 59058
Project: 59058
Buggy source:
/** 
 * Searching move lines to pay
 * @param pv paymentVoucher
 * @param mlToIgnore moveLine list to ignore
 * @return moveLines a list of moveLines
 * @throws AxelorException 
 */
public List<MoveLine> getMoveLines(PaymentVoucher paymentVoucher,MoveLine excludeMoveLine) throws AxelorException {
  List<MoveLine> moveLines=null;
  String query="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  if (paymentVoucherToolService.isDebitToPay(paymentVoucher)) {
    query+="String_Node_Str";
  }
 else {
    query+="String_Node_Str";
  }
  moveLines=MoveLine.filter(query,paymentVoucher.getPartner(),paymentVoucher.getCompany()).fetch();
  moveLines.remove(excludeMoveLine);
  return moveLines;
}

Fixed version (ground truth):
/** 
 * Searching move lines to pay
 * @param pv paymentVoucher
 * @param mlToIgnore moveLine list to ignore
 * @return moveLines a list of moveLines
 * @throws AxelorException 
 */
public List<MoveLine> getMoveLines(PaymentVoucher paymentVoucher,MoveLine excludeMoveLine) throws AxelorException {
  List<? extends MoveLine> moveLines=null;
  String query="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  if (paymentVoucherToolService.isDebitToPay(paymentVoucher)) {
    query+="String_Node_Str";
  }
 else {
    query+="String_Node_Str";
  }
  moveLines=MoveLine.filter(query,paymentVoucher.getPartner(),paymentVoucher.getCompany()).fetch();
  moveLines.remove(excludeMoveLine);
  return moveLines;
}
Program: 59059
Project: 59059
Buggy source:
/** 
 * Méthode qui retourne le User de l'utilisateur connecté
 * @return UserLe user de l'utilisateur
 */
public User getUser(){
  User user=null;
  try {
    user=AuthUtils.getUser();
  }
 catch (  Exception ex) {
  }
  if (user == null) {
    user=User.findByCode("String_Node_Str");
    return user;
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Méthode qui retourne le User de l'utilisateur connecté
 * @return UserLe user de l'utilisateur
 */
public User getUser(){
  User user=null;
  try {
    user=AuthUtils.getUser();
  }
 catch (  Exception ex) {
  }
  if (user == null) {
    user=User.findByCode("String_Node_Str");
  }
  return user;
}
Program: 59060
Project: 59060
Buggy source:
public MessageServiceCrmImpl(UserService userService){
  super(userService);
}

Fixed version (ground truth):
@Inject public MessageServiceCrmImpl(UserService userService){
  super(userService);
}
Program: 59061
Project: 59061
Buggy source:
public void assignToMe(ActionRequest request,ActionResponse response){
  if (request.getContext().get("String_Node_Str") != null) {
    Opportunity opportunity=Opportunity.find((Long)request.getContext().get("String_Node_Str"));
    opportunity.setUserInfo(uis.getUserInfo());
    ose.saveOpportunity(opportunity);
  }
 else   if (!((List)request.getContext().get("String_Node_Str")).isEmpty()) {
    for (    Opportunity opportunity : Opportunity.all().filter("String_Node_Str",request.getContext().get("String_Node_Str")).fetch()) {
      opportunity.setUserInfo(uis.getUserInfo());
      ose.saveOpportunity(opportunity);
    }
  }
  response.setReload(true);
}

Fixed version (ground truth):
public void assignToMe(ActionRequest request,ActionResponse response){
  if (request.getContext().get("String_Node_Str") != null) {
    Opportunity opportunity=Opportunity.find((Long)request.getContext().get("String_Node_Str"));
    opportunity.setUserInfo(uis.getUserInfo());
    ose.saveOpportunity(opportunity);
  }
 else   if (!((List)request.getContext().get("String_Node_Str")).isEmpty()) {
    for (    Opportunity opportunity : Opportunity.filter("String_Node_Str",request.getContext().get("String_Node_Str")).fetch()) {
      opportunity.setUserInfo(uis.getUserInfo());
      ose.saveOpportunity(opportunity);
    }
  }
  response.setReload(true);
}
Program: 59062
Project: 59062
Buggy source:
@SuppressWarnings("String_Node_Str") public void showDuplicate(ActionRequest request,ActionResponse response){
  String object=(String)request.getContext().get("String_Node_Str");
  LOG.debug("String_Node_Str",object);
  MetaModel model=MetaModel.all_().filter("String_Node_Str",object).fetchOne();
  if (model == null) {
    response.setFlash("String_Node_Str");
    return;
  }
  String table=model.getTableName();
  LOG.debug("String_Node_Str",table);
  List<String> fieldList=new ArrayList<String>();
  List<String> joinList=new ArrayList<String>();
  for (  HashMap<String,Object> field : (List<HashMap<String,Object>>)request.getContext().get("String_Node_Str")) {
    if ((Boolean)field.get("String_Node_Str")) {
      String name=CaseFormat.UPPER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE,(String)field.get("String_Node_Str"));
      fieldList.add(name);
      joinList.add(String.format("String_Node_Str",name,name));
    }
  }
  if (fieldList.isEmpty()) {
    response.setFlash("String_Node_Str");
    return;
  }
  String fields=Joiner.on("String_Node_Str").join(fieldList);
  LOG.debug("String_Node_Str",fields);
  LOG.debug("String_Node_Str",joinList);
  Query query=JPA.em().createNativeQuery(String.format("String_Node_Str",table,fields,table,fields,Joiner.on("String_Node_Str").join(joinList)));
  List<String> ids=new ArrayList<String>();
  for (  Object id : query.getResultList())   ids.add(id.toString());
  if (ids.isEmpty())   response.setFlash("String_Node_Str");
 else   response.setView(ActionView.define("String_Node_Str").model(object).add("String_Node_Str","String_Node_Str").add("String_Node_Str","String_Node_Str").domain("String_Node_Str" + Joiner.on("String_Node_Str").join(ids) + "String_Node_Str").map());
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public void showDuplicate(ActionRequest request,ActionResponse response){
  String object=(String)request.getContext().get("String_Node_Str");
  LOG.debug("String_Node_Str",object);
  List<String> joinList=new ArrayList<String>();
  joinList.add("String_Node_Str");
  for (  HashMap<String,Object> field : (List<HashMap<String,Object>>)request.getContext().get("String_Node_Str")) {
    if ((Boolean)field.get("String_Node_Str"))     joinList.add("String_Node_Str" + field.get("String_Node_Str") + "String_Node_Str"+ field.get("String_Node_Str"));
  }
  if (joinList.size() > 1) {
    LOG.debug("String_Node_Str",joinList);
    Query query=JPA.em().createQuery("String_Node_Str" + object + "String_Node_Str"+ object+ "String_Node_Str"+ Joiner.on("String_Node_Str").join(joinList));
    String ids=Joiner.on("String_Node_Str").join(query.getResultList());
    if (ids.isEmpty())     response.setFlash("String_Node_Str");
 else     response.setView(ActionView.define("String_Node_Str").model(object).domain("String_Node_Str" + ids + "String_Node_Str").map());
  }
 else   response.setFlash("String_Node_Str");
}
Program: 59063
Project: 59063
Buggy source:
public void updateCurrencyConversion(ActionRequest request,ActionResponse response){
  General general=request.getContext().asType(General.class);
  LocalDate today=gs.getTodayDate();
  for (  CurrencyConversionLine ccl : general.getCurrencyConversionLineList()) {
    CurrencyConversionLine cclCoverd=CurrencyConversionLine.all().filter("String_Node_Str",ccl.getStartCurrency(),ccl.getEndCurrency(),today).fetchOne();
    LOG.info("String_Node_Str",today,ccl);
    if (ccl.isSelected() && ccl.getToDate() == null & cclCoverd == null) {
      BigDecimal currentRate=ccs.convert(ccl.getStartCurrency(),ccl.getEndCurrency());
      if (currentRate.compareTo(new BigDecimal(-1)) == 0) {
        response.setFlash("String_Node_Str");
        break;
      }
      ccl=CurrencyConversionLine.find(ccl.getId());
      ccl.setToDate(today.minusDays(1));
      ccs.saveCurrencyConversionLine(ccl);
      BigDecimal previousRate=ccl.getExchangeRate();
      String variations=ccs.getVariations(currentRate,previousRate);
      ccs.createCurrencyConversionLine(ccl.getStartCurrency(),ccl.getEndCurrency(),today,currentRate,General.find(general.getId()),variations);
    }
  }
  response.setReload(true);
}

Fixed version (ground truth):
public void updateCurrencyConversion(ActionRequest request,ActionResponse response){
  General general=request.getContext().asType(General.class);
  LocalDate today=GeneralService.getTodayDate();
  for (  CurrencyConversionLine ccl : general.getCurrencyConversionLineList()) {
    CurrencyConversionLine cclCoverd=CurrencyConversionLine.all_().filter("String_Node_Str",ccl.getStartCurrency(),ccl.getEndCurrency(),today).fetchOne();
    LOG.info("String_Node_Str",today,ccl);
    if (ccl.isSelected() && ccl.getToDate() == null & cclCoverd == null) {
      BigDecimal currentRate=ccs.convert(ccl.getStartCurrency(),ccl.getEndCurrency());
      if (currentRate.compareTo(new BigDecimal(-1)) == 0) {
        response.setFlash("String_Node_Str");
        break;
      }
      ccl=CurrencyConversionLine.find(ccl.getId());
      ccl.setToDate(today.minusDays(1));
      ccs.saveCurrencyConversionLine(ccl);
      BigDecimal previousRate=ccl.getExchangeRate();
      String variations=ccs.getVariations(currentRate,previousRate);
      ccs.createCurrencyConversionLine(ccl.getStartCurrency(),ccl.getEndCurrency(),today,currentRate,General.find(general.getId()),variations);
    }
  }
  response.setReload(true);
}
Program: 59064
Project: 59064
Buggy source:
@Path("String_Node_Str") @GET @Produces(MediaType.APPLICATION_JSON) public JsonNode getSuppliers(){
  List<? extends Partner> customers=Partner.all_().filter("String_Node_Str",2,3,false).fetch();
  JsonNodeFactory factory=JsonNodeFactory.instance;
  ObjectNode mainNode=factory.objectNode();
  ArrayNode arrayNode=factory.arrayNode();
  for (  Partner supplier : customers) {
    ObjectNode objectNode=factory.objectNode();
    objectNode.put("String_Node_Str",supplier.getFullName());
    objectNode.put("String_Node_Str",supplier.getFixedPhone() != null ? supplier.getFixedPhone() : "String_Node_Str");
    if (supplier.getEmailAddress() != null) {
      objectNode.put("String_Node_Str",supplier.getEmailAddress().getAddress());
    }
    if (supplier.getMainInvoicingAddress() != null) {
      Address address=supplier.getMainInvoicingAddress();
      String addressString=makeAddressString(address,objectNode);
      objectNode.put("String_Node_Str",addressString);
    }
    objectNode.put("String_Node_Str","String_Node_Str");
    objectNode.put("String_Node_Str","String_Node_Str");
    arrayNode.add(objectNode);
  }
  mainNode.put("String_Node_Str",0);
  mainNode.put("String_Node_Str",arrayNode);
  return mainNode;
}

Fixed version (ground truth):
@Transactional @Path("String_Node_Str") @GET @Produces(MediaType.APPLICATION_JSON) public JsonNode getSuppliers(){
  List<? extends Partner> customers=Partner.all_().filter("String_Node_Str",2,3,false).fetch();
  JsonNodeFactory factory=JsonNodeFactory.instance;
  ObjectNode mainNode=factory.objectNode();
  ArrayNode arrayNode=factory.arrayNode();
  for (  Partner supplier : customers) {
    ObjectNode objectNode=factory.objectNode();
    objectNode.put("String_Node_Str",supplier.getFullName());
    objectNode.put("String_Node_Str",supplier.getFixedPhone() != null ? supplier.getFixedPhone() : "String_Node_Str");
    if (supplier.getEmailAddress() != null) {
      objectNode.put("String_Node_Str",supplier.getEmailAddress().getAddress());
    }
    if (supplier.getMainInvoicingAddress() != null) {
      Address address=supplier.getMainInvoicingAddress();
      String addressString=makeAddressString(address,objectNode);
      address.save();
      objectNode.put("String_Node_Str",addressString);
    }
    objectNode.put("String_Node_Str","String_Node_Str");
    objectNode.put("String_Node_Str","String_Node_Str");
    arrayNode.add(objectNode);
  }
  mainNode.put("String_Node_Str",0);
  mainNode.put("String_Node_Str",arrayNode);
  return mainNode;
}
Program: 59065
Project: 59065
Buggy source:
@Path("String_Node_Str") @GET @Produces(MediaType.APPLICATION_JSON) public JsonNode getCustomers(){
  List<? extends Partner> customers=Partner.all_().filter("String_Node_Str",3,false).fetch();
  JsonNodeFactory factory=JsonNodeFactory.instance;
  ObjectNode mainNode=factory.objectNode();
  ArrayNode arrayNode=factory.arrayNode();
  for (  Partner customer : customers) {
    ObjectNode objectNode=factory.objectNode();
    objectNode.put("String_Node_Str",customer.getFullName());
    objectNode.put("String_Node_Str",customer.getFixedPhone() != null ? customer.getFixedPhone() : "String_Node_Str");
    if (customer.getEmailAddress() != null) {
      objectNode.put("String_Node_Str",customer.getEmailAddress().getAddress());
    }
    if (customer.getMainInvoicingAddress() != null) {
      Address address=customer.getMainInvoicingAddress();
      String addressString=makeAddressString(address,objectNode);
      objectNode.put("String_Node_Str",addressString);
    }
    objectNode.put("String_Node_Str","String_Node_Str");
    objectNode.put("String_Node_Str","String_Node_Str");
    arrayNode.add(objectNode);
  }
  mainNode.put("String_Node_Str",0);
  mainNode.put("String_Node_Str",arrayNode);
  return mainNode;
}

Fixed version (ground truth):
@Transactional @Path("String_Node_Str") @GET @Produces(MediaType.APPLICATION_JSON) public JsonNode getCustomers(){
  List<? extends Partner> customers=Partner.all_().filter("String_Node_Str",3,false).fetch();
  JsonNodeFactory factory=JsonNodeFactory.instance;
  ObjectNode mainNode=factory.objectNode();
  ArrayNode arrayNode=factory.arrayNode();
  for (  Partner customer : customers) {
    ObjectNode objectNode=factory.objectNode();
    objectNode.put("String_Node_Str",customer.getFullName());
    objectNode.put("String_Node_Str",customer.getFixedPhone() != null ? customer.getFixedPhone() : "String_Node_Str");
    if (customer.getEmailAddress() != null) {
      objectNode.put("String_Node_Str",customer.getEmailAddress().getAddress());
    }
    if (customer.getMainInvoicingAddress() != null) {
      Address address=customer.getMainInvoicingAddress();
      String addressString=makeAddressString(address,objectNode);
      address.save();
      objectNode.put("String_Node_Str",addressString);
    }
    objectNode.put("String_Node_Str","String_Node_Str");
    objectNode.put("String_Node_Str","String_Node_Str");
    arrayNode.add(objectNode);
  }
  mainNode.put("String_Node_Str",0);
  mainNode.put("String_Node_Str",arrayNode);
  return mainNode;
}
Program: 59067
Project: 59067
Buggy source:
@Transactional private String makeAddressString(Address address,ObjectNode objectNode){
  BigDecimal latit=address.getLatit();
  BigDecimal longit=address.getLongit();
  if (BigDecimal.ZERO.compareTo(latit) == 0 || BigDecimal.ZERO.compareTo(longit) == 0) {
    String qString=address.getFullName();
    Map<String,Object> latlng=addressService.getMapGoogle(qString,latit,longit);
    latit=(BigDecimal)latlng.get("String_Node_Str");
    longit=(BigDecimal)latlng.get("String_Node_Str");
    address.setLatit(latit);
    address.setLongit(longit);
    address.save();
  }
  objectNode.put("String_Node_Str",latit);
  objectNode.put("String_Node_Str",longit);
  StringBuilder addressString=new StringBuilder();
  if (address.getAddressL2() != null) {
    addressString.append(address.getAddressL2() + "String_Node_Str");
  }
  if (address.getAddressL3() != null) {
    addressString.append(address.getAddressL3() + "String_Node_Str");
  }
  if (address.getAddressL4() != null) {
    addressString.append(address.getAddressL4() + "String_Node_Str");
  }
  if (address.getAddressL5() != null) {
    addressString.append(address.getAddressL5() + "String_Node_Str");
  }
  if (address.getAddressL6() != null) {
    addressString.append(address.getAddressL6());
  }
  if (address.getAddressL7Country() != null) {
    addressString=addressString.append("String_Node_Str" + address.getAddressL7Country().getName());
  }
  return addressString.toString();
}

Fixed version (ground truth):
private String makeAddressString(Address address,ObjectNode objectNode){
  BigDecimal latit=address.getLatit();
  BigDecimal longit=address.getLongit();
  if (BigDecimal.ZERO.compareTo(latit) == 0 || BigDecimal.ZERO.compareTo(longit) == 0) {
    String qString=address.getFullName();
    Map<String,Object> latlng=addressService.getMapGoogle(qString,latit,longit);
    latit=(BigDecimal)latlng.get("String_Node_Str");
    longit=(BigDecimal)latlng.get("String_Node_Str");
    address.setLatit(latit);
    address.setLongit(longit);
  }
  objectNode.put("String_Node_Str",latit);
  objectNode.put("String_Node_Str",longit);
  StringBuilder addressString=new StringBuilder();
  if (address.getAddressL2() != null) {
    addressString.append(address.getAddressL2() + "String_Node_Str");
  }
  if (address.getAddressL3() != null) {
    addressString.append(address.getAddressL3() + "String_Node_Str");
  }
  if (address.getAddressL4() != null) {
    addressString.append(address.getAddressL4() + "String_Node_Str");
  }
  if (address.getAddressL5() != null) {
    addressString.append(address.getAddressL5() + "String_Node_Str");
  }
  if (address.getAddressL6() != null) {
    addressString.append(address.getAddressL6());
  }
  if (address.getAddressL7Country() != null) {
    addressString=addressString.append("String_Node_Str" + address.getAddressL7Country().getName());
  }
  return addressString.toString();
}
Program: 59068
Project: 59068
Buggy source:
@Path("String_Node_Str") @GET @Produces(MediaType.APPLICATION_JSON) public JsonNode getPartners(){
  List<? extends Partner> customers=Partner.all_().filter("String_Node_Str",2,3,2,3,false).fetch();
  JsonNodeFactory factory=JsonNodeFactory.instance;
  ObjectNode mainNode=factory.objectNode();
  ArrayNode arrayNode=factory.arrayNode();
  for (  Partner partner : customers) {
    ObjectNode objectNode=factory.objectNode();
    objectNode.put("String_Node_Str",partner.getFullName());
    objectNode.put("String_Node_Str",partner.getFixedPhone() != null ? partner.getFixedPhone() : "String_Node_Str");
    if (partner.getEmailAddress() != null) {
      objectNode.put("String_Node_Str",partner.getEmailAddress().getAddress());
    }
    if (partner.getMainInvoicingAddress() != null) {
      Address address=partner.getMainInvoicingAddress();
      String addressString=makeAddressString(address,objectNode);
      objectNode.put("String_Node_Str",addressString);
    }
    objectNode.put("String_Node_Str",partner.getCustomerTypeSelect() == 2 ? "String_Node_Str" : "String_Node_Str");
    String pinChar=partner.getCustomerTypeSelect() == 2 ? "String_Node_Str" : "String_Node_Str";
    if (partner.getSupplierTypeSelect() == 2 || partner.getSupplierTypeSelect() == 3) {
      pinChar=pinChar + "String_Node_Str";
    }
    objectNode.put("String_Node_Str",pinChar);
    arrayNode.add(objectNode);
  }
  mainNode.put("String_Node_Str",0);
  mainNode.put("String_Node_Str",arrayNode);
  return mainNode;
}

Fixed version (ground truth):
@Transactional @Path("String_Node_Str") @GET @Produces(MediaType.APPLICATION_JSON) public JsonNode getPartners(){
  List<? extends Partner> customers=Partner.all_().filter("String_Node_Str",2,3,2,3,false).fetch();
  JsonNodeFactory factory=JsonNodeFactory.instance;
  ObjectNode mainNode=factory.objectNode();
  ArrayNode arrayNode=factory.arrayNode();
  for (  Partner partner : customers) {
    ObjectNode objectNode=factory.objectNode();
    objectNode.put("String_Node_Str",partner.getFullName());
    objectNode.put("String_Node_Str",partner.getFixedPhone() != null ? partner.getFixedPhone() : "String_Node_Str");
    if (partner.getEmailAddress() != null) {
      objectNode.put("String_Node_Str",partner.getEmailAddress().getAddress());
    }
    if (partner.getMainInvoicingAddress() != null) {
      Address address=partner.getMainInvoicingAddress();
      String addressString=makeAddressString(address,objectNode);
      address.save();
      objectNode.put("String_Node_Str",addressString);
    }
    objectNode.put("String_Node_Str",partner.getCustomerTypeSelect() == 2 ? "String_Node_Str" : "String_Node_Str");
    String pinChar=partner.getCustomerTypeSelect() == 2 ? "String_Node_Str" : "String_Node_Str";
    if (partner.getSupplierTypeSelect() == 2 || partner.getSupplierTypeSelect() == 3) {
      pinChar=pinChar + "String_Node_Str";
    }
    objectNode.put("String_Node_Str",pinChar);
    arrayNode.add(objectNode);
  }
  mainNode.put("String_Node_Str",0);
  mainNode.put("String_Node_Str",arrayNode);
  return mainNode;
}
Program: 59069
Project: 59069
Buggy source:
@Path("String_Node_Str") @GET @Produces(MediaType.APPLICATION_JSON) public JsonNode getProspects(){
  List<? extends Partner> customers=Partner.all_().filter("String_Node_Str",2,false).fetch();
  JsonNodeFactory factory=JsonNodeFactory.instance;
  ObjectNode mainNode=factory.objectNode();
  ArrayNode arrayNode=factory.arrayNode();
  for (  Partner prospect : customers) {
    ObjectNode objectNode=factory.objectNode();
    objectNode.put("String_Node_Str",prospect.getFullName());
    objectNode.put("String_Node_Str",prospect.getFixedPhone() != null ? prospect.getFixedPhone() : "String_Node_Str");
    if (prospect.getEmailAddress() != null) {
      objectNode.put("String_Node_Str",prospect.getEmailAddress().getAddress());
    }
    if (prospect.getMainInvoicingAddress() != null) {
      Address address=prospect.getMainInvoicingAddress();
      String addressString=makeAddressString(address,objectNode);
      objectNode.put("String_Node_Str",addressString);
    }
    objectNode.put("String_Node_Str","String_Node_Str");
    objectNode.put("String_Node_Str","String_Node_Str");
    arrayNode.add(objectNode);
  }
  mainNode.put("String_Node_Str",0);
  mainNode.put("String_Node_Str",arrayNode);
  return mainNode;
}

Fixed version (ground truth):
@Transactional @Path("String_Node_Str") @GET @Produces(MediaType.APPLICATION_JSON) public JsonNode getProspects(){
  List<? extends Partner> customers=Partner.all_().filter("String_Node_Str",2,false).fetch();
  JsonNodeFactory factory=JsonNodeFactory.instance;
  ObjectNode mainNode=factory.objectNode();
  ArrayNode arrayNode=factory.arrayNode();
  for (  Partner prospect : customers) {
    ObjectNode objectNode=factory.objectNode();
    objectNode.put("String_Node_Str",prospect.getFullName());
    objectNode.put("String_Node_Str",prospect.getFixedPhone() != null ? prospect.getFixedPhone() : "String_Node_Str");
    if (prospect.getEmailAddress() != null) {
      objectNode.put("String_Node_Str",prospect.getEmailAddress().getAddress());
    }
    if (prospect.getMainInvoicingAddress() != null) {
      Address address=prospect.getMainInvoicingAddress();
      String addressString=makeAddressString(address,objectNode);
      address.save();
      objectNode.put("String_Node_Str",addressString);
    }
    objectNode.put("String_Node_Str","String_Node_Str");
    objectNode.put("String_Node_Str","String_Node_Str");
    arrayNode.add(objectNode);
  }
  mainNode.put("String_Node_Str",0);
  mainNode.put("String_Node_Str",arrayNode);
  return mainNode;
}
Program: 59071
Project: 59071
Buggy source:
public PurchaseOrderSupplierLine create(Partner supplierPartner){
  return new PurchaseOrderSupplierLine(IPurchaseOrderSupplierLine.REQUESTED,supplierPartner);
}

Fixed version (ground truth):
public PurchaseOrderSupplierLine create(Partner supplierPartner,BigDecimal price){
  return new PurchaseOrderSupplierLine(price,IPurchaseOrderSupplierLine.REQUESTED,supplierPartner);
}
Program: 59072
Project: 59072
Buggy source:
@Transactional(rollbackOn={AxelorException.class,Exception.class}) public void createPurchaseOrder(Partner supplierPartner,List<PurchaseOrderLine> purchaseOrderLineList,PurchaseOrder parentPurchaseOrder) throws AxelorException {
  LOG.debug("String_Node_Str",new Object[]{parentPurchaseOrder.getPurchaseOrderSeq(),supplierPartner.getFullName()});
  PurchaseOrder purchaseOrder=purchaseOrderService.createPurchaseOrder(parentPurchaseOrder.getProject(),user,parentPurchaseOrder.getCompany(),null,supplierPartner.getCurrency(),null,parentPurchaseOrder.getPurchaseOrderSeq(),parentPurchaseOrder.getExternalReference(),parentPurchaseOrder.getInvoicingTypeSelect(),purchaseOrderService.getLocation(parentPurchaseOrder.getCompany()),today,PriceList.all().filter("String_Node_Str",supplierPartner).fetchOne(),supplierPartner);
  purchaseOrder.setParentPurchaseOrder(parentPurchaseOrder);
  for (  PurchaseOrderLine purchaseOrderLine : purchaseOrderLineList) {
    purchaseOrder.addPurchaseOrderLineListItem(this.createPurchaseOrderLine(purchaseOrder,purchaseOrderLine));
  }
  purchaseOrderService.computePurchaseOrder(purchaseOrder);
  purchaseOrder.save();
}

Fixed version (ground truth):
@Transactional(rollbackOn={AxelorException.class,Exception.class}) public void createPurchaseOrder(Partner supplierPartner,List<PurchaseOrderLine> purchaseOrderLineList,PurchaseOrder parentPurchaseOrder) throws AxelorException {
  LOG.debug("String_Node_Str",new Object[]{parentPurchaseOrder.getPurchaseOrderSeq(),supplierPartner.getFullName()});
  PurchaseOrder purchaseOrder=purchaseOrderService.createPurchaseOrder(parentPurchaseOrder.getProject(),user,parentPurchaseOrder.getCompany(),null,supplierPartner.getCurrency(),null,parentPurchaseOrder.getPurchaseOrderSeq(),parentPurchaseOrder.getExternalReference(),parentPurchaseOrder.getInvoicingTypeSelect(),purchaseOrderService.getLocation(parentPurchaseOrder.getCompany()),today,PriceList.all().filter("String_Node_Str",supplierPartner).fetchOne(),supplierPartner);
  purchaseOrder.setParentPurchaseOrder(parentPurchaseOrder);
  for (  PurchaseOrderLine purchaseOrderLine : purchaseOrderLineList) {
    purchaseOrder.addPurchaseOrderLineListItem(this.createPurchaseOrderLine(purchaseOrder,purchaseOrderLine));
  }
  purchaseOrderService.computePurchaseOrder(purchaseOrder);
  purchaseOrder.setStatusSelect(IPurchaseOrder.STATUS_RECEIVED);
  purchaseOrder.save();
}
Program: 59073
Project: 59073
Buggy source:
@Transactional(rollbackOn={AxelorException.class,Exception.class}) public void generateSuppliersRequests(PurchaseOrderLine purchaseOrderLine){
  Product product=purchaseOrderLine.getProduct();
  if (product != null && product.getSupplierCatalogList() != null) {
    for (    SupplierCatalog supplierCatalog : product.getSupplierCatalogList()) {
      purchaseOrderLine.addPurchaseOrderSupplierLineListItem(purchaseOrderSupplierLineService.create(supplierCatalog.getSupplierPartner()));
    }
  }
  purchaseOrderLine.save();
}

Fixed version (ground truth):
@Transactional(rollbackOn={AxelorException.class,Exception.class}) public void generateSuppliersRequests(PurchaseOrderLine purchaseOrderLine){
  Product product=purchaseOrderLine.getProduct();
  if (product != null && product.getSupplierCatalogList() != null) {
    for (    SupplierCatalog supplierCatalog : product.getSupplierCatalogList()) {
      purchaseOrderLine.addPurchaseOrderSupplierLineListItem(purchaseOrderSupplierLineService.create(supplierCatalog.getSupplierPartner(),supplierCatalog.getPrice()));
    }
  }
  purchaseOrderLine.save();
}
Program: 59074
Project: 59074
Buggy source:
protected void checkInvoiceDate() throws AxelorException {
  if (Invoice.all().filter("String_Node_Str",invoice.getInvoiceDate(),invoice.getOperationTypeSelect()).count() > 0) {
    throw new AxelorException(String.format("String_Node_Str"),IException.CONFIGURATION_ERROR);
  }
}

Fixed version (ground truth):
protected void checkInvoiceDate() throws AxelorException {
  if (Invoice.filter("String_Node_Str",invoice.getInvoiceDate(),invoice.getOperationTypeSelect()).count() > 0) {
    throw new AxelorException(String.format("String_Node_Str"),IException.CONFIGURATION_ERROR);
  }
}
Program: 59076
Project: 59076
Buggy source:
/** 
 * Procédure permettant de vérifier le remplissage et le bon contenu des champs de la saisie paiement et de la société
 * @param paymentVoucher Une saisie paiement
 * @param company Une société
 * @param paymentModeAccount Le compte de trésoreie du mode de règlement
 * @throws AxelorException
 */
public void checkPaymentVoucherField(PaymentVoucher paymentVoucher,Company company,Account paymentModeAccount,Journal journal) throws AxelorException {
  if (paymentVoucher.getRemainingAmount().compareTo(BigDecimal.ZERO) < 0) {
    throw new AxelorException(String.format("String_Node_Str",GeneralService.getExceptionAccountingMsg(),paymentVoucher.getRef()),IException.INCONSISTENCY);
  }
  if (!paymentVoucher.getAutoOk() && (paymentVoucher.getPaymentInvoiceToPayList() == null || paymentVoucher.getPaymentInvoiceToPayList().size() == 0)) {
    throw new AxelorException(String.format("String_Node_Str",GeneralService.getExceptionAccountingMsg()),IException.INCONSISTENCY);
  }
  accountConfigService.getCustomerAccount(accountConfigService.getAccountConfig(company));
  if (journal == null || paymentModeAccount == null) {
    throw new AxelorException(String.format("String_Node_Str",GeneralService.getExceptionAccountingMsg()),IException.CONFIGURATION_ERROR);
  }
  if (journal.getEditReceiptOk()) {
    paymentVoucherSequenceService.checkReceipt(paymentVoucher);
  }
}

Fixed version (ground truth):
/** 
 * Procédure permettant de vérifier le remplissage et le bon contenu des champs de la saisie paiement et de la société
 * @param paymentVoucher Une saisie paiement
 * @param company Une société
 * @param paymentModeAccount Le compte de trésoreie du mode de règlement
 * @throws AxelorException
 */
public void checkPaymentVoucherField(PaymentVoucher paymentVoucher,Company company,Account paymentModeAccount,Journal journal) throws AxelorException {
  if (paymentVoucher.getRemainingAmount().compareTo(BigDecimal.ZERO) < 0) {
    throw new AxelorException(String.format("String_Node_Str",GeneralService.getExceptionAccountingMsg(),paymentVoucher.getRef()),IException.INCONSISTENCY);
  }
  if (!paymentVoucher.getHasAutoInput() && (paymentVoucher.getPaymentInvoiceToPayList() == null || paymentVoucher.getPaymentInvoiceToPayList().size() == 0)) {
    throw new AxelorException(String.format("String_Node_Str",GeneralService.getExceptionAccountingMsg()),IException.INCONSISTENCY);
  }
  accountConfigService.getCustomerAccount(accountConfigService.getAccountConfig(company));
  if (journal == null || paymentModeAccount == null) {
    throw new AxelorException(String.format("String_Node_Str",GeneralService.getExceptionAccountingMsg()),IException.CONFIGURATION_ERROR);
  }
  if (journal.getEditReceiptOk()) {
    paymentVoucherSequenceService.checkReceipt(paymentVoucher);
  }
}