DoubleArray extends AbstractTermIdTrie implements Externalizable, TermIdTrie { @Override public Iterable<Pair<String, Integer>> commonPrefixSearchWithTermId( String query) { List<Pair<String, Integer>> ret = new ArrayList<Pair<String, Integer>>(); char[] chars = query.toCharArray(); int charsLen = chars.length; int checkLen = check.length; int nodeIndex = 0; for(int i = 0; i < charsLen; i++){ int cid = findCharId(chars[i]); if(cid == -1) return ret; int b = base[nodeIndex]; if(b == BASE_EMPTY) return ret; int next = b + cid; if(next < 0 || checkLen <= next || check[next] != nodeIndex) return ret; nodeIndex = next; if(term.get(nodeIndex)){ ret.add(Pair.create( new String(chars, 0, i + 1), term.rank1(nodeIndex) - 1 )); } } return ret; } DoubleArray();  DoubleArray(Trie trie);  DoubleArray(Trie trie, int arraySize);  DoubleArray(Trie trie, int arraySize, TermNodeListener listener); @Override int nodeSize(); @Override int size(); @Override TermIdNode getRoot(); int[] getBase(); int[] getCheck(); BitSet getTerm(); @Override boolean contains(String text); int getNodeId(String text); @Override int getTermId(String text); @Override int findShortestWord(CharSequence chars, int start, int end, StringBuilder word); @Override int findLongestWord(CharSequence chars, int start, int end, StringBuilder word); @Override Iterable<String> commonPrefixSearch(String query); @Override Iterable<Pair<String, Integer>> commonPrefixSearchWithTermId(
			String query); @Override Iterable<String> predictiveSearch(String prefix); @Override Iterable<Pair<String, Integer>> predictiveSearchWithTermId(
			String prefix); @Override void writeExternal(ObjectOutput out); void save(OutputStream os); @Override void readExternal(ObjectInput in); void load(InputStream is); @Override void trimToSize(); @Override void dump(Writer w);  }
@Test public void test_issue_035() throws Exception{ Trie t = trieWithWords( "php.a", "php.e", "php.o", "e", "php.elu", "php.s", "php.x"); DoubleArray da = new DoubleArray(t); da.commonPrefixSearchWithTermId("php.ele"); }