Program: 58598
Project: 58598
Buggy source:
@Override public void build(){
  HIARequestOrderDataType request;
  AuthenticationPubKeyInfoType authenticationPubKeyInfo;
  EncryptionPubKeyInfoType encryptionPubKeyInfo;
  PubKeyValueType encryptionPubKeyValue;
  X509DataType encryptionX509Data;
  RSAKeyValueType encryptionRsaKeyValue;
  PubKeyValueType authPubKeyValue;
  X509DataType authX509Data;
  RSAKeyValueType AuthRsaKeyValue;
  EbicsCertificate certificate=session.getUser().getE002Certificate();
  encryptionX509Data=EbicsXmlFactory.createX509DataType(session.getUser().getDn(),certificate.getCertificate());
  encryptionRsaKeyValue=EbicsXmlFactory.createRSAKeyValueType(new BigInteger(certificate.getPublicKeyExponent()).toByteArray(),new BigInteger(certificate.getPublicKeyModulus()).toByteArray());
  encryptionPubKeyValue=EbicsXmlFactory.createH003PubKeyValueType(encryptionRsaKeyValue,Calendar.getInstance());
  encryptionPubKeyInfo=EbicsXmlFactory.createEncryptionPubKeyInfoType("String_Node_Str",encryptionPubKeyValue,encryptionX509Data);
  certificate=session.getUser().getX002Certificate();
  authX509Data=EbicsXmlFactory.createX509DataType(session.getUser().getDn(),certificate.getCertificate());
  AuthRsaKeyValue=EbicsXmlFactory.createRSAKeyValueType(new BigInteger(certificate.getPublicKeyExponent()).toByteArray(),new BigInteger(certificate.getPublicKeyModulus()).toByteArray());
  authPubKeyValue=EbicsXmlFactory.createH003PubKeyValueType(AuthRsaKeyValue,Calendar.getInstance());
  authenticationPubKeyInfo=EbicsXmlFactory.createAuthenticationPubKeyInfoType("String_Node_Str",authPubKeyValue,authX509Data);
  request=EbicsXmlFactory.createHIARequestOrderDataType(authenticationPubKeyInfo,encryptionPubKeyInfo,session.getUser().getEbicsPartner().getPartnerId(),session.getUser().getUserId());
  document=EbicsXmlFactory.createHIARequestOrderDataDocument(request);
}

Fixed version (ground truth):
@Override public void build(){
  HIARequestOrderDataType request;
  AuthenticationPubKeyInfoType authenticationPubKeyInfo;
  EncryptionPubKeyInfoType encryptionPubKeyInfo;
  PubKeyValueType encryptionPubKeyValue;
  X509DataType encryptionX509Data=null;
  RSAKeyValueType encryptionRsaKeyValue;
  PubKeyValueType authPubKeyValue;
  X509DataType authX509Data=null;
  RSAKeyValueType authRsaKeyValue;
  EbicsCertificate certificate=session.getUser().getE002Certificate();
  encryptionX509Data=EbicsXmlFactory.createX509DataType(session.getUser().getDn(),certificate.getCertificate());
  encryptionRsaKeyValue=EbicsXmlFactory.createRSAKeyValueType(new BigInteger(certificate.getPublicKeyExponent(),16).toByteArray(),new BigInteger(certificate.getPublicKeyModulus(),16).toByteArray());
  encryptionPubKeyValue=EbicsXmlFactory.createH003PubKeyValueType(encryptionRsaKeyValue,Calendar.getInstance());
  encryptionPubKeyInfo=EbicsXmlFactory.createEncryptionPubKeyInfoType("String_Node_Str",encryptionPubKeyValue,encryptionX509Data);
  certificate=session.getUser().getX002Certificate();
  authX509Data=EbicsXmlFactory.createX509DataType(session.getUser().getDn(),certificate.getCertificate());
  authRsaKeyValue=EbicsXmlFactory.createRSAKeyValueType(new BigInteger(certificate.getPublicKeyExponent(),16).toByteArray(),new BigInteger(certificate.getPublicKeyModulus(),16).toByteArray());
  authPubKeyValue=EbicsXmlFactory.createH003PubKeyValueType(authRsaKeyValue,Calendar.getInstance());
  authenticationPubKeyInfo=EbicsXmlFactory.createAuthenticationPubKeyInfoType("String_Node_Str",authPubKeyValue,authX509Data);
  request=EbicsXmlFactory.createHIARequestOrderDataType(authenticationPubKeyInfo,encryptionPubKeyInfo,session.getUser().getEbicsPartner().getPartnerId(),session.getUser().getUserId());
  document=EbicsXmlFactory.createHIARequestOrderDataDocument(request);
}