attributes = _getImmediateElements(groupType, "attribute");
attributes = this._getImmediateElements(groupType, "attribute");
  private void _processAttributes(Element e, String stem)     throws  AttributeNotFoundException,            GroupModifyException,            GroupNotFoundException,            InsufficientPrivilegeException,            SchemaException  {    Element groupTypes = _getImmediateElement(e, "groupTypes");    if (groupTypes == null) {      return;    }    Collection  types               = _getImmediateElements(groupTypes, "groupType");    Element     groupType;    Iterator    typesIterator       = types.iterator();    Collection  attributes;    Element     attribute;    String      name;    String      value;    String      origValue           = null;    Iterator    attributesIterator;    Group       group               = GroupFinder.findByName(s, stem);    GroupType   grouperGroupType    = null;    while (typesIterator.hasNext()) {      groupType = (Element) typesIterator.next();      if ("base".equals(groupType.getAttribute("name"))) {        continue;      }      try {        grouperGroupType = GroupTypeFinder.find(groupType            .getAttribute("name"));      }       catch (Exception ex) {        continue;      }      if (!group.hasType(grouperGroupType)) {        if (_optionTrue("import.metadata.apply-new-group-types")) {          group.addType(grouperGroupType);        }         else {          continue;        }      }      attributes = _getImmediateElements(groupType, "attribute");      attributesIterator = attributes.iterator();      Field field = null;      while (attributesIterator.hasNext()) {        attribute = (Element) attributesIterator.next();        name      = attribute.getAttribute("name");        field     = FieldFinder.find(name);        if (!group.canWriteField(field)) {          LOG.debug(            "No write privilege. Attribute [" + name + "] for [" + group.getName() + "] ignored"          );          continue;        }        value = ((Text) attribute.getFirstChild()).getData();        try {          origValue = group.getAttribute(name);        }           catch (Exception ex) {          // TODO Figure out why this is ignored once I refactor this class        }        if (          value != null          && !value.equals(origValue)          && (XmlUtils.isEmpty(origValue) || _optionTrue("import.data.update-attributes"))        )        {          group.setAttribute(name, value);        }      }    }  } // private void _processAttributes(e, stem) 