docs: @FFDCIgnore(SizeLimitExceededException.class)
      private Set<LdapEntry> populateResultSet(NamingEnumeration<SearchResult> neu, String base, int scope, List<String> inEntityTypes, String[] attrIds) throws WIMException {
          final String METHODNAME = "populateResultSet";
  
          Set<LdapEntry> entities = new HashSet<LdapEntry>();
          try {
              while (neu.hasMore()) {
                  SearchResult thisEntry = neu.nextElement();
                  if (thisEntry == null) {
                      continue;
                  }
                  String entryName = thisEntry.getName();
                  String dn = LdapHelper.prepareDN(entryName, base);
                  if (scope != SearchControls.OBJECT_SCOPE && base.equalsIgnoreCase(dn))
                      continue;
  
                  Attributes attrs = thisEntry.getAttributes();
  
                  // Handle RACF(SDBM) attributes that are not fetched using search controls
                  if (iLdapConfigMgr.isRacf()) {
                      if (attrs.size() == 0) {
                          attrs = getAttributes(dn, attrIds);
                      }
                  }
  
                  String entityType = iLdapConfigMgr.getEntityType(attrs, null, dn, null, inEntityTypes);
                  // Skip if for RACF we found an incorrect entity type
                  if (iLdapConfigMgr.isRacf() && !inEntityTypes.contains(entityType))
                      continue;
                  String extId = iLdapConfigMgr.getExtIdFromAttributes(dn, entityType, attrs);
                  String uniqueName = getUniqueName(dn, entityType, attrs);
                  LdapEntry ldapEntry = new LdapEntry(dn, extId, uniqueName, entityType, attrs);
                  entities.add(ldapEntry);
              }
          } catch (SizeLimitExceededException e) {
              // if size limit is reached because of LDAP server limit, then log
              // the result
              // and return the available results
              if (tc.isDebugEnabled())
                  Tr.debug(tc, METHODNAME + " " + e.toString(true));
          } catch (NamingException e) {
              String msg = Tr.formatMessage(tc, WIMMessageKey.NAMING_EXCEPTION, WIMMessageHelper.generateMsgParms(e.toString(true)));
              throw new WIMSystemException(WIMMessageKey.NAMING_EXCEPTION, msg, e);
          }
          return entities;
      }