docs: public String getCodeBaseLoc(final Permission perm, final SecurityException e) {
  
          return AccessController.doPrivileged(new java.security.PrivilegedAction<String>() {
  
              @Override
              public String run() {
  
                  Class<?>[] classes = getClassContext();
  
                  StringBuffer sb = new StringBuffer(classes.length * 100);
                  sb.append(lineSep);
  
                  boolean runtimeCodeOnStack = false;
                  int appCodeIndex = -1;
  
                  for (int i = 0; i < classes.length; i++) {
  
                      Class<?> clazz = classes[i];
  
                      ClassLoader cl = clazz.getClassLoader();
  
                      boolean jvmClassLoader = isJvmClassLoader(cl);
                      boolean rtClassLoader = isRuntimeClassLoader(clazz, cl);
                      boolean appClassLoader = isAppClassLoader(cl);
  
                      String loader = null;
                      if (cl != null) {
                          loader = cl.getClass().getName();
                      }
  
                      if (clazz.getName().startsWith("com.ibm._jsp.")) {
                          System.out.println(clazz.getClassLoader().getClass().getName());
                      }
  
                      runtimeCodeOnStack |= rtClassLoader;
  
                      if (appClassLoader) {
                          appCodeIndex = i;
                      }
                  }
  
                  StringBuilder stack = new StringBuilder();
                  StackTraceElement[] stackTrace = e.getStackTrace();
                  int endIndex = stackTrace.length;
                  if (appCodeIndex > -1 && runtimeCodeOnStack) {
                      endIndex = appCodeIndex;
                      stack.append("Detected a possible missing doPriv statement. There was Liberty code between the check and the application code.\r\n");
                  } else if (appCodeIndex == -1 && runtimeCodeOnStack) {
                      stack.append("No app code on stack, but a permission check failed.\r\n");
                  } else if (appCodeIndex > -1 && !!!runtimeCodeOnStack) {
                      stack.append("The application needs to have permissions added");
                  } else {
                      stack.append("No app code, or Liberty code on stack, so pretty much shouldn't happen.\r\n");
                  }
  
                  stack.append("Permission: \r\n");
                  stack.append(perm.toString());
                  stack.append("\r\nStack: \r\n");
                  stack.append(e.toString());
                  for (int i = 0; i < endIndex; i++) {
                      stack.append(stackTrace[i].toString());
                      stack.append("\r\n");
                  }
  
                  return stack.toString();
  
              }
  
          });
      }