<CONTEXT>} else {index = indexOfNthOccurrenceOfCharIn(group, ')', numOpenParens);</BUG>}<extra_id_0>}<BUG>return (prefix + group.substring(0, index+1) + suffix + group.substring(index+1));}</BUG>}static protected String transformQuery(String query, QueryTransformer qt) {StringBuffer modified_query = new StringBuffer();Matcher matcher = qt.m_queryPattern.matcher(query);</CONTEXT>
index = indexOfNthOccurrenceOfCharIn(group, ')', numOpenParens) + 1;return (prefix + group.substring(0, index) + suffix + group.substring(index));