Program: 34687
Project: 34687
Buggy source:
/** 
 * Set the filters depending on the ldap type selected.
 * @param configProps
 */
private void setFilters(Map<String,Object> configProps){
  if (iLdapType == null)   return;
  String key=null;
  if (iLdapType.equalsIgnoreCase(LdapConstants.AD_LDAP_SERVER)) {
    key=ConfigConstants.CONFIG_ACTIVE_DIRECTORY_FILTERS;
  }
 else   if (iLdapType.equalsIgnoreCase(LdapConstants.CUSTOM_LDAP_SERVER)) {
    key=ConfigConstants.CONFIG_CUSTOM_FILTERS;
  }
 else   if (iLdapType.equalsIgnoreCase(LdapConstants.DOMINO_LDAP_SERVER)) {
    key=ConfigConstants.CONFIG_DOMINO_FILTERS;
  }
 else   if (iLdapType.equalsIgnoreCase(LdapConstants.NOVELL_LDAP_SERVER)) {
    key=ConfigConstants.CONFIG_NOVELL_DIRECTORY_FILTERS;
  }
 else   if (iLdapType.equalsIgnoreCase(LdapConstants.IDS_LDAP_SERVER)) {
    key=ConfigConstants.CONFIG_TDS_FILTERS;
  }
 else   if (iLdapType.equalsIgnoreCase(LdapConstants.SUN_LDAP_SERVER)) {
    key=ConfigConstants.CONFIG_SUN_DIRECTORY_FILTERS;
  }
 else   if (iLdapType.equalsIgnoreCase(LdapConstants.NETSCAPE_LDAP_SERVER)) {
    key=ConfigConstants.CONFIG_NETSCAPE_DIRECTORY_FILTERS;
  }
 else   if (iLdapType.equalsIgnoreCase(LdapConstants.SECUREWAY_LDAP_SERVER)) {
    key=ConfigConstants.CONFIG_SECUREWAY_DIRECTORY_FILTERS;
  }
 else {
    return;
  }
  List<Map<String,Object>> filterList=Nester.nest(key,configProps);
  if (!filterList.isEmpty()) {
    Map<String,Object> props=filterList.get(0);
    if (props.get(ConfigConstants.CONFIG_USER_FILTER) != null)     iUserFilter=(String)props.get(ConfigConstants.CONFIG_USER_FILTER);
    if (props.get(ConfigConstants.CONFIG_GROUP_FILTER) != null)     iGroupFilter=(String)props.get(ConfigConstants.CONFIG_GROUP_FILTER);
    if (props.get(ConfigConstants.CONFIG_USER_ID_FILTER) != null)     iUserIdMap=(String)props.get(ConfigConstants.CONFIG_USER_ID_FILTER);
    if (props.get(ConfigConstants.CONFIG_GROUP_ID_FILTER) != null)     iGroupIdMap=(String)props.get(ConfigConstants.CONFIG_GROUP_ID_FILTER);
    if (props.get(ConfigConstants.CONFIG_GROUP_MEMBER_ID_FILTER) != null)     iGroupMemberIdMap=(String)props.get(ConfigConstants.CONFIG_GROUP_MEMBER_ID_FILTER);
    String objectClassStr="String_Node_Str";
    if (iLdapType.equalsIgnoreCase(LdapConstants.AD_LDAP_SERVER))     objectClassStr="String_Node_Str";
    int length=objectClassStr.length();
    if (iUserFilter != null) {
      LdapEntity ldapEntity=getLdapEntity(SchemaConstants.DO_PERSON_ACCOUNT);
      if (ldapEntity != null) {
        Set<String> objClsSet=new HashSet<String>();
        int index=iUserFilter.indexOf(objectClassStr);
        while (index > -1) {
          int endIndex=iUserFilter.indexOf("String_Node_Str",index);
          String objectClass=iUserFilter.substring(index + length,endIndex);
          objClsSet.add(objectClass);
          index=endIndex + 1;
          index=iUserFilter.indexOf(objectClassStr,endIndex);
        }
        if (objClsSet.size() > 0) {
          ldapEntity.getObjectClasses().clear();
          ldapEntity.getObjectClasses().addAll(objClsSet);
        }
      }
      if (iLoginAttrs != null)       iLoginAttrs.remove(0);
      if (iLoginProps != null)       iLoginProps.remove(0);
      String pattern="String_Node_Str";
      int startIndex=0;
      boolean hasLoginProperties=true;
      LdapEntity acct=getLdapEntity(iPersonAccountTypes.get(iPersonAccountTypes.size() - 1));
      while (hasLoginProperties) {
        int index=iUserFilter.indexOf(pattern,startIndex);
        int beginIndex=index;
        if (index > -1) {
          for (; beginIndex > 0; beginIndex--) {
            if (iUserFilter.charAt(beginIndex) == ' ' || iUserFilter.charAt(beginIndex) == '(')             break;
          }
          String propName=iUserFilter.substring(beginIndex + 1,index);
          if (iLoginAttrs != null && !iLoginAttrs.contains(propName)) {
            if (tc.isDebugEnabled())             Tr.debug(tc,"String_Node_Str" + propName + "String_Node_Str");
            iLoginAttrs.add(getAttributeName(acct,propName));
            iLoginProps.add(propName);
          }
          startIndex=index + 1;
        }
 else         hasLoginProperties=false;
      }
      if (ldapEntity != null)       ldapEntity.addPropertyAttributeMap(SchemaConstants.PROP_PRINCIPAL_NAME,iLoginAttrs.get(0));
    }
    if (iGroupFilter != null) {
      LdapEntity ldapEntity=getLdapEntity(SchemaConstants.DO_GROUP);
      if (ldapEntity != null) {
        Set<String> objClsSet=new HashSet<String>();
        int index=iGroupFilter.indexOf(objectClassStr);
        while (index > -1) {
          int endIndex=iGroupFilter.indexOf("String_Node_Str",index);
          String objectClass=iGroupFilter.substring(index + length,endIndex);
          objClsSet.add(objectClass);
          index=endIndex + 1;
          index=iGroupFilter.indexOf(objectClassStr,endIndex);
        }
        if (objClsSet.size() > 0) {
          ldapEntity.getObjectClasses().clear();
          ldapEntity.getObjectClasses().addAll(objClsSet);
        }
      }
    }
    if (iUserIdMap != null) {
      StringTokenizer strtok=new StringTokenizer(iUserIdMap,"String_Node_Str");
      LdapEntity ldapEntity=getLdapEntity(SchemaConstants.DO_PERSON_ACCOUNT);
      if (ldapEntity != null) {
        List<String> rdnPropList=new ArrayList<String>();
        List<String> objClsList=new ArrayList<String>();
        while (strtok.hasMoreTokens()) {
          String objectClass=strtok.nextToken();
          String attribute=strtok.nextToken();
          Set<String> propNames=null;
          if (LdapConstants.LDAP_ATTR_SAM_ACCOUNT_NAME.equalsIgnoreCase(attribute)) {
            propNames=getPropertyName(ldapEntity,"String_Node_Str");
          }
 else           propNames=getPropertyName(ldapEntity,attribute);
          rdnPropList.add(propNames.iterator().next());
          if (!SchemaConstants.VALUE_ALL_PROPERTIES.equalsIgnoreCase(objectClass))           objClsList.add(objectClass);
        }
        if (rdnPropList.size() > 0) {
          String[][] rdnProps=new String[rdnPropList.size()][];
          String[][] rdnAttrs=new String[rdnPropList.size()][];
          String rdnObjCls[][]=new String[objClsList.size()][];
          String objCls[]=new String[objClsList.size()];
          objCls=objClsList.toArray(objCls);
          for (int j=0; j < rdnPropList.size(); j++) {
            rdnProps[j]=LdapHelper.getRDNs(rdnPropList.get(j));
            rdnAttrs[j]=new String[rdnProps[j].length];
            for (int k=0; k < rdnProps[j].length; k++) {
              String rdnProp=rdnProps[j][k];
              rdnAttrs[j][k]=getAttributeName(ldapEntity,rdnProp);
            }
            if (objCls.length > 0) {
              rdnObjCls[j]=new String[objCls.length];
              rdnObjCls[j][0]=objCls[j];
            }
          }
          ldapEntity.setRDNProperties(rdnProps,rdnAttrs);
          if (isVMMRdnPropertiesDefined) {
            String updatedRdnAttrs[][]=null;
            String updatedRdnObjCls[][]=null;
            if (ldapEntity.getRDNAttributes().length > 0) {
              String orgRdnAttr[][]=ldapEntity.getRDNAttributes();
              updatedRdnAttrs=new String[orgRdnAttr.length + rdnAttrs.length][];
              for (int i=0; i < orgRdnAttr.length; i++) {
                updatedRdnAttrs[i]=new String[orgRdnAttr[i].length];
                for (int j=0; j < orgRdnAttr[i].length; j++)                 updatedRdnAttrs[i][j]=orgRdnAttr[i][j];
              }
              int len=orgRdnAttr.length;
              for (int i=0; i < rdnAttrs.length; i++) {
                updatedRdnAttrs[len]=new String[rdnAttrs[i].length];
                for (int j=0; j < rdnAttrs[i].length; j++)                 updatedRdnAttrs[len][j]=rdnAttrs[i][j];
                len++;
              }
            }
            if (ldapEntity.getRDNObjectclasses().length > 0) {
              String orgRdnObjCls[][]=ldapEntity.getRDNObjectclasses();
              updatedRdnObjCls=new String[orgRdnObjCls.length + rdnObjCls.length][];
              for (int i=0; i < orgRdnObjCls.length; i++) {
                updatedRdnObjCls[i]=new String[orgRdnObjCls[i].length];
                for (int j=0; j < orgRdnObjCls[i].length; j++)                 updatedRdnObjCls[i][j]=orgRdnObjCls[i][j];
              }
              int len=orgRdnObjCls.length;
              for (int i=0; i < rdnObjCls.length; i++) {
                updatedRdnObjCls[len]=new String[rdnObjCls[i].length];
                for (int j=0; j < rdnObjCls[i].length; j++)                 updatedRdnObjCls[len][j]=rdnObjCls[i][j];
                len++;
              }
            }
            ldapEntity.setRDNAttributes(updatedRdnAttrs,updatedRdnObjCls);
          }
 else {
            ldapEntity.setRDNAttributes(rdnAttrs,rdnObjCls);
          }
          if (ldapEntity.needTranslateRDN()) {
            iNeedTranslateRDN=true;
          }
        }
      }
 else {
        if (tc.isDebugEnabled())         Tr.debug(tc,"String_Node_Str");
      }
    }
    if (iGroupIdMap != null) {
      StringTokenizer strtok=new StringTokenizer(iGroupIdMap,"String_Node_Str");
      LdapEntity ldapEntity=getLdapEntity(SchemaConstants.DO_GROUP);
      if (ldapEntity != null) {
        List<String> rdnPropList=new ArrayList<String>();
        Set<String> objClsSet=new HashSet<String>();
        while (strtok.hasMoreTokens()) {
          String objectClass=strtok.nextToken();
          String attribute=strtok.nextToken();
          Set<String> propNames=getPropertyName(ldapEntity,attribute);
          rdnPropList.add(propNames.iterator().next());
          if (!SchemaConstants.VALUE_ALL_PROPERTIES.equalsIgnoreCase(objectClass))           objClsSet.add(objectClass);
        }
        if (rdnPropList.size() > 0) {
          String[][] rdnProps=new String[rdnPropList.size()][];
          String[][] rdnAttrs=new String[rdnPropList.size()][];
          for (int j=0; j < rdnPropList.size(); j++) {
            rdnProps[j]=LdapHelper.getRDNs(rdnPropList.get(j));
            rdnAttrs[j]=new String[rdnProps[j].length];
            for (int k=0; k < rdnProps[j].length; k++) {
              String rdnProp=rdnProps[j][k];
              rdnAttrs[j][k]=getAttributeName(ldapEntity,rdnProp);
            }
          }
          ldapEntity.setRDNProperties(rdnProps,rdnAttrs);
          if (ldapEntity.needTranslateRDN()) {
            iNeedTranslateRDN=true;
          }
        }
      }
 else       if (tc.isDebugEnabled())       Tr.debug(tc,"String_Node_Str");
    }
    if (iGroupMemberIdMap != null) {
      iLdapOperationalAttr=(iGroupMemberIdMap.contains(IBM_ALL_GROUPS));
      if (iDefaultMembershipAttr) {
        iMembershipAttrName=null;
      }
      LdapEntity ldapEntity=null;
      List<String> grpTypes=getGroupTypes();
      List<String> objectClasses=new ArrayList<String>();
      for (int i=0; i < grpTypes.size(); i++) {
        ldapEntity=getLdapEntity(grpTypes.get(i));
        List<String> objClses=ldapEntity.getObjectClasses();
        for (int j=0; j < objClses.size(); j++) {
          String objCls=objClses.get(j);
          objectClasses.add(objCls);
        }
      }
      List<String> attrScopes=new ArrayList<String>();
      List<String> attrNames=new ArrayList<String>();
      StringTokenizer strtok=new StringTokenizer(iGroupMemberIdMap,"String_Node_Str");
      if (ldapEntity != null) {
        while (strtok.hasMoreTokens()) {
          String objectClass=strtok.nextToken();
          String attribute=strtok.nextToken();
          String scope=LdapConstants.LDAP_DIRECT_GROUP_MEMBERSHIP_STRING;
          if (SchemaConstants.VALUE_ALL_PROPERTIES.equalsIgnoreCase(objectClass)) {
            for (int j=0; j < objectClasses.size(); j++) {
              iMbrAttrMap.put(objectClasses.get(j),attribute);
            }
          }
 else {
            iMbrAttrMap.put(objectClass.toLowerCase(),attribute);
          }
          if (!attrNames.contains(attribute)) {
            attrNames.add(attribute);
            attrScopes.add(scope);
          }
          if (objectClass != null && !objectClasses.contains(objectClass.toLowerCase())) {
            if (getGroupTypes() != null && getGroupTypes().size() > 0)             getLdapEntity(getGroupTypes().get(0)).addObjectClass(objectClass);
          }
        }
        iMbrAttrs=attrNames.toArray(new String[0]);
        iMbrAttrScope=new short[iMbrAttrs.length];
        iMbrAttrsAllScope=true;
        iMbrAttrsNestedScope=true;
        for (int i=0; i < attrScopes.size(); i++) {
          iMbrAttrScope[i]=LdapHelper.getMembershipScope(attrScopes.get(i));
          if (iMbrAttrScope[i] == LdapConstants.LDAP_DIRECT_GROUP_MEMBERSHIP) {
            iMbrAttrsAllScope=false;
            iMbrAttrsNestedScope=false;
          }
 else           if (iMbrAttrScope[i] == LdapConstants.LDAP_NESTED_GROUP_MEMBERSHIP) {
            iMbrAttrsAllScope=false;
          }
        }
      }
 else       if (tc.isDebugEnabled())       Tr.debug(tc,"String_Node_Str");
    }
    if (checkIfRacf()) {
      initializeRacfFilters();
    }
    resetEntitySearchFilters();
  }
}

Fixed version (ground truth):
/** 
 * Set the filters depending on the ldap type selected.
 * @param configProps
 */
private void setFilters(Map<String,Object> configProps){
  if (iLdapType == null)   return;
  String key=null;
  if (iLdapType.equalsIgnoreCase(LdapConstants.AD_LDAP_SERVER)) {
    key=ConfigConstants.CONFIG_ACTIVE_DIRECTORY_FILTERS;
  }
 else   if (iLdapType.equalsIgnoreCase(LdapConstants.CUSTOM_LDAP_SERVER)) {
    key=ConfigConstants.CONFIG_CUSTOM_FILTERS;
  }
 else   if (iLdapType.equalsIgnoreCase(LdapConstants.DOMINO_LDAP_SERVER)) {
    key=ConfigConstants.CONFIG_DOMINO_FILTERS;
  }
 else   if (iLdapType.equalsIgnoreCase(LdapConstants.NOVELL_LDAP_SERVER)) {
    key=ConfigConstants.CONFIG_NOVELL_DIRECTORY_FILTERS;
  }
 else   if (iLdapType.equalsIgnoreCase(LdapConstants.IDS_LDAP_SERVER)) {
    key=ConfigConstants.CONFIG_TDS_FILTERS;
  }
 else   if (iLdapType.equalsIgnoreCase(LdapConstants.SUN_LDAP_SERVER)) {
    key=ConfigConstants.CONFIG_SUN_DIRECTORY_FILTERS;
  }
 else   if (iLdapType.equalsIgnoreCase(LdapConstants.NETSCAPE_LDAP_SERVER)) {
    key=ConfigConstants.CONFIG_NETSCAPE_DIRECTORY_FILTERS;
  }
 else   if (iLdapType.equalsIgnoreCase(LdapConstants.SECUREWAY_LDAP_SERVER)) {
    key=ConfigConstants.CONFIG_SECUREWAY_DIRECTORY_FILTERS;
  }
 else {
    return;
  }
  List<Map<String,Object>> filterList=Nester.nest(key,configProps);
  if (!filterList.isEmpty()) {
    Map<String,Object> props=filterList.get(0);
    if (props.get(ConfigConstants.CONFIG_USER_FILTER) != null)     iUserFilter=(String)props.get(ConfigConstants.CONFIG_USER_FILTER);
    if (props.get(ConfigConstants.CONFIG_GROUP_FILTER) != null)     iGroupFilter=(String)props.get(ConfigConstants.CONFIG_GROUP_FILTER);
    if (props.get(ConfigConstants.CONFIG_USER_ID_FILTER) != null)     iUserIdMap=(String)props.get(ConfigConstants.CONFIG_USER_ID_FILTER);
    if (props.get(ConfigConstants.CONFIG_GROUP_ID_FILTER) != null)     iGroupIdMap=(String)props.get(ConfigConstants.CONFIG_GROUP_ID_FILTER);
    if (props.get(ConfigConstants.CONFIG_GROUP_MEMBER_ID_FILTER) != null)     iGroupMemberIdMap=(String)props.get(ConfigConstants.CONFIG_GROUP_MEMBER_ID_FILTER);
    String objectClassStr="String_Node_Str";
    if (iLdapType.equalsIgnoreCase(LdapConstants.AD_LDAP_SERVER))     objectClassStr="String_Node_Str";
    int length=objectClassStr.length();
    if (iUserFilter != null) {
      LdapEntity ldapEntity=getLdapEntity(SchemaConstants.DO_PERSON_ACCOUNT);
      if (ldapEntity != null) {
        Set<String> objClsSet=new HashSet<String>();
        int index=iUserFilter.indexOf(objectClassStr);
        while (index > -1) {
          int endIndex=iUserFilter.indexOf("String_Node_Str",index);
          String objectClass=iUserFilter.substring(index + length,endIndex);
          objClsSet.add(objectClass);
          index=endIndex + 1;
          index=iUserFilter.indexOf(objectClassStr,endIndex);
        }
        if (objClsSet.size() > 0) {
          ldapEntity.getObjectClasses().clear();
          ldapEntity.getObjectClasses().addAll(objClsSet);
        }
      }
      if (iLoginAttrs != null)       iLoginAttrs.remove(0);
      if (iLoginProps != null)       iLoginProps.remove(0);
      String pattern="String_Node_Str";
      int startIndex=0;
      boolean hasLoginProperties=true;
      LdapEntity acct=getLdapEntity(iPersonAccountTypes.get(iPersonAccountTypes.size() - 1));
      while (hasLoginProperties) {
        int index=iUserFilter.indexOf(pattern,startIndex);
        int beginIndex=index;
        if (index > -1) {
          for (; beginIndex > 0; beginIndex--) {
            if (iUserFilter.charAt(beginIndex) == ' ' || iUserFilter.charAt(beginIndex) == '(')             break;
          }
          String propName=iUserFilter.substring(beginIndex + 1,index);
          if (iLoginAttrs != null && !iLoginAttrs.contains(propName)) {
            if (tc.isDebugEnabled())             Tr.debug(tc,"String_Node_Str" + propName + "String_Node_Str");
            iLoginAttrs.add(getAttributeName(acct,propName));
            iLoginProps.add(propName);
          }
          startIndex=index + 1;
        }
 else         hasLoginProperties=false;
      }
      if (ldapEntity != null)       ldapEntity.addPropertyAttributeMap(SchemaConstants.PROP_PRINCIPAL_NAME,iLoginAttrs.get(0));
    }
    if (iGroupFilter != null) {
      LdapEntity ldapEntity=getLdapEntity(SchemaConstants.DO_GROUP);
      if (ldapEntity != null) {
        Set<String> objClsSet=new HashSet<String>();
        int index=iGroupFilter.indexOf(objectClassStr);
        while (index > -1) {
          int endIndex=iGroupFilter.indexOf("String_Node_Str",index);
          String objectClass=iGroupFilter.substring(index + length,endIndex);
          objClsSet.add(objectClass);
          index=endIndex + 1;
          index=iGroupFilter.indexOf(objectClassStr,endIndex);
        }
        if (objClsSet.size() > 0) {
          ldapEntity.getObjectClasses().clear();
          ldapEntity.getObjectClasses().addAll(objClsSet);
        }
      }
    }
    if (iUserIdMap != null) {
      StringTokenizer strtok=new StringTokenizer(iUserIdMap,"String_Node_Str");
      LdapEntity ldapEntity=getLdapEntity(SchemaConstants.DO_PERSON_ACCOUNT);
      if (ldapEntity != null) {
        List<String> rdnPropList=new ArrayList<String>();
        List<String> objClsList=new ArrayList<String>();
        while (strtok.hasMoreTokens()) {
          String objectClass=strtok.nextToken();
          String attribute=strtok.nextToken();
          Set<String> propNames=null;
          if (LdapConstants.LDAP_ATTR_SAM_ACCOUNT_NAME.equalsIgnoreCase(attribute)) {
            propNames=getPropertyName(ldapEntity,"String_Node_Str");
          }
 else           propNames=getPropertyName(ldapEntity,attribute);
          rdnPropList.add(propNames.iterator().next());
          if (!SchemaConstants.VALUE_ALL_PROPERTIES.equalsIgnoreCase(objectClass))           objClsList.add(objectClass);
        }
        if (rdnPropList.size() > 0) {
          String[][] rdnProps=new String[rdnPropList.size()][];
          String[][] rdnAttrs=new String[rdnPropList.size()][];
          String rdnObjCls[][]=new String[objClsList.size()][];
          String objCls[]=new String[objClsList.size()];
          objCls=objClsList.toArray(objCls);
          for (int j=0; j < rdnPropList.size(); j++) {
            rdnProps[j]=LdapHelper.getRDNs(rdnPropList.get(j));
            rdnAttrs[j]=new String[rdnProps[j].length];
            for (int k=0; k < rdnProps[j].length; k++) {
              String rdnProp=rdnProps[j][k];
              rdnAttrs[j][k]=getAttributeName(ldapEntity,rdnProp);
            }
            if (objCls.length > 0) {
              rdnObjCls[j]=new String[objCls.length];
              rdnObjCls[j][0]=objCls[j];
            }
          }
          ldapEntity.setRDNProperties(rdnProps,rdnAttrs);
          if (isVMMRdnPropertiesDefined) {
            String updatedRdnAttrs[][]=null;
            String updatedRdnObjCls[][]=null;
            if (ldapEntity.getRDNAttributes().length > 0) {
              String orgRdnAttr[][]=ldapEntity.getRDNAttributes();
              updatedRdnAttrs=new String[orgRdnAttr.length + rdnAttrs.length][];
              for (int i=0; i < orgRdnAttr.length; i++) {
                updatedRdnAttrs[i]=new String[orgRdnAttr[i].length];
                for (int j=0; j < orgRdnAttr[i].length; j++)                 updatedRdnAttrs[i][j]=orgRdnAttr[i][j];
              }
              int len=orgRdnAttr.length;
              for (int i=0; i < rdnAttrs.length; i++) {
                updatedRdnAttrs[len]=new String[rdnAttrs[i].length];
                for (int j=0; j < rdnAttrs[i].length; j++)                 updatedRdnAttrs[len][j]=rdnAttrs[i][j];
                len++;
              }
            }
            if (ldapEntity.getRDNObjectclasses().length > 0) {
              String orgRdnObjCls[][]=ldapEntity.getRDNObjectclasses();
              updatedRdnObjCls=new String[orgRdnObjCls.length + rdnObjCls.length][];
              for (int i=0; i < orgRdnObjCls.length; i++) {
                updatedRdnObjCls[i]=new String[orgRdnObjCls[i].length];
                for (int j=0; j < orgRdnObjCls[i].length; j++)                 updatedRdnObjCls[i][j]=orgRdnObjCls[i][j];
              }
              int len=orgRdnObjCls.length;
              for (int i=0; i < rdnObjCls.length; i++) {
                updatedRdnObjCls[len]=new String[rdnObjCls[i].length];
                for (int j=0; j < rdnObjCls[i].length; j++)                 updatedRdnObjCls[len][j]=rdnObjCls[i][j];
                len++;
              }
            }
            ldapEntity.setRDNAttributes(updatedRdnAttrs,updatedRdnObjCls);
          }
 else {
            ldapEntity.setRDNAttributes(rdnAttrs,rdnObjCls);
          }
          if (ldapEntity.needTranslateRDN()) {
            iNeedTranslateRDN=true;
          }
        }
      }
 else {
        if (tc.isDebugEnabled())         Tr.debug(tc,"String_Node_Str");
      }
    }
    if (iGroupIdMap != null) {
      StringTokenizer strtok=new StringTokenizer(iGroupIdMap,"String_Node_Str");
      LdapEntity ldapEntity=getLdapEntity(SchemaConstants.DO_GROUP);
      if (ldapEntity != null) {
        List<String> rdnPropList=new ArrayList<String>();
        Set<String> objClsSet=new HashSet<String>();
        while (strtok.hasMoreTokens()) {
          String objectClass=strtok.nextToken();
          String attribute=strtok.nextToken();
          Set<String> propNames=getPropertyName(ldapEntity,attribute);
          rdnPropList.add(propNames.iterator().next());
          if (!SchemaConstants.VALUE_ALL_PROPERTIES.equalsIgnoreCase(objectClass))           objClsSet.add(objectClass);
        }
        if (rdnPropList.size() > 0) {
          String[][] rdnProps=new String[rdnPropList.size()][];
          String[][] rdnAttrs=new String[rdnPropList.size()][];
          for (int j=0; j < rdnPropList.size(); j++) {
            rdnProps[j]=LdapHelper.getRDNs(rdnPropList.get(j));
            rdnAttrs[j]=new String[rdnProps[j].length];
            for (int k=0; k < rdnProps[j].length; k++) {
              String rdnProp=rdnProps[j][k];
              rdnAttrs[j][k]=getAttributeName(ldapEntity,rdnProp);
            }
          }
          ldapEntity.setRDNProperties(rdnProps,rdnAttrs);
          if (ldapEntity.needTranslateRDN()) {
            iNeedTranslateRDN=true;
          }
        }
      }
 else       if (tc.isDebugEnabled())       Tr.debug(tc,"String_Node_Str");
    }
    if (iGroupMemberIdMap != null) {
      iLdapOperationalAttr=iGroupMemberIdMap.toLowerCase().contains(IBM_ALL_GROUPS.toLowerCase());
      if (iDefaultMembershipAttr) {
        iMembershipAttrName=null;
      }
      LdapEntity ldapEntity=null;
      List<String> grpTypes=getGroupTypes();
      List<String> objectClasses=new ArrayList<String>();
      for (int i=0; i < grpTypes.size(); i++) {
        ldapEntity=getLdapEntity(grpTypes.get(i));
        List<String> objClses=ldapEntity.getObjectClasses();
        for (int j=0; j < objClses.size(); j++) {
          String objCls=objClses.get(j);
          objectClasses.add(objCls);
        }
      }
      List<String> attrScopes=new ArrayList<String>();
      List<String> attrNames=new ArrayList<String>();
      StringTokenizer strtok=new StringTokenizer(iGroupMemberIdMap,"String_Node_Str");
      if (ldapEntity != null) {
        while (strtok.hasMoreTokens()) {
          String objectClass=strtok.nextToken();
          String attribute=strtok.nextToken();
          String scope=LdapConstants.LDAP_DIRECT_GROUP_MEMBERSHIP_STRING;
          if (SchemaConstants.VALUE_ALL_PROPERTIES.equalsIgnoreCase(objectClass)) {
            for (int j=0; j < objectClasses.size(); j++) {
              iMbrAttrMap.put(objectClasses.get(j),attribute);
            }
          }
 else {
            iMbrAttrMap.put(objectClass.toLowerCase(),attribute);
          }
          if (!attrNames.contains(attribute)) {
            attrNames.add(attribute);
            attrScopes.add(scope);
          }
          if (objectClass != null && !objectClasses.contains(objectClass.toLowerCase())) {
            if (getGroupTypes() != null && getGroupTypes().size() > 0)             getLdapEntity(getGroupTypes().get(0)).addObjectClass(objectClass);
          }
        }
        iMbrAttrs=attrNames.toArray(new String[0]);
        iMbrAttrScope=new short[iMbrAttrs.length];
        iMbrAttrsAllScope=true;
        iMbrAttrsNestedScope=true;
        for (int i=0; i < attrScopes.size(); i++) {
          iMbrAttrScope[i]=LdapHelper.getMembershipScope(attrScopes.get(i));
          if (iMbrAttrScope[i] == LdapConstants.LDAP_DIRECT_GROUP_MEMBERSHIP) {
            iMbrAttrsAllScope=false;
            iMbrAttrsNestedScope=false;
          }
 else           if (iMbrAttrScope[i] == LdapConstants.LDAP_NESTED_GROUP_MEMBERSHIP) {
            iMbrAttrsAllScope=false;
          }
        }
      }
 else       if (tc.isDebugEnabled()) {
        Tr.debug(tc,"String_Node_Str");
      }
    }
    if (checkIfRacf()) {
      initializeRacfFilters();
    }
    resetEntitySearchFilters();
  }
}