code: public void addPermissionsXMLPermission(CodeSource codeSource, Permission permission) {
          ArrayList<Permission> permissions = null;
          String codeBase = codeSource.getLocation().getPath();
  
          if (!isRestricted(permission)) {
              if (permissionXMLPermissionMap.containsKey(codeBase)) {
                  permissions = permissionXMLPermissionMap.get(codeBase);
                  permissions.add(permission);
              } else {
                  permissions = new ArrayList<Permission>();
                  permissions.add(permission);
                  permissionXMLPermissionMap.put(codeBase, permissions);
              }
          }
      }
docs: Adds a permission from the permissions.xml file for the given CodeSource.
  
  @param codeSource - The CodeSource of the code the specified permission was granted to.
  @param permissions - The permissions granted in the permissions.xml of the application.
  @return the effective granted permissions