test_class.declarator: userManager
test_class.modifier: private
test_class.original_string: private UserManager userManager;
test_class.type: UserManager
test_class.var_name: userManager
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: testMember
test_class.modifier: private
test_class.original_string: private Group testMember;
test_class.type: Group
test_class.var_name: testMember
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.file: oak-core/src/test/java/org/apache/jackrabbit/oak/security/user/query/GroupPredicateTest.java
test_class.identifier: GroupPredicateTest
test_class.superclass: extends AbstractSecurityTest
test_case.body: @Test
      public void testGetIdFails() throws Exception {
          GroupPredicate gp = new GroupPredicate(userManager, testGroup.getID(), true);
  
          Authorizable a = mock(Authorizable.class);
          when(a.getID()).thenThrow(new RepositoryException());
          assertFalse(gp.apply(a));
      }
test_case.class_method_signature: GroupPredicateTest.testGetIdFails()
test_case.full_signature: @Test public void testGetIdFails()
test_case.identifier: testGetIdFails
test_case.invocations: getID mock thenThrow when getID assertFalse apply
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testGetIdFails()
focal_class.declarator: membersIterator
focal_class.modifier: private final
focal_class.original_string: private final Iterator<Authorizable> membersIterator;
focal_class.type: Iterator<Authorizable>
focal_class.var_name: membersIterator
focal_class.declarator: memberIds = new HashSet<>()
focal_class.modifier: private final
focal_class.original_string: private final Set<String> memberIds = new HashSet<>();
focal_class.type: Set<String>
focal_class.var_name: memberIds
focal_class.file: oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/query/GroupPredicate.java
focal_class.identifier: GroupPredicate
focal_class.interfaces: implements Predicate<Authorizable>
focal_class.class_method_signature: GroupPredicate.GroupPredicate(@NotNull UserManager userManager, @NotNull String groupId, boolean declaredMembersOnly)
focal_class.full_signature:   GroupPredicate(@NotNull UserManager userManager, @NotNull String groupId, boolean declaredMembersOnly)
focal_class.identifier: GroupPredicate
focal_class.parameters: (@NotNull UserManager userManager, @NotNull String groupId, boolean declaredMembersOnly)
focal_class.signature:  GroupPredicate(@NotNull UserManager userManager, @NotNull String groupId, boolean declaredMembersOnly)
focal_class.class_method_signature: GroupPredicate.apply(@Nullable Authorizable authorizable)
focal_class.full_signature: @Override public boolean apply(@Nullable Authorizable authorizable)
focal_class.identifier: apply
focal_class.modifiers: @Override public
focal_class.parameters: (@Nullable Authorizable authorizable)
focal_class.return: boolean
focal_class.signature: boolean apply(@Nullable Authorizable authorizable)
focal_method.body: @Override
      public boolean apply(@Nullable Authorizable authorizable) {
          String id = getID(authorizable);
          if (id != null) {
              if (memberIds.contains(id)) {
                  return true;
              } else {
                  // not contained in ids that have already been processed => look
                  // for occurrence in the remaining iterator entries.
                  while (membersIterator.hasNext()) {
                      String memberId = getID(membersIterator.next());
                      if (memberId != null) {
                          memberIds.add(memberId);
                          if (memberId.equals(id)) {
                              return true;
                          }
                      }
                  }
              }
          }
          return false;
      }
focal_method.class_method_signature: GroupPredicate.apply(@Nullable Authorizable authorizable)
focal_method.full_signature: @Override public boolean apply(@Nullable Authorizable authorizable)
focal_method.identifier: apply
focal_method.invocations: getID contains hasNext getID next add equals
focal_method.modifiers: @Override public
focal_method.parameters: (@Nullable Authorizable authorizable)
focal_method.return: boolean
focal_method.signature: boolean apply(@Nullable Authorizable authorizable)