e.printStackTrace();
LOG.warn("unexpected io error", e); } catch (IOException e) { LOG.warn("unexpected io error", e);
	public NodeSet findElementsByTagName(DocumentSet docs, String tagName) {		final long start = System.currentTimeMillis();		final NodeSet result = new ArraySet(100000);		DocumentImpl doc;		int docId;		int len;		short collectionId;		long gid;		long address;		long delta;		long last = -1;		int tid;		int page;		VariableByteInputStream is;		ElementValue ref;		Value val;		//byte[] data;		short sym;		Collection collection;		final Lock lock = elementsDb.getLock();		for (Iterator i = docs.getCollectionIterator(); i.hasNext();) {			collection = (Collection) i.next();			collectionId = collection.getId();			sym = NativeBroker.getSymbols().getSymbol(tagName);			ref = new ElementValue(collectionId, sym);			try {				lock.acquire(this);				lock.enter(this);				val = elementsDb.get(ref);			} catch (LockException e) {				LOG.warn("failed to acquire lock", e);				val = null;			} finally {				lock.release(this);			}			if (val == null)				continue;			//data = val.getData();			is = new VariableByteInputStream(val.data(), val.start(), val.length());			try {				while (is.available() > 0) {					docId = is.readInt();					len = is.readInt();					if ((doc = docs.getDoc(docId)) == null) {						is.skip(len * 3);						continue;					}					last = 0;					for (int k = 0; k < len; k++) {						delta = is.readLong();						gid = last + delta;						last = gid;						page = is.readInt();						tid = is.readInt();						address = DOMFile.createPointer(page, tid);						//LOG.debug("loaded " + docId + ':' + gid);						result.add(new NodeProxy(doc, gid, Node.ELEMENT_NODE, address));					}				}			} catch (EOFException e) {				e.printStackTrace();			}		}		LOG.debug(			"found "				+ tagName				+ ": "				+ result.getLength()				+ " in "				+ (System.currentTimeMillis() - start)				+ "ms.");		return result;	}