question: private Automaton buildAutomaton ( BytesRefHash termBytesHash ) { final TreeSet < BytesRef > terms = new TreeSet < BytesRef > ( ) ; for ( int i = 0 ; i < termBytesHash . size ( ) ; i ++ ) { BytesRef ref = new BytesRef ( ) ; termBytesHash . get ( i , ref ) ; terms . add ( ref ) ; } final Automaton a = DaciukMihovAutomatonBuilder . build ( terms ) ; return a ; }
target:  Build an automaton to represent the frontier query 