Source:
private int buildElement(ArrayBackedValueStorage abvsFileNode, int fieldNum) throws SAXException { int whereIFinish = fieldNum; IndexableField field = fields.get(fieldNum); String contents = field.stringValue(); String uri = ""; IndexAttributes atts = new IndexAttributes(); int firstColon = contents.indexOf(':'); int lastDot = contents.lastIndexOf('.'); String type = contents.substring(lastDot + 1); String lastBit = contents.substring(firstColon + 1, lastDot); int dots = contents.indexOf("."); int nextdot; String element = ""; int elements = 0; if (this.firstElement) { this.firstElement = false; while (dots < firstColon) { nextdot = dots; dots = contents.indexOf(".", dots + 1); element = contents.substring(nextdot + 1, dots); if (dots > firstColon) { element = contents.substring(nextdot + 1, firstColon); } atts.reset(); handler.startElement(uri, element, element, atts); elements++; } } if ("textnode".equals(type)) { char[] charContents = lastBit.toCharArray(); handler.characters(charContents, 0, charContents.length); } if ("element".equals(type)) { whereIFinish = findAttributeChildren(whereIFinish, atts); atts.reset(); handler.startElement(uri, lastBit, lastBit, atts); boolean noMoreChildren = false; while (whereIFinish + 1 < fields.size() && !noMoreChildren) { if (isChild(fields.get(whereIFinish + 1), field)) { whereIFinish = buildElement(abvsFileNode, whereIFinish + 1); } else { noMoreChildren = true; } } handler.endElement(uri, lastBit, lastBit); } while (elements > 0) { handler.endElement(uri, element, element); elements--; } return whereIFinish; }

Target:
private int buildElement(ArrayBackedValueStorage abvsFileNode, int fieldNum) throws SAXException { int whereIFinish = fieldNum; IndexableField field = fields.get(fieldNum); String contents = field.stringValue(); String uri = ""; IndexAttributes atts = new IndexAttributes(); int firstColon = contents.indexOf(':'); int lastDot = contents.lastIndexOf('.'); String type = contents.substring(lastDot + 1); String lastBit = contents.substring(firstColon + 1, lastDot); int dots = contents.indexOf("."); int nextdot; String element = ""; int elements = 0; if (this.firstElement) { this.firstElement = false; while (dots < firstColon) { nextdot = dots; dots = contents.indexOf(".", dots + 1); element = contents.substring(nextdot + 1, dots); if (dots > firstColon) { element = contents.substring(nextdot + 1, firstColon); } atts.reset(); handler.startElement(uri, element, element, (Attributes) atts); elements++; } } if ("textnode".equals(type)) { char[] charContents = lastBit.toCharArray(); handler.characters(charContents, 0, charContents.length); } if ("element".equals(type)) { atts.reset(); whereIFinish = findAttributeChildren(whereIFinish, atts); handler.startElement(uri, lastBit, lastBit, (Attributes) atts); boolean noMoreChildren = false; while (whereIFinish + 1 < fields.size() && !noMoreChildren) { if (isChild(fields.get(whereIFinish + 1), field)) { whereIFinish = buildElement(abvsFileNode, whereIFinish + 1); } else { noMoreChildren = true; } } handler.endElement(uri, lastBit, lastBit); } while (elements > 0) { handler.endElement(uri, element, element); elements--; } return whereIFinish; }