Program: 58636
Project: 58636
Buggy source:
@Override public void buildInitialization() throws AxelorException {
  EbicsRequest request;
  Header header;
  Body body;
  MutableHeaderType mutable;
  StaticHeaderType xstatic;
  Product product;
  BankPubKeyDigests bankPubKeyDigests;
  Authentication authentication;
  Encryption encryption;
  OrderType orderType;
  StaticHeaderOrderDetailsType orderDetails;
  mutable=EbicsXmlFactory.createMutableHeaderType("String_Node_Str",null);
  product=EbicsXmlFactory.createProduct(session.getProduct().getLanguage(),session.getProduct().getName());
  authentication=EbicsXmlFactory.createAuthentication("String_Node_Str","String_Node_Str",decodeHex(KeyUtil.getKeyDigest(session.getBankX002Key())));
  encryption=EbicsXmlFactory.createEncryption("String_Node_Str","String_Node_Str",decodeHex(KeyUtil.getKeyDigest(session.getBankX002Key())));
  bankPubKeyDigests=EbicsXmlFactory.createBankPubKeyDigests(authentication,encryption);
  orderType=EbicsXmlFactory.createOrderType(type.getOrderType());
  if (type.equals(com.axelor.apps.bank.payment.ebics.client.OrderType.FDL)) {
    FDLOrderParamsType fDLOrderParamsType;
    FileFormatType fileFormat;
    fileFormat=EbicsXmlFactory.createFileFormatType(Locale.FRANCE.getCountry().toUpperCase(),session.getSessionParam("String_Node_Str"));
    fDLOrderParamsType=EbicsXmlFactory.createFDLOrderParamsType(fileFormat);
    if (startRange != null && endRange != null) {
      DateRange range;
      range=EbicsXmlFactory.createDateRange(startRange,endRange);
      fDLOrderParamsType.setDateRange(range);
    }
    if (Boolean.getBoolean(session.getSessionParam("String_Node_Str"))) {
      Parameter parameter;
      Value value;
      value=EbicsXmlFactory.createValue("String_Node_Str","String_Node_Str");
      parameter=EbicsXmlFactory.createParameter("String_Node_Str",value);
      fDLOrderParamsType.setParameterArray(new Parameter[]{parameter});
    }
    orderDetails=EbicsXmlFactory.createStaticHeaderOrderDetailsType(session.getUser().getNextOrderId(),"String_Node_Str",orderType,fDLOrderParamsType);
  }
 else {
    StandardOrderParamsType standardOrderParamsType;
    standardOrderParamsType=EbicsXmlFactory.createStandardOrderParamsType();
    orderDetails=EbicsXmlFactory.createStaticHeaderOrderDetailsType(session.getUser().getNextOrderId(),"String_Node_Str",orderType,standardOrderParamsType);
  }
  xstatic=EbicsXmlFactory.createStaticHeaderType(session.getBankID(),nonce,session.getUser().getEbicsPartner().getPartnerId(),product,session.getUser().getSecurityMedium(),session.getUser().getUserId(),Calendar.getInstance(),orderDetails,bankPubKeyDigests);
  header=EbicsXmlFactory.createEbicsRequestHeader(true,mutable,xstatic);
  body=EbicsXmlFactory.createEbicsRequestBody();
  request=EbicsXmlFactory.createEbicsRequest(1,"String_Node_Str",header,body);
  document=EbicsXmlFactory.createEbicsRequestDocument(request);
}

Fixed version (ground truth):
@Override public void buildInitialization() throws AxelorException {
  EbicsRequest request;
  Header header;
  Body body;
  MutableHeaderType mutable;
  StaticHeaderType xstatic;
  Product product;
  BankPubKeyDigests bankPubKeyDigests;
  Authentication authentication;
  Encryption encryption;
  OrderType orderType;
  StaticHeaderOrderDetailsType orderDetails;
  mutable=EbicsXmlFactory.createMutableHeaderType("String_Node_Str",null);
  product=EbicsXmlFactory.createProduct(session.getProduct().getLanguage(),session.getProduct().getName());
  authentication=EbicsXmlFactory.createAuthentication("String_Node_Str","String_Node_Str",decodeHex(KeyUtil.getKeyDigest(session.getBankX002Key())));
  encryption=EbicsXmlFactory.createEncryption("String_Node_Str","String_Node_Str",decodeHex(KeyUtil.getKeyDigest(session.getBankE002Key())));
  bankPubKeyDigests=EbicsXmlFactory.createBankPubKeyDigests(authentication,encryption);
  orderType=EbicsXmlFactory.createOrderType(type.getOrderType());
  if (type.equals(com.axelor.apps.bank.payment.ebics.client.OrderType.FDL)) {
    FDLOrderParamsType fDLOrderParamsType;
    FileFormatType fileFormat;
    fileFormat=EbicsXmlFactory.createFileFormatType(Locale.FRANCE.getCountry().toUpperCase(),session.getSessionParam("String_Node_Str"));
    fDLOrderParamsType=EbicsXmlFactory.createFDLOrderParamsType(fileFormat);
    if (startRange != null && endRange != null) {
      DateRange range;
      range=EbicsXmlFactory.createDateRange(startRange,endRange);
      fDLOrderParamsType.setDateRange(range);
    }
    if (Boolean.getBoolean(session.getSessionParam("String_Node_Str"))) {
      Parameter parameter;
      Value value;
      value=EbicsXmlFactory.createValue("String_Node_Str","String_Node_Str");
      parameter=EbicsXmlFactory.createParameter("String_Node_Str",value);
      fDLOrderParamsType.setParameterArray(new Parameter[]{parameter});
    }
    orderDetails=EbicsXmlFactory.createStaticHeaderOrderDetailsType(session.getUser().getNextOrderId(),"String_Node_Str",orderType,fDLOrderParamsType);
  }
 else {
    StandardOrderParamsType standardOrderParamsType;
    standardOrderParamsType=EbicsXmlFactory.createStandardOrderParamsType();
    orderDetails=EbicsXmlFactory.createStaticHeaderOrderDetailsType(session.getUser().getNextOrderId(),"String_Node_Str",orderType,standardOrderParamsType);
  }
  xstatic=EbicsXmlFactory.createStaticHeaderType(session.getBankID(),nonce,session.getUser().getEbicsPartner().getPartnerId(),product,session.getUser().getSecurityMedium(),session.getUser().getUserId(),Calendar.getInstance(),orderDetails,bankPubKeyDigests);
  header=EbicsXmlFactory.createEbicsRequestHeader(true,mutable,xstatic);
  body=EbicsXmlFactory.createEbicsRequestBody();
  request=EbicsXmlFactory.createEbicsRequest(1,"String_Node_Str",header,body);
  document=EbicsXmlFactory.createEbicsRequestDocument(request);
}