Program: 58960
Project: 58960
Buggy source:
public void getProductInformation(ActionRequest request,ActionResponse response) throws AxelorException {
  InvoiceLine invoiceLine=request.getContext().asType(InvoiceLine.class);
  Invoice invoice=invoiceLine.getInvoice();
  if (invoice == null) {
    invoice=request.getContext().getParentContext().asType(Invoice.class);
  }
  if (invoice != null && invoiceLine.getProduct() != null) {
    try {
      boolean isPurchase=invoiceLineService.isPurchase(invoice);
      BigDecimal price=invoiceLineService.getUnitPrice(invoice,invoiceLine,isPurchase);
      response.setValue("String_Node_Str",invoiceLineService.getTaxLine(invoice,invoiceLine,isPurchase));
      response.setValue("String_Node_Str",invoiceLine.getProduct().getName());
      PriceList priceList=invoice.getPriceList();
      if (priceList != null) {
        PriceListLine priceListLine=invoiceLineService.getPriceListLine(invoiceLine,priceList);
        Map<String,Object> discounts=priceListService.getDiscounts(priceList,priceListLine,price);
        response.setValue("String_Node_Str",discounts.get("String_Node_Str"));
        response.setValue("String_Node_Str",discounts.get("String_Node_Str"));
        if (discounts.get("String_Node_Str") != null) {
          price=(BigDecimal)discounts.get("String_Node_Str");
        }
      }
      response.setValue("String_Node_Str",price);
    }
 catch (    Exception e) {
      response.setFlash(e.getMessage());
      this.resetProductInformation(response);
    }
  }
 else {
    this.resetProductInformation(response);
  }
}

Fixed version (ground truth):
public void getProductInformation(ActionRequest request,ActionResponse response) throws AxelorException {
  InvoiceLine invoiceLine=request.getContext().asType(InvoiceLine.class);
  Invoice invoice=invoiceLine.getInvoice();
  if (invoice == null) {
    invoice=request.getContext().getParentContext().asType(Invoice.class);
  }
  if (invoice != null && invoiceLine.getProduct() != null) {
    try {
      boolean isPurchase=invoiceLineService.isPurchase(invoice);
      BigDecimal price=invoiceLineService.getUnitPrice(invoice,invoiceLine,isPurchase);
      response.setValue("String_Node_Str",invoiceLineService.getTaxLine(invoice,invoiceLine,isPurchase));
      response.setValue("String_Node_Str",invoiceLine.getProduct().getName());
      response.setValue("String_Node_Str",invoiceLine.getProduct().getUnit());
      response.setValue("String_Node_Str",invoiceLine.getInvoiceLineType());
      PriceList priceList=invoice.getPriceList();
      if (priceList != null) {
        PriceListLine priceListLine=invoiceLineService.getPriceListLine(invoiceLine,priceList);
        Map<String,Object> discounts=priceListService.getDiscounts(priceList,priceListLine,price);
        response.setValue("String_Node_Str",discounts.get("String_Node_Str"));
        response.setValue("String_Node_Str",discounts.get("String_Node_Str"));
        if (discounts.get("String_Node_Str") != null) {
          price=(BigDecimal)discounts.get("String_Node_Str");
        }
      }
      response.setValue("String_Node_Str",price);
    }
 catch (    Exception e) {
      response.setFlash(e.getMessage());
      this.resetProductInformation(response);
    }
  }
 else {
    this.resetProductInformation(response);
  }
}