LOG.debug( "getDescendants found " + result.getLength() + " in " + (System.currentTimeMillis() - start)); } else {*/ result = ((ArraySet) buf).getDescendants( (ArraySet) context, ArraySet.DESCENDANT);  return result;
} return ((ArraySet) buf).getDescendants((ArraySet) context, ArraySet.DESCENDANT);
	protected NodeSet getDescendants(DocumentSet documents, NodeSet context) {		if (test.getType() == NodeTest.NAME_TEST) {			DBBroker broker = null;			try {				broker = pool.get();				if (buf == null)					buf =						(NodeSet) broker.findElementsByTagName(							documents,							test.getName());				ArraySet result = null;				/*if (context instanceof VirtualNodeSet) {					long start = System.currentTimeMillis();					NodeProxy current;					result = new ArraySet(buf.getLength());					//( (ArraySet) result ).setIsSorted( true );					for (Iterator iter = buf.iterator(); iter.hasNext();) {						current = (NodeProxy) iter.next();						if (current != null							&& context.nodeHasParent(								current.doc,								current.gid,								false))							result.add(current);					}					LOG.debug(						"getDescendants found "							+ result.getLength()							+ " in "							+ (System.currentTimeMillis() - start));				} else {*/					result =						((ArraySet) buf).getDescendants(							(ArraySet) context,							ArraySet.DESCENDANT);				//}				return result;			} catch (EXistException e) {				e.printStackTrace();				return null;			} finally {				pool.release(broker);			}		} else			return new VirtualNodeSet(axis, (TypeTest) test, context);	}