code: public void addNodes(NodeList nodelist)
    {
  
      if (!m_mutable)
        throw new RuntimeException(XSLMessages.createXPATHMessage(XPATHErrorResources.ER_NODESET_NOT_MUTABLE, null)); //"This NodeSet is not mutable!");
  
      if (null != nodelist)  // defensive to fix a bug that Sanjiva reported.
      {
        int nChildren = nodelist.getLength();
  
        for (int i = 0; i < nChildren; i++)
        {
          Node obj = nodelist.item(i);
  
          if (null != obj)
          {
            addElement(obj);
          }
        }
      }
  
      // checkDups();
    }
docs: Copy NodeList members into this nodelist, adding in
  document order.  If a node is null, don't add it.
  
  @param nodelist List of nodes which should now be referenced by
  this NodeSet.
  @throws RuntimeException thrown if this NodeSet is not of
  a mutable type.