docs: private Set<String> getGroupsByMember(DirContext context, String callerDn, String groupSearchBase, String groupSearchFilter) {
  
          String groupNameAttribute = idStoreDefinition.getGroupNameAttribute();
  
          String[] attrIds = { groupNameAttribute };
          long limit = Long.valueOf(idStoreDefinition.getMaxResults());
          int timeOut = idStoreDefinition.getReadTimeout();
          int scope = getSearchScope(idStoreDefinition.getGroupSearchScope());
  
          SearchControls controls = new SearchControls(scope, limit, timeOut, attrIds, false, false);
  
          String filter = getFormattedFilter(groupSearchFilter, callerDn, idStoreDefinition.getGroupMemberAttribute());
  
          Set<String> groupNames = new HashSet<String>();
  
          try {
              if (tc.isDebugEnabled()) {
                  Tr.debug(tc, "JNDI_CALL search", new Object[] { groupSearchBase, filter, printControls(controls) });
              }
  
              NamingEnumeration<SearchResult> ne = context.search(new LdapName(groupSearchBase), filter, controls);
  
              if (tc.isDebugEnabled()) {
                  Tr.debug(tc, "Iterate through the search results");
              }
  
              while (ne.hasMoreElements()) {
                  SearchResult sr = ne.nextElement();
                  String groupDn = sr.getNameInNamespace();
                  if (groupNameAttribute.equalsIgnoreCase("dn")) {
                      groupNames.add(groupDn);
                  } else {
                      Attribute groupNameAttr = sr.getAttributes().get(groupNameAttribute);
                      if (groupNameAttr == null) {
                          Tr.warning(tc, "JAVAEESEC_WARNING_MISSING_GROUP_ATTR", new Object[] { groupDn, groupNameAttribute });
                          continue;
                      }
                      NamingEnumeration<?> ne2 = groupNameAttr.getAll();
                      if (ne2.hasMoreElements()) {
                          groupNames.add((String) ne2.nextElement());
                      }
                  }
              }
          } catch (NamingException e) {
              Tr.error(tc, "JAVAEESEC_ERROR_EXCEPTION_ON_GROUP_SEARCH", new Object[] { callerDn, e });
              throw new IllegalStateException(e);
          }
          if (tc.isDebugEnabled()) {
              Tr.debug(tc, "getGroupsByMember", groupNames);
          }
          return groupNames;
      }