Program: 13226
Project: 13226
Buggy source:
@Override public void actionInstance(ServerContext context,ActionRequest request,ResultHandler<JsonValue> handler){
  try {
    String alias=request.getContent().get("String_Node_Str").asString();
    if (ACTION_GENERATE_CERT.equalsIgnoreCase(request.getAction()) || ACTION_GENERATE_CSR.equalsIgnoreCase(request.getAction())) {
      if (alias == null) {
        throw ResourceException.getException(ResourceException.BAD_REQUEST,"String_Node_Str");
      }
      String algorithm=request.getContent().get("String_Node_Str").defaultTo(DEFAULT_ALGORITHM).asString();
      String signatureAlgorithm=request.getContent().get("String_Node_Str").defaultTo(DEFAULT_SIGNATURE_ALGORITHM).asString();
      int keySize=request.getContent().get("String_Node_Str").defaultTo(DEFAULT_KEY_SIZE).asInteger();
      JsonValue result=null;
      if (ACTION_GENERATE_CERT.equalsIgnoreCase(request.getAction())) {
        if (store.getStore().containsAlias(alias)) {
          handler.handleError(new ConflictException("String_Node_Str" + alias + "String_Node_Str"));
        }
 else {
          logger.info("String_Node_Str",alias);
          String domainName=request.getContent().get("String_Node_Str").required().asString();
          String validFrom=request.getContent().get("String_Node_Str").asString();
          String validTo=request.getContent().get("String_Node_Str").asString();
          Pair<X509Certificate,PrivateKey> pair=generateCertificate(domainName,algorithm,keySize,signatureAlgorithm,validFrom,validTo);
          Certificate cert=pair.getKey();
          PrivateKey key=pair.getValue();
          String password=request.getContent().get("String_Node_Str").defaultTo(Param.getKeystoreKeyPassword()).asString();
          logger.debug("String_Node_Str",alias);
          store.getStore().setCertificateEntry(alias,cert);
          store.store();
          manager.reload();
          saveStore();
          result=returnCertificate(alias,cert);
        }
      }
 else {
        Pair<PKCS10CertificationRequest,PrivateKey> csr=generateCSR(alias,algorithm,signatureAlgorithm,keySize,request.getContent());
        result=returnCertificateRequest(alias,csr.getKey());
        if (request.getContent().get("String_Node_Str").defaultTo(false).asBoolean()) {
          result.put("String_Node_Str",getKeyMap(csr.getRight()));
        }
      }
      handler.handleResult(result);
    }
 else {
      handler.handleError(new BadRequestException("String_Node_Str" + request.getAction()));
    }
  }
 catch (  Throwable t) {
    handler.handleError(ResourceUtil.adapt(t));
  }
}

Fixed version (ground truth):
@Override public void actionInstance(ServerContext context,ActionRequest request,ResultHandler<JsonValue> handler){
  try {
    String alias=request.getContent().get("String_Node_Str").asString();
    if (ACTION_GENERATE_CERT.equalsIgnoreCase(request.getAction()) || ACTION_GENERATE_CSR.equalsIgnoreCase(request.getAction())) {
      if (alias == null) {
        throw ResourceException.getException(ResourceException.BAD_REQUEST,"String_Node_Str");
      }
      String algorithm=request.getContent().get("String_Node_Str").defaultTo(DEFAULT_ALGORITHM).asString();
      String signatureAlgorithm=request.getContent().get("String_Node_Str").defaultTo(DEFAULT_SIGNATURE_ALGORITHM).asString();
      int keySize=request.getContent().get("String_Node_Str").defaultTo(DEFAULT_KEY_SIZE).asInteger();
      JsonValue result=null;
      if (ACTION_GENERATE_CERT.equalsIgnoreCase(request.getAction())) {
        if (store.getStore().containsAlias(alias)) {
          handler.handleError(new ConflictException("String_Node_Str" + alias + "String_Node_Str"));
        }
 else {
          logger.info("String_Node_Str",alias);
          String domainName=request.getContent().get("String_Node_Str").required().asString();
          String validFrom=request.getContent().get("String_Node_Str").asString();
          String validTo=request.getContent().get("String_Node_Str").asString();
          Pair<X509Certificate,PrivateKey> pair=generateCertificate(domainName,algorithm,keySize,signatureAlgorithm,validFrom,validTo);
          Certificate cert=pair.getKey();
          PrivateKey key=pair.getValue();
          logger.debug("String_Node_Str",alias);
          store.getStore().setEntry(alias,new KeyStore.PrivateKeyEntry(key,new Certificate[]{cert}),new KeyStore.PasswordProtection(store.getPassword().toCharArray()));
          store.store();
          manager.reload();
          saveStore();
          result=returnCertificate(alias,cert);
          if (request.getContent().get("String_Node_Str").defaultTo(false).asBoolean()) {
            result.put("String_Node_Str",getKeyMap(key));
          }
        }
      }
 else {
        Pair<PKCS10CertificationRequest,PrivateKey> csr=generateCSR(alias,algorithm,signatureAlgorithm,keySize,request.getContent());
        result=returnCertificateRequest(alias,csr.getKey());
        if (request.getContent().get("String_Node_Str").defaultTo(false).asBoolean()) {
          result.put("String_Node_Str",getKeyMap(csr.getRight()));
        }
      }
      handler.handleResult(result);
    }
 else {
      handler.handleError(new BadRequestException("String_Node_Str" + request.getAction()));
    }
  }
 catch (  Throwable t) {
    handler.handleError(ResourceUtil.adapt(t));
  }
}