Source:
<code>public void init() throws SystemException { int partition = ctx.getTaskAttemptId().getTaskId().getPartition(); ITreeNodeIdProvider nodeIdProvider = new TreeNodeIdProvider((short) partition); <START> List<SequenceType> newChildSequenceType=new ArrayList<SequenceType>(); <END> for (SequenceType sType : childSequenceTypes) { NodeType nodeType = (NodeType) sType.getItemType(); if (nodeType.getNodeKind() == NodeKind.ELEMENT) { newChildSequenceType.add(sType); } } handler = new SAXContentHandler(false, nodeIdProvider, appender, newChildSequenceType); nodeAbvs.reset(); indexPlace = 0; try { indexPlace = 0; reader = DirectoryReader.open(FSDirectory.open(Paths.get(indexName))); } catch (IOException e) { throw new SystemException(ErrorCode.SYSE0001, e); } searcher = new IndexSearcher(reader); Analyzer analyzer = new CaseSensitiveAnalyzer(); parser = new CaseSensitiveQueryParser("item", analyzer); String type = ""; for (SequenceType sType : childSequenceTypes) { NodeType nodeType = (NodeType) sType.getItemType(); if (nodeType.getNodeKind() == NodeKind.ELEMENT) { type = ".element"; } else { type = ".textnode"; } } String queryString = elementPath.replaceAll("/", "."); String prefixString=""; if (!indexSeq.isEmpty()) { int lastdot = queryString.lastIndexOf('.'); prefixString = queryString.substring(0, lastdot); queryString=prefixString+"\\:"+queryString.substring(lastdot+1); } queryString = "item:" + queryString + "*"; int lastslash = elementPath.lastIndexOf('/'); elementPath = elementPath.substring(0, lastslash) + ":" + elementPath.substring(lastslash + 1); elementPath = elementPath.replaceAll("/", ".") + type; TopDocs results = null; try { query = parser.parse(queryString); results = searcher.search(query, 1000000); } catch (Exception e) { throw new SystemException(null, e); } hits = results.scoreDocs; indexPlace = 0; indexLength = hits.length; }</code><technical_language>formatting</technical_language>

Target:
public void init() throws SystemException { int partition = ctx.getTaskAttemptId().getTaskId().getPartition(); ITreeNodeIdProvider nodeIdProvider = new TreeNodeIdProvider((short) partition); handler = new SAXContentHandler(false, nodeIdProvider, appender, childSequenceTypes); nodeAbvs.reset(); indexPlace = 0; try { indexPlace = 0; reader = DirectoryReader.open(FSDirectory.open(Paths.get(indexName))); } catch (IOException e) { throw new SystemException(ErrorCode.SYSE0001, e); } searcher = new IndexSearcher(reader); Analyzer analyzer = new CaseSensitiveAnalyzer(); parser = new CaseSensitiveQueryParser("item", analyzer); String queryString = ""; queryString = returnPath.replaceAll("/", "."); queryString = "item:" + queryString + "*"; if (!indexSeq.isEmpty()) { int lastSlash = elementPath.lastIndexOf('/'); queryString = elementPath.replaceAll("/", "."); String prefixString = ""; prefixString = queryString.substring(0, lastSlash); String valueString = queryString.substring(lastSlash + 1); valueString = valueString.replaceAll(":", "\\\\:"); queryString = prefixString + "\\:" + valueString; queryString = "item:" + queryString + "*"; } int lastreturnslash = returnPath.lastIndexOf('/'); returnPath = returnPath.substring(0, lastreturnslash) + ":" + returnPath.substring(lastreturnslash + 1); returnPath = returnPath.replaceAll("/", ".") + ".element"; if (!indexSeq.isEmpty()) { String type = ".textnode"; if (!indexAttsSeq.isEmpty()) { type = ".text"; } int lastslash = elementPath.lastIndexOf('/'); elementPath = elementPath.substring(0, lastslash) + ":" + elementPath.substring(lastslash + 1); elementPath = elementPath.replaceAll("/", ".") + type; } TopDocs results = null; try { query = parser.parse(queryString); results = searcher.search(query, 1000000); } catch (Exception e) { throw new SystemException(null, e); } hits = results.scoreDocs; indexPlace = 0; indexLength = hits.length; }