text: public static Automaton build(Collection<BytesRef> input) {final DaciukMihovAutomatonBuilder builder = new DaciukMihovAutomatonBuilder();char[] chars = new char[0];CharsRef ref = new CharsRef();for (BytesRef b : input) {chars = ArrayUtil.grow(chars, b.length);final int len = UnicodeUtil.UTF8toUTF16(b, chars);ref.chars = chars;ref.length = len;builder.add(ref);}Automaton.Builder a = new Automaton.Builder();convert(a,builder.complete(),new IdentityHashMap<State,Integer>());return a.finish();}