test_class.declarator: TEST = ImmutableMap.<Long, Set<Long>>of(
              Permissions.ADD_NODE|Permissions.ADD_PROPERTY,
              ImmutableSet.of(Permissions.ADD_NODE, Permissions.ADD_PROPERTY),
              Permissions.LOCK_MANAGEMENT|Permissions.MODIFY_CHILD_NODE_COLLECTION,
              ImmutableSet.of(Permissions.LOCK_MANAGEMENT, Permissions.MODIFY_CHILD_NODE_COLLECTION),
              Permissions.READ_ACCESS_CONTROL|Permissions.MODIFY_ACCESS_CONTROL,
              ImmutableSet.of(Permissions.READ_ACCESS_CONTROL,Permissions.MODIFY_ACCESS_CONTROL),
              Permissions.NAMESPACE_MANAGEMENT|Permissions.WORKSPACE_MANAGEMENT|Permissions.NODE_TYPE_DEFINITION_MANAGEMENT|Permissions.PRIVILEGE_MANAGEMENT,
              ImmutableSet.of(Permissions.NAMESPACE_MANAGEMENT,Permissions.WORKSPACE_MANAGEMENT,Permissions.NODE_TYPE_DEFINITION_MANAGEMENT,Permissions.PRIVILEGE_MANAGEMENT)
      )
test_class.modifier: private static final
test_class.original_string: private static final Map<Long, Set<Long>> TEST = ImmutableMap.<Long, Set<Long>>of(
              Permissions.ADD_NODE|Permissions.ADD_PROPERTY,
              ImmutableSet.of(Permissions.ADD_NODE, Permissions.ADD_PROPERTY),
              Permissions.LOCK_MANAGEMENT|Permissions.MODIFY_CHILD_NODE_COLLECTION,
              ImmutableSet.of(Permissions.LOCK_MANAGEMENT, Permissions.MODIFY_CHILD_NODE_COLLECTION),
              Permissions.READ_ACCESS_CONTROL|Permissions.MODIFY_ACCESS_CONTROL,
              ImmutableSet.of(Permissions.READ_ACCESS_CONTROL,Permissions.MODIFY_ACCESS_CONTROL),
              Permissions.NAMESPACE_MANAGEMENT|Permissions.WORKSPACE_MANAGEMENT|Permissions.NODE_TYPE_DEFINITION_MANAGEMENT|Permissions.PRIVILEGE_MANAGEMENT,
              ImmutableSet.of(Permissions.NAMESPACE_MANAGEMENT,Permissions.WORKSPACE_MANAGEMENT,Permissions.NODE_TYPE_DEFINITION_MANAGEMENT,Permissions.PRIVILEGE_MANAGEMENT)
      );
test_class.type: Map<Long, Set<Long>>
test_class.var_name: TEST
test_class.declarator: existingTree
test_class.modifier: private
test_class.original_string: private Tree existingTree;
test_class.type: Tree
test_class.var_name: existingTree
test_class.file: oak-security-spi/src/test/java/org/apache/jackrabbit/oak/spi/security/authorization/permission/PermissionsTest.java
test_class.identifier: PermissionsTest
test_case.body: @Test
      public void testActionSetProperty() {
          TreeLocation treeLocation = TreeLocation.create(existingTree);
          assertNull(treeLocation.getProperty());
          assertEquals(Permissions.ADD_PROPERTY, Permissions.getPermissions(Session.ACTION_SET_PROPERTY, treeLocation, false));
          assertEquals(Permissions.MODIFY_ACCESS_CONTROL, Permissions.getPermissions(Session.ACTION_SET_PROPERTY, treeLocation, true));
  
          TreeLocation nonExistingTree = createNonExistingTreeLocation("/nonExisting");
          assertNull(nonExistingTree.getProperty());
          assertEquals(Permissions.ADD_PROPERTY, Permissions.getPermissions(Session.ACTION_SET_PROPERTY, nonExistingTree, false));
          assertEquals(Permissions.MODIFY_ACCESS_CONTROL, Permissions.getPermissions(Session.ACTION_SET_PROPERTY, nonExistingTree, true));
  
          TreeLocation nonExistingProp = createNonExistingTreeLocation("/nonExisting").getChild("nonExisting");
          assertNull(nonExistingProp.getProperty());
          assertEquals(Permissions.ADD_PROPERTY, Permissions.getPermissions(Session.ACTION_SET_PROPERTY, nonExistingProp, false));
          assertEquals(Permissions.MODIFY_ACCESS_CONTROL, Permissions.getPermissions(Session.ACTION_SET_PROPERTY, nonExistingProp, true));
  
          TreeLocation existingProp = treeLocation.getChild(JcrConstants.JCR_PRIMARYTYPE);
          assertNotNull(existingProp.getProperty());
          assertEquals(Permissions.MODIFY_PROPERTY, Permissions.getPermissions(Session.ACTION_SET_PROPERTY, existingProp, false));
          assertEquals(Permissions.MODIFY_ACCESS_CONTROL, Permissions.getPermissions(Session.ACTION_SET_PROPERTY, existingProp, true));
      }
test_case.class_method_signature: PermissionsTest.testActionSetProperty()
test_case.full_signature: @Test public void testActionSetProperty()
test_case.identifier: testActionSetProperty
test_case.invocations: create assertNull getProperty assertEquals getPermissions assertEquals getPermissions createNonExistingTreeLocation assertNull getProperty assertEquals getPermissions assertEquals getPermissions getChild createNonExistingTreeLocation assertNull getProperty assertEquals getPermissions assertEquals getPermissions getChild assertNotNull getProperty assertEquals getPermissions assertEquals getPermissions
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testActionSetProperty()
focal_class.declarator: NO_PERMISSION = 0
focal_class.modifier: public static final
focal_class.original_string: public static final long NO_PERMISSION = 0;
focal_class.type: long
focal_class.var_name: NO_PERMISSION
focal_class.declarator: READ_NODE = 1
focal_class.modifier: public static final
focal_class.original_string: public static final long READ_NODE = 1;
focal_class.type: long
focal_class.var_name: READ_NODE
focal_class.declarator: READ_PROPERTY = READ_NODE << 1
focal_class.modifier: public static final
focal_class.original_string: public static final long READ_PROPERTY = READ_NODE << 1;
focal_class.type: long
focal_class.var_name: READ_PROPERTY
focal_class.declarator: ADD_PROPERTY = READ_PROPERTY << 1
focal_class.modifier: public static final
focal_class.original_string: public static final long ADD_PROPERTY = READ_PROPERTY << 1;
focal_class.type: long
focal_class.var_name: ADD_PROPERTY
focal_class.declarator: MODIFY_PROPERTY = ADD_PROPERTY << 1
focal_class.modifier: public static final
focal_class.original_string: public static final long MODIFY_PROPERTY = ADD_PROPERTY << 1;
focal_class.type: long
focal_class.var_name: MODIFY_PROPERTY
focal_class.declarator: REMOVE_PROPERTY = MODIFY_PROPERTY << 1
focal_class.modifier: public static final
focal_class.original_string: public static final long REMOVE_PROPERTY = MODIFY_PROPERTY << 1;
focal_class.type: long
focal_class.var_name: REMOVE_PROPERTY
focal_class.declarator: ADD_NODE = REMOVE_PROPERTY << 1
focal_class.modifier: public static final
focal_class.original_string: public static final long ADD_NODE = REMOVE_PROPERTY << 1;
focal_class.type: long
focal_class.var_name: ADD_NODE
focal_class.declarator: REMOVE_NODE = ADD_NODE << 1
focal_class.modifier: public static final
focal_class.original_string: public static final long REMOVE_NODE = ADD_NODE << 1;
focal_class.type: long
focal_class.var_name: REMOVE_NODE
focal_class.declarator: READ_ACCESS_CONTROL = REMOVE_NODE << 1
focal_class.modifier: public static final
focal_class.original_string: public static final long READ_ACCESS_CONTROL = REMOVE_NODE << 1;
focal_class.type: long
focal_class.var_name: READ_ACCESS_CONTROL
focal_class.declarator: MODIFY_ACCESS_CONTROL = READ_ACCESS_CONTROL << 1
focal_class.modifier: public static final
focal_class.original_string: public static final long MODIFY_ACCESS_CONTROL = READ_ACCESS_CONTROL << 1;
focal_class.type: long
focal_class.var_name: MODIFY_ACCESS_CONTROL
focal_class.declarator: NODE_TYPE_MANAGEMENT = MODIFY_ACCESS_CONTROL << 1
focal_class.modifier: public static final
focal_class.original_string: public static final long NODE_TYPE_MANAGEMENT = MODIFY_ACCESS_CONTROL << 1;
focal_class.type: long
focal_class.var_name: NODE_TYPE_MANAGEMENT
focal_class.declarator: VERSION_MANAGEMENT = NODE_TYPE_MANAGEMENT << 1
focal_class.modifier: public static final
focal_class.original_string: public static final long VERSION_MANAGEMENT = NODE_TYPE_MANAGEMENT << 1;
focal_class.type: long
focal_class.var_name: VERSION_MANAGEMENT
focal_class.declarator: LOCK_MANAGEMENT = VERSION_MANAGEMENT << 1
focal_class.modifier: public static final
focal_class.original_string: public static final long LOCK_MANAGEMENT = VERSION_MANAGEMENT << 1;
focal_class.type: long
focal_class.var_name: LOCK_MANAGEMENT
focal_class.declarator: LIFECYCLE_MANAGEMENT = LOCK_MANAGEMENT << 1
focal_class.modifier: public static final
focal_class.original_string: public static final long LIFECYCLE_MANAGEMENT = LOCK_MANAGEMENT << 1;
focal_class.type: long
focal_class.var_name: LIFECYCLE_MANAGEMENT
focal_class.declarator: RETENTION_MANAGEMENT = LIFECYCLE_MANAGEMENT << 1
focal_class.modifier: public static final
focal_class.original_string: public static final long RETENTION_MANAGEMENT = LIFECYCLE_MANAGEMENT << 1;
focal_class.type: long
focal_class.var_name: RETENTION_MANAGEMENT
focal_class.declarator: MODIFY_CHILD_NODE_COLLECTION = RETENTION_MANAGEMENT << 1
focal_class.modifier: public static final
focal_class.original_string: public static final long MODIFY_CHILD_NODE_COLLECTION = RETENTION_MANAGEMENT << 1;
focal_class.type: long
focal_class.var_name: MODIFY_CHILD_NODE_COLLECTION
focal_class.declarator: NODE_TYPE_DEFINITION_MANAGEMENT = MODIFY_CHILD_NODE_COLLECTION << 1
focal_class.modifier: public static final
focal_class.original_string: public static final long NODE_TYPE_DEFINITION_MANAGEMENT = MODIFY_CHILD_NODE_COLLECTION << 1;
focal_class.type: long
focal_class.var_name: NODE_TYPE_DEFINITION_MANAGEMENT
focal_class.declarator: NAMESPACE_MANAGEMENT = NODE_TYPE_DEFINITION_MANAGEMENT << 1
focal_class.modifier: public static final
focal_class.original_string: public static final long NAMESPACE_MANAGEMENT = NODE_TYPE_DEFINITION_MANAGEMENT << 1;
focal_class.type: long
focal_class.var_name: NAMESPACE_MANAGEMENT
focal_class.declarator: WORKSPACE_MANAGEMENT = NAMESPACE_MANAGEMENT << 1
focal_class.modifier: public static final
focal_class.original_string: public static final long WORKSPACE_MANAGEMENT = NAMESPACE_MANAGEMENT << 1;
focal_class.type: long
focal_class.var_name: WORKSPACE_MANAGEMENT
focal_class.declarator: PRIVILEGE_MANAGEMENT = WORKSPACE_MANAGEMENT << 1
focal_class.modifier: public static final
focal_class.original_string: public static final long PRIVILEGE_MANAGEMENT = WORKSPACE_MANAGEMENT << 1;
focal_class.type: long
focal_class.var_name: PRIVILEGE_MANAGEMENT
focal_class.declarator: USER_MANAGEMENT = PRIVILEGE_MANAGEMENT << 1
focal_class.modifier: public static final
focal_class.original_string: public static final long USER_MANAGEMENT = PRIVILEGE_MANAGEMENT << 1;
focal_class.type: long
focal_class.var_name: USER_MANAGEMENT
focal_class.declarator: INDEX_DEFINITION_MANAGEMENT = USER_MANAGEMENT << 1
focal_class.modifier: public static final
focal_class.original_string: public static final long INDEX_DEFINITION_MANAGEMENT = USER_MANAGEMENT << 1;
focal_class.type: long
focal_class.var_name: INDEX_DEFINITION_MANAGEMENT
focal_class.declarator: READ = READ_NODE | READ_PROPERTY
focal_class.modifier: public static final
focal_class.original_string: public static final long READ = READ_NODE | READ_PROPERTY;
focal_class.type: long
focal_class.var_name: READ
focal_class.declarator: REMOVE = REMOVE_NODE | REMOVE_PROPERTY
focal_class.modifier: public static final
focal_class.original_string: public static final long REMOVE = REMOVE_NODE | REMOVE_PROPERTY;
focal_class.type: long
focal_class.var_name: REMOVE
focal_class.declarator: SET_PROPERTY = ADD_PROPERTY | MODIFY_PROPERTY | REMOVE_PROPERTY
focal_class.modifier: public static final
focal_class.original_string: public static final long SET_PROPERTY = ADD_PROPERTY | MODIFY_PROPERTY | REMOVE_PROPERTY;
focal_class.type: long
focal_class.var_name: SET_PROPERTY
focal_class.declarator: WRITE = ADD_NODE | REMOVE_NODE | SET_PROPERTY
focal_class.modifier: public static final
focal_class.original_string: public static final long WRITE = ADD_NODE | REMOVE_NODE | SET_PROPERTY;
focal_class.type: long
focal_class.var_name: WRITE
focal_class.declarator: ALL = (READ
              | SET_PROPERTY
              | ADD_NODE | REMOVE_NODE
              | READ_ACCESS_CONTROL | MODIFY_ACCESS_CONTROL
              | NODE_TYPE_MANAGEMENT
              | VERSION_MANAGEMENT
              | LOCK_MANAGEMENT
              | LIFECYCLE_MANAGEMENT
              | RETENTION_MANAGEMENT
              | MODIFY_CHILD_NODE_COLLECTION
              | NODE_TYPE_DEFINITION_MANAGEMENT
              | NAMESPACE_MANAGEMENT
              | WORKSPACE_MANAGEMENT
              | PRIVILEGE_MANAGEMENT
              | USER_MANAGEMENT
              | INDEX_DEFINITION_MANAGEMENT
      )
focal_class.modifier: public static final
focal_class.original_string: public static final long ALL = (READ
              | SET_PROPERTY
              | ADD_NODE | REMOVE_NODE
              | READ_ACCESS_CONTROL | MODIFY_ACCESS_CONTROL
              | NODE_TYPE_MANAGEMENT
              | VERSION_MANAGEMENT
              | LOCK_MANAGEMENT
              | LIFECYCLE_MANAGEMENT
              | RETENTION_MANAGEMENT
              | MODIFY_CHILD_NODE_COLLECTION
              | NODE_TYPE_DEFINITION_MANAGEMENT
              | NAMESPACE_MANAGEMENT
              | WORKSPACE_MANAGEMENT
              | PRIVILEGE_MANAGEMENT
              | USER_MANAGEMENT
              | INDEX_DEFINITION_MANAGEMENT
      );
focal_class.type: long
focal_class.var_name: ALL
focal_class.declarator: NON_AGGREGATES = ImmutableSet.of(
              READ_NODE,
              READ_PROPERTY,
              ADD_PROPERTY,
              MODIFY_PROPERTY,
              REMOVE_PROPERTY,
              ADD_NODE,
              REMOVE_NODE,
              MODIFY_CHILD_NODE_COLLECTION,
              READ_ACCESS_CONTROL,
              MODIFY_ACCESS_CONTROL,
              NODE_TYPE_MANAGEMENT,
              VERSION_MANAGEMENT,
              LOCK_MANAGEMENT,
              LIFECYCLE_MANAGEMENT,
              RETENTION_MANAGEMENT,
              NODE_TYPE_DEFINITION_MANAGEMENT,
              NAMESPACE_MANAGEMENT,
              WORKSPACE_MANAGEMENT,
              PRIVILEGE_MANAGEMENT,
              USER_MANAGEMENT,
              INDEX_DEFINITION_MANAGEMENT)
focal_class.modifier: private static final
focal_class.original_string: private static final Set<Long> NON_AGGREGATES = ImmutableSet.of(
              READ_NODE,
              READ_PROPERTY,
              ADD_PROPERTY,
              MODIFY_PROPERTY,
              REMOVE_PROPERTY,
              ADD_NODE,
              REMOVE_NODE,
              MODIFY_CHILD_NODE_COLLECTION,
              READ_ACCESS_CONTROL,
              MODIFY_ACCESS_CONTROL,
              NODE_TYPE_MANAGEMENT,
              VERSION_MANAGEMENT,
              LOCK_MANAGEMENT,
              LIFECYCLE_MANAGEMENT,
              RETENTION_MANAGEMENT,
              NODE_TYPE_DEFINITION_MANAGEMENT,
              NAMESPACE_MANAGEMENT,
              WORKSPACE_MANAGEMENT,
              PRIVILEGE_MANAGEMENT,
              USER_MANAGEMENT,
              INDEX_DEFINITION_MANAGEMENT);
focal_class.type: Set<Long>
focal_class.var_name: NON_AGGREGATES
focal_class.declarator: PERMISSION_NAMES = new LinkedHashMap<>()
focal_class.modifier: public static final
focal_class.original_string: public static final Map<Long, String> PERMISSION_NAMES = new LinkedHashMap<>();
focal_class.type: Map<Long, String>
focal_class.var_name: PERMISSION_NAMES
focal_class.declarator: PERMISSION_LOOKUP = new LinkedHashMap<>()
focal_class.modifier: private static final
focal_class.original_string: private static final Map<String, Long> PERMISSION_LOOKUP = new LinkedHashMap<>();
focal_class.type: Map<String, Long>
focal_class.var_name: PERMISSION_LOOKUP
focal_class.declarator: WRITE_ACTIONS = ImmutableSet.of(
              Session.ACTION_REMOVE,
              Session.ACTION_ADD_NODE,
              Session.ACTION_SET_PROPERTY,
              JackrabbitSession.ACTION_REMOVE_NODE,
              JackrabbitSession.ACTION_ADD_PROPERTY,
              JackrabbitSession.ACTION_MODIFY_PROPERTY,
              JackrabbitSession.ACTION_REMOVE_PROPERTY
      )
focal_class.modifier: private static final
focal_class.original_string: private static final Set<String> WRITE_ACTIONS = ImmutableSet.of(
              Session.ACTION_REMOVE,
              Session.ACTION_ADD_NODE,
              Session.ACTION_SET_PROPERTY,
              JackrabbitSession.ACTION_REMOVE_NODE,
              JackrabbitSession.ACTION_ADD_PROPERTY,
              JackrabbitSession.ACTION_MODIFY_PROPERTY,
              JackrabbitSession.ACTION_REMOVE_PROPERTY
      );
focal_class.type: Set<String>
focal_class.var_name: WRITE_ACTIONS
focal_class.declarator: ACTIONS_MAP = new LinkedHashMap<>()
focal_class.modifier: private static final
focal_class.original_string: private static final Map<String, Long> ACTIONS_MAP = new LinkedHashMap<>();
focal_class.type: Map<String, Long>
focal_class.var_name: ACTIONS_MAP
focal_class.file: oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/authorization/permission/Permissions.java
focal_class.identifier: Permissions
focal_class.class_method_signature: Permissions.Permissions()
focal_class.full_signature: private  Permissions()
focal_class.identifier: Permissions
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.signature:  Permissions()
focal_class.class_method_signature: Permissions.getNames(long permissions)
focal_class.full_signature: public static Set<String> getNames(long permissions)
focal_class.identifier: getNames
focal_class.modifiers: public static
focal_class.parameters: (long permissions)
focal_class.return: Set<String>
focal_class.signature: Set<String> getNames(long permissions)
focal_class.class_method_signature: Permissions.getString(long permissions)
focal_class.full_signature: public static String getString(long permissions)
focal_class.identifier: getString
focal_class.modifiers: public static
focal_class.parameters: (long permissions)
focal_class.return: String
focal_class.signature: String getString(long permissions)
focal_class.class_method_signature: Permissions.isRepositoryPermission(long permission)
focal_class.full_signature: public static boolean isRepositoryPermission(long permission)
focal_class.identifier: isRepositoryPermission
focal_class.modifiers: public static
focal_class.parameters: (long permission)
focal_class.return: boolean
focal_class.signature: boolean isRepositoryPermission(long permission)
focal_class.class_method_signature: Permissions.isAggregate(long permission)
focal_class.full_signature: public static boolean isAggregate(long permission)
focal_class.identifier: isAggregate
focal_class.modifiers: public static
focal_class.parameters: (long permission)
focal_class.return: boolean
focal_class.signature: boolean isAggregate(long permission)
focal_class.class_method_signature: Permissions.aggregates(final long permissions)
focal_class.full_signature: public static Iterable<Long> aggregates(final long permissions)
focal_class.identifier: aggregates
focal_class.modifiers: public static
focal_class.parameters: (final long permissions)
focal_class.return: Iterable<Long>
focal_class.signature: Iterable<Long> aggregates(final long permissions)
focal_class.class_method_signature: Permissions.includes(long permissions, long permissionsToTest)
focal_class.full_signature: public static boolean includes(long permissions, long permissionsToTest)
focal_class.identifier: includes
focal_class.modifiers: public static
focal_class.parameters: (long permissions, long permissionsToTest)
focal_class.return: boolean
focal_class.signature: boolean includes(long permissions, long permissionsToTest)
focal_class.class_method_signature: Permissions.respectParentPermissions(long permissions)
focal_class.full_signature: public static boolean respectParentPermissions(long permissions)
focal_class.identifier: respectParentPermissions
focal_class.modifiers: public static
focal_class.parameters: (long permissions)
focal_class.return: boolean
focal_class.signature: boolean respectParentPermissions(long permissions)
focal_class.class_method_signature: Permissions.diff(long permissions, long otherPermissions)
focal_class.full_signature: public static long diff(long permissions, long otherPermissions)
focal_class.identifier: diff
focal_class.modifiers: public static
focal_class.parameters: (long permissions, long otherPermissions)
focal_class.return: long
focal_class.signature: long diff(long permissions, long otherPermissions)
focal_class.class_method_signature: Permissions.getPermissions(@NotNull String jcrActions,
                                        @NotNull TreeLocation location,
                                        boolean isAccessControlContent)
focal_class.full_signature: public static long getPermissions(@NotNull String jcrActions,
                                        @NotNull TreeLocation location,
                                        boolean isAccessControlContent)
focal_class.identifier: getPermissions
focal_class.modifiers: public static
focal_class.parameters: (@NotNull String jcrActions,
                                        @NotNull TreeLocation location,
                                        boolean isAccessControlContent)
focal_class.return: long
focal_class.signature: long getPermissions(@NotNull String jcrActions,
                                        @NotNull TreeLocation location,
                                        boolean isAccessControlContent)
focal_class.class_method_signature: Permissions.getPermissions(@Nullable String permissionNames)
focal_class.full_signature: public static long getPermissions(@Nullable String permissionNames)
focal_class.identifier: getPermissions
focal_class.modifiers: public static
focal_class.parameters: (@Nullable String permissionNames)
focal_class.return: long
focal_class.signature: long getPermissions(@Nullable String permissionNames)
focal_class.class_method_signature: Permissions.getPermissions(@NotNull Set<String> permissionNames)
focal_class.full_signature: private static long getPermissions(@NotNull Set<String> permissionNames)
focal_class.identifier: getPermissions
focal_class.modifiers: private static
focal_class.parameters: (@NotNull Set<String> permissionNames)
focal_class.return: long
focal_class.signature: long getPermissions(@NotNull Set<String> permissionNames)
focal_class.class_method_signature: Permissions.getPermission(@Nullable String path, long defaultPermission)
focal_class.full_signature: public static long getPermission(@Nullable String path, long defaultPermission)
focal_class.identifier: getPermission
focal_class.modifiers: public static
focal_class.parameters: (@Nullable String path, long defaultPermission)
focal_class.return: long
focal_class.signature: long getPermission(@Nullable String path, long defaultPermission)
focal_method.body: public static long getPermissions(@NotNull String jcrActions,
                                        @NotNull TreeLocation location,
                                        boolean isAccessControlContent) {
          Set<String> actions = Sets.newHashSet(Text.explode(jcrActions, ',', false));
          long permissions = NO_PERMISSION;
          // map read action respecting the 'isAccessControlContent' flag.
          if (actions.remove(Session.ACTION_READ)) {
              if (isAccessControlContent) {
                  permissions |= READ_ACCESS_CONTROL;
              } else if (!location.exists()) {
                  permissions |= READ;
              } else if (location.getProperty() != null) {
                  permissions |= READ_PROPERTY;
              } else {
                  permissions |= READ_NODE;
              }
          }
  
          // map write actions respecting the 'isAccessControlContent' flag.
          if (!actions.isEmpty()) {
              if (isAccessControlContent) {
                  if (actions.removeAll(WRITE_ACTIONS)) {
                      permissions |= MODIFY_ACCESS_CONTROL;
                  }
              } else {
                  // item is not access controlled -> cover actions that don't have
                  // a 1:1 mapping to a given permission.
                  if (actions.remove(Session.ACTION_SET_PROPERTY)) {
                      if (location.getProperty() == null) {
                          permissions |= ADD_PROPERTY;
                      } else {
                          permissions |= MODIFY_PROPERTY;
                      }
                  }
                  if (actions.remove(Session.ACTION_REMOVE)) {
                      if (!location.exists()) {
                          permissions |= REMOVE;
                      } else if (location.getProperty() != null) {
                          permissions |= REMOVE_PROPERTY;
                      } else {
                          permissions |= REMOVE_NODE;
                      }
                  }
              }
          }
  
          // map remaining actions and permission-names that have a simple 1:1
          // mapping between action and permission
          if (!actions.isEmpty()) {
              for (Map.Entry<String, Long> actionEntry : ACTIONS_MAP.entrySet()) {
                  if (actions.remove(actionEntry.getKey())) {
                      permissions |= actionEntry.getValue();
                  }
              }
              permissions |= getPermissions(actions);
          }
  
          // now the action set must be empty; otherwise it contained unsupported action(s)
          if (!actions.isEmpty()) {
              throw new IllegalArgumentException("Unknown actions: " + actions);
          }
          return permissions;
      }
focal_method.class_method_signature: Permissions.getPermissions(@NotNull String jcrActions,
                                        @NotNull TreeLocation location,
                                        boolean isAccessControlContent)
focal_method.full_signature: public static long getPermissions(@NotNull String jcrActions,
                                        @NotNull TreeLocation location,
                                        boolean isAccessControlContent)
focal_method.identifier: getPermissions
focal_method.invocations: newHashSet explode remove exists getProperty isEmpty removeAll remove getProperty remove exists getProperty isEmpty entrySet remove getKey getValue getPermissions isEmpty
focal_method.modifiers: public static
focal_method.parameters: (@NotNull String jcrActions,
                                        @NotNull TreeLocation location,
                                        boolean isAccessControlContent)
focal_method.return: long
focal_method.signature: long getPermissions(@NotNull String jcrActions,
                                        @NotNull TreeLocation location,
                                        boolean isAccessControlContent)