test_class.declarator: userMgr
test_class.modifier: private
test_class.original_string: private UserManager userMgr;
test_class.type: UserManager
test_class.var_name: userMgr
test_class.declarator: testUser
test_class.modifier: private
test_class.original_string: private User testUser;
test_class.type: User
test_class.var_name: testUser
test_class.declarator: testGroup
test_class.modifier: private
test_class.original_string: private Group testGroup;
test_class.type: Group
test_class.var_name: testGroup
test_class.declarator: authorizable
test_class.modifier: private
test_class.original_string: private AuthorizableImpl authorizable;
test_class.type: AuthorizableImpl
test_class.var_name: authorizable
test_class.file: oak-core/src/test/java/org/apache/jackrabbit/oak/security/user/AuthorizableImplTest.java
test_class.identifier: AuthorizableImplTest
test_class.superclass: extends AbstractSecurityTest
test_case.body: @Test
      public void testHashCode() throws Exception {
          Authorizable user = userMgr.getAuthorizable(testUser.getID());
          Authorizable group = userMgr.getAuthorizable(testGroup.getID());
  
          Map<Authorizable, Authorizable> sameHashCode = new HashMap<>();
          sameHashCode.put(testUser, testUser);
          sameHashCode.put(testGroup, testGroup);
          sameHashCode.put(user, user);
          sameHashCode.put(group, group);
          sameHashCode.put(testUser, user);
          sameHashCode.put(testGroup, group);
  
          for (Map.Entry entry : sameHashCode.entrySet()) {
              assertEquals(entry.getKey().hashCode(), entry.getValue().hashCode());
          }
  
          UserManager otherUserManager = getUserConfiguration().getUserManager(root, getNamePathMapper());
          user = otherUserManager.getAuthorizable(testUser.getID());
          group = otherUserManager.getAuthorizable(testGroup.getID());
  
          Map<Authorizable, Authorizable> notSameHashCode = new HashMap<>();
          notSameHashCode.put(testUser, testGroup);
          notSameHashCode.put(user, group);
          notSameHashCode.put(testUser, user);
          notSameHashCode.put(testGroup, group);
  
          for (Map.Entry entry : notSameHashCode.entrySet()) {
              assertNotEquals(entry.getKey().hashCode(), entry.getValue().hashCode());
          }
      }
test_case.class_method_signature: AuthorizableImplTest.testHashCode()
test_case.full_signature: @Test public void testHashCode()
test_case.identifier: testHashCode
test_case.invocations: getAuthorizable getID getAuthorizable getID put put put put put put entrySet assertEquals hashCode getKey hashCode getValue getUserManager getUserConfiguration getNamePathMapper getAuthorizable getID getAuthorizable getID put put put put entrySet assertNotEquals hashCode getKey hashCode getValue
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testHashCode()
focal_class.declarator: log = LoggerFactory.getLogger(AuthorizableImpl.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger log = LoggerFactory.getLogger(AuthorizableImpl.class);
focal_class.type: Logger
focal_class.var_name: log
focal_class.declarator: id
focal_class.modifier: private final
focal_class.original_string: private final String id;
focal_class.type: String
focal_class.var_name: id
focal_class.declarator: tree
focal_class.modifier: private final
focal_class.original_string: private final Tree tree;
focal_class.type: Tree
focal_class.var_name: tree
focal_class.declarator: userManager
focal_class.modifier: private final
focal_class.original_string: private final UserManagerImpl userManager;
focal_class.type: UserManagerImpl
focal_class.var_name: userManager
focal_class.declarator: principalName
focal_class.modifier: private
focal_class.original_string: private String principalName;
focal_class.type: String
focal_class.var_name: principalName
focal_class.declarator: properties
focal_class.modifier: private
focal_class.original_string: private AuthorizableProperties properties;
focal_class.type: AuthorizableProperties
focal_class.var_name: properties
focal_class.declarator: hashCode
focal_class.modifier: private
focal_class.original_string: private int hashCode;
focal_class.type: int
focal_class.var_name: hashCode
focal_class.file: oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/AuthorizableImpl.java
focal_class.identifier: AuthorizableImpl
focal_class.interfaces: implements Authorizable, UserConstants
focal_class.class_method_signature: AuthorizableImpl.AuthorizableImpl(@NotNull String id, @NotNull Tree tree,
                       @NotNull UserManagerImpl userManager)
focal_class.full_signature:   AuthorizableImpl(@NotNull String id, @NotNull Tree tree,
                       @NotNull UserManagerImpl userManager)
focal_class.identifier: AuthorizableImpl
focal_class.parameters: (@NotNull String id, @NotNull Tree tree,
                       @NotNull UserManagerImpl userManager)
focal_class.signature:  AuthorizableImpl(@NotNull String id, @NotNull Tree tree,
                       @NotNull UserManagerImpl userManager)
focal_class.class_method_signature: AuthorizableImpl.checkValidTree(@NotNull Tree tree)
focal_class.full_signature: abstract void checkValidTree(@NotNull Tree tree)
focal_class.identifier: checkValidTree
focal_class.modifiers: abstract
focal_class.parameters: (@NotNull Tree tree)
focal_class.return: void
focal_class.signature: void checkValidTree(@NotNull Tree tree)
focal_class.class_method_signature: AuthorizableImpl.isValidAuthorizableImpl(@NotNull Authorizable authorizable)
focal_class.full_signature: static boolean isValidAuthorizableImpl(@NotNull Authorizable authorizable)
focal_class.identifier: isValidAuthorizableImpl
focal_class.modifiers: static
focal_class.parameters: (@NotNull Authorizable authorizable)
focal_class.return: boolean
focal_class.signature: boolean isValidAuthorizableImpl(@NotNull Authorizable authorizable)
focal_class.class_method_signature: AuthorizableImpl.getID()
focal_class.full_signature: @NotNull @Override public String getID()
focal_class.identifier: getID
focal_class.modifiers: @NotNull @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getID()
focal_class.class_method_signature: AuthorizableImpl.declaredMemberOf()
focal_class.full_signature: @NotNull @Override public Iterator<Group> declaredMemberOf()
focal_class.identifier: declaredMemberOf
focal_class.modifiers: @NotNull @Override public
focal_class.parameters: ()
focal_class.return: Iterator<Group>
focal_class.signature: Iterator<Group> declaredMemberOf()
focal_class.class_method_signature: AuthorizableImpl.memberOf()
focal_class.full_signature: @NotNull @Override public Iterator<Group> memberOf()
focal_class.identifier: memberOf
focal_class.modifiers: @NotNull @Override public
focal_class.parameters: ()
focal_class.return: Iterator<Group>
focal_class.signature: Iterator<Group> memberOf()
focal_class.class_method_signature: AuthorizableImpl.remove()
focal_class.full_signature: @Override public void remove()
focal_class.identifier: remove
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void remove()
focal_class.class_method_signature: AuthorizableImpl.getPropertyNames()
focal_class.full_signature: @NotNull @Override public Iterator<String> getPropertyNames()
focal_class.identifier: getPropertyNames
focal_class.modifiers: @NotNull @Override public
focal_class.parameters: ()
focal_class.return: Iterator<String>
focal_class.signature: Iterator<String> getPropertyNames()
focal_class.class_method_signature: AuthorizableImpl.getPropertyNames(@NotNull String relPath)
focal_class.full_signature: @NotNull @Override public Iterator<String> getPropertyNames(@NotNull String relPath)
focal_class.identifier: getPropertyNames
focal_class.modifiers: @NotNull @Override public
focal_class.parameters: (@NotNull String relPath)
focal_class.return: Iterator<String>
focal_class.signature: Iterator<String> getPropertyNames(@NotNull String relPath)
focal_class.class_method_signature: AuthorizableImpl.hasProperty(@NotNull String relPath)
focal_class.full_signature: @Override public boolean hasProperty(@NotNull String relPath)
focal_class.identifier: hasProperty
focal_class.modifiers: @Override public
focal_class.parameters: (@NotNull String relPath)
focal_class.return: boolean
focal_class.signature: boolean hasProperty(@NotNull String relPath)
focal_class.class_method_signature: AuthorizableImpl.getProperty(@NotNull String relPath)
focal_class.full_signature: @Nullable @Override public Value[] getProperty(@NotNull String relPath)
focal_class.identifier: getProperty
focal_class.modifiers: @Nullable @Override public
focal_class.parameters: (@NotNull String relPath)
focal_class.return: Value[]
focal_class.signature: Value[] getProperty(@NotNull String relPath)
focal_class.class_method_signature: AuthorizableImpl.setProperty(@NotNull String relPath, @Nullable Value value)
focal_class.full_signature: @Override public void setProperty(@NotNull String relPath, @Nullable Value value)
focal_class.identifier: setProperty
focal_class.modifiers: @Override public
focal_class.parameters: (@NotNull String relPath, @Nullable Value value)
focal_class.return: void
focal_class.signature: void setProperty(@NotNull String relPath, @Nullable Value value)
focal_class.class_method_signature: AuthorizableImpl.setProperty(@NotNull String relPath, @Nullable Value[] values)
focal_class.full_signature: @Override public void setProperty(@NotNull String relPath, @Nullable Value[] values)
focal_class.identifier: setProperty
focal_class.modifiers: @Override public
focal_class.parameters: (@NotNull String relPath, @Nullable Value[] values)
focal_class.return: void
focal_class.signature: void setProperty(@NotNull String relPath, @Nullable Value[] values)
focal_class.class_method_signature: AuthorizableImpl.removeProperty(@NotNull String relPath)
focal_class.full_signature: @Override public boolean removeProperty(@NotNull String relPath)
focal_class.identifier: removeProperty
focal_class.modifiers: @Override public
focal_class.parameters: (@NotNull String relPath)
focal_class.return: boolean
focal_class.signature: boolean removeProperty(@NotNull String relPath)
focal_class.class_method_signature: AuthorizableImpl.getPath()
focal_class.full_signature: @NotNull @Override public String getPath()
focal_class.identifier: getPath
focal_class.modifiers: @NotNull @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getPath()
focal_class.class_method_signature: AuthorizableImpl.hashCode()
focal_class.full_signature: @Override public int hashCode()
focal_class.identifier: hashCode
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int hashCode()
focal_class.class_method_signature: AuthorizableImpl.equals(Object obj)
focal_class.full_signature: @Override public boolean equals(Object obj)
focal_class.identifier: equals
focal_class.modifiers: @Override public
focal_class.parameters: (Object obj)
focal_class.return: boolean
focal_class.signature: boolean equals(Object obj)
focal_class.class_method_signature: AuthorizableImpl.toString()
focal_class.full_signature: @Override public String toString()
focal_class.identifier: toString
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String toString()
focal_class.class_method_signature: AuthorizableImpl.getTree()
focal_class.full_signature: @NotNull Tree getTree()
focal_class.identifier: getTree
focal_class.modifiers: @NotNull
focal_class.parameters: ()
focal_class.return: Tree
focal_class.signature: Tree getTree()
focal_class.class_method_signature: AuthorizableImpl.getPrincipalName()
focal_class.full_signature: @NotNull String getPrincipalName()
focal_class.identifier: getPrincipalName
focal_class.modifiers: @NotNull
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getPrincipalName()
focal_class.class_method_signature: AuthorizableImpl.getUserManager()
focal_class.full_signature: @NotNull UserManagerImpl getUserManager()
focal_class.identifier: getUserManager
focal_class.modifiers: @NotNull
focal_class.parameters: ()
focal_class.return: UserManagerImpl
focal_class.signature: UserManagerImpl getUserManager()
focal_class.class_method_signature: AuthorizableImpl.getMembershipProvider()
focal_class.full_signature: @NotNull MembershipProvider getMembershipProvider()
focal_class.identifier: getMembershipProvider
focal_class.modifiers: @NotNull
focal_class.parameters: ()
focal_class.return: MembershipProvider
focal_class.signature: MembershipProvider getMembershipProvider()
focal_class.class_method_signature: AuthorizableImpl.isEveryone()
focal_class.full_signature:  boolean isEveryone()
focal_class.identifier: isEveryone
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isEveryone()
focal_class.class_method_signature: AuthorizableImpl.internalGetPrincipalName()
focal_class.full_signature: @Nullable private String internalGetPrincipalName()
focal_class.identifier: internalGetPrincipalName
focal_class.modifiers: @Nullable private
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String internalGetPrincipalName()
focal_class.class_method_signature: AuthorizableImpl.getAuthorizableProperties()
focal_class.full_signature: private AuthorizableProperties getAuthorizableProperties()
focal_class.identifier: getAuthorizableProperties
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: AuthorizableProperties
focal_class.signature: AuthorizableProperties getAuthorizableProperties()
focal_class.class_method_signature: AuthorizableImpl.getMembership(boolean includeInherited)
focal_class.full_signature: @NotNull private Iterator<Group> getMembership(boolean includeInherited)
focal_class.identifier: getMembership
focal_class.modifiers: @NotNull private
focal_class.parameters: (boolean includeInherited)
focal_class.return: Iterator<Group>
focal_class.signature: Iterator<Group> getMembership(boolean includeInherited)
focal_method.body: @Override
      public int hashCode() {
          if (hashCode == 0) {
              StringBuilder sb = new StringBuilder();
              sb.append(isGroup() ? "group:" : "user:");
              sb.append(':');
              sb.append(id);
              sb.append('_');
              sb.append(userManager.hashCode());
              hashCode = sb.toString().hashCode();
          }
          return hashCode;
      }
focal_method.class_method_signature: AuthorizableImpl.hashCode()
focal_method.full_signature: @Override public int hashCode()
focal_method.identifier: hashCode
focal_method.invocations: append isGroup append append append append hashCode hashCode toString
focal_method.modifiers: @Override public
focal_method.parameters: ()
focal_method.return: int
focal_method.signature: int hashCode()