code: public ArrayList<Permission> getEffectivePermissions(List<Permission> permissions, String codeBase) {
          ArrayList<Permission> effectivePermissions = new ArrayList<Permission>();
  
          // Add the granted permissions to an arraylist
          effectivePermissions.addAll(grantedPermissions);
  
          // Add the codebase specific permissions
          codeBase = normalize(codeBase);
          if (codeBasePermissionMap.containsKey(codeBase)) {
              effectivePermissions.addAll(codeBasePermissionMap.get(codeBase));
          }
  
          // Add permissions.xml permissions
          if (permissionXMLPermissionMap.containsKey(codeBase)) {
              effectivePermissions.addAll(permissionXMLPermissionMap.get(codeBase));
          }
  
          // Iterate over the permissions and only add those that are not restricted
          for (Permission permission : permissions) {
              if (!isRestricted(permission)) {
                  effectivePermissions.add(permission);
              }
          }
  
          return effectivePermissions;
      }
docs: Return the effective granted permissions.
  
  @param permissions - The permissions granted in the permissions.xml of the web component or static policy permissions.
  @param codeBase - The code base of the code to obtain the effective permissions for.
  @return the effective granted permissions