test_class.file: extra/src/test/java/org/wikimedia/search/extra/regex/ngram/NGramAutomatonTest.java
test_class.identifier: NGramAutomatonTest
test_class.superclass: extends RandomizedTest
test_case.body: @Test
      @Repeat(iterations = 100)
      public void randomAutomaton() {
          Automaton automaton = AutomatonTestUtil.randomAutomaton(getRandom());
          NGramAutomaton ngramAutomaton;
          try {
              ngramAutomaton = new NGramAutomaton(automaton, between(2, 7), 4, 10000, 500, new KeywordAnalyzer());
          } catch (AutomatonTooComplexException e) {
              // This is fine - some automata are genuinely too complex to ngramify.
              return;
          }
          Expression<String> expression = ngramAutomaton.expression();
          expression = expression.simplify();
      }
test_case.class_method_signature: NGramAutomatonTest.randomAutomaton()
test_case.full_signature: @Test @Repeat(iterations = 100) public void randomAutomaton()
test_case.identifier: randomAutomaton
test_case.invocations: randomAutomaton getRandom between expression simplify
test_case.modifiers: @Test @Repeat(iterations = 100) public
test_case.parameters: ()
test_case.return: void
test_case.signature: void randomAutomaton()
focal_class.declarator: source
focal_class.modifier: private final
focal_class.original_string: private final Automaton source;
focal_class.type: Automaton
focal_class.var_name: source
focal_class.declarator: gramSize
focal_class.modifier: private final
focal_class.original_string: private final int gramSize;
focal_class.type: int
focal_class.var_name: gramSize
focal_class.declarator: maxExpand
focal_class.modifier: private final
focal_class.original_string: private final int maxExpand;
focal_class.type: int
focal_class.var_name: maxExpand
focal_class.declarator: maxStatesTraced
focal_class.modifier: private final
focal_class.original_string: private final int maxStatesTraced;
focal_class.type: int
focal_class.var_name: maxStatesTraced
focal_class.declarator: maxTransitions
focal_class.modifier: private final
focal_class.original_string: private final int maxTransitions;
focal_class.type: int
focal_class.var_name: maxTransitions
focal_class.declarator: initialStates = new ArrayList<>()
focal_class.modifier: private final
focal_class.original_string: private final List<NGramState> initialStates = new ArrayList<>();
focal_class.type: List<NGramState>
focal_class.var_name: initialStates
focal_class.declarator: acceptStates = new ArrayList<>()
focal_class.modifier: private final
focal_class.original_string: private final List<NGramState> acceptStates = new ArrayList<>();
focal_class.type: List<NGramState>
focal_class.var_name: acceptStates
focal_class.declarator: states = new HashMap<>()
focal_class.modifier: private final
focal_class.original_string: private final Map<NGramState, NGramState> states = new HashMap<>();
focal_class.type: Map<NGramState, NGramState>
focal_class.var_name: states
focal_class.declarator: ngramAnalyzer
focal_class.modifier: private final
focal_class.original_string: private final Analyzer ngramAnalyzer;
focal_class.type: Analyzer
focal_class.var_name: ngramAnalyzer
focal_class.file: extra/src/main/java/org/wikimedia/search/extra/regex/ngram/NGramAutomaton.java
focal_class.identifier: NGramAutomaton
focal_class.class_method_signature: NGramAutomaton.NGramAutomaton(Automaton source, int gramSize, int maxExpand, int maxStatesTraced, int maxTransitions, Analyzer ngramAnalyzer)
focal_class.full_signature: public  NGramAutomaton(Automaton source, int gramSize, int maxExpand, int maxStatesTraced, int maxTransitions, Analyzer ngramAnalyzer)
focal_class.identifier: NGramAutomaton
focal_class.modifiers: public
focal_class.parameters: (Automaton source, int gramSize, int maxExpand, int maxStatesTraced, int maxTransitions, Analyzer ngramAnalyzer)
focal_class.signature:  NGramAutomaton(Automaton source, int gramSize, int maxExpand, int maxStatesTraced, int maxTransitions, Analyzer ngramAnalyzer)
focal_class.class_method_signature: NGramAutomaton.toDot()
focal_class.full_signature: public String toDot()
focal_class.identifier: toDot
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String toDot()
focal_class.class_method_signature: NGramAutomaton.expression()
focal_class.full_signature: public Expression<String> expression()
focal_class.identifier: expression
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Expression<String>
focal_class.signature: Expression<String> expression()
focal_class.class_method_signature: NGramAutomaton.buildInitial(int[] codePoints, int offset, int currentState)
focal_class.full_signature: private boolean buildInitial(int[] codePoints, int offset, int currentState)
focal_class.identifier: buildInitial
focal_class.modifiers: private
focal_class.parameters: (int[] codePoints, int offset, int currentState)
focal_class.return: boolean
focal_class.signature: boolean buildInitial(int[] codePoints, int offset, int currentState)
focal_class.class_method_signature: NGramAutomaton.traceRemainingStates()
focal_class.full_signature: private void traceRemainingStates()
focal_class.identifier: traceRemainingStates
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void traceRemainingStates()
focal_class.class_method_signature: NGramAutomaton.analyze(@Nullable String ngram)
focal_class.full_signature: @Nullable private String analyze(@Nullable String ngram)
focal_class.identifier: analyze
focal_class.modifiers: @Nullable private
focal_class.parameters: (@Nullable String ngram)
focal_class.return: String
focal_class.signature: String analyze(@Nullable String ngram)
focal_class.class_method_signature: NGramAutomaton.buildOrFind(LinkedList<NGramState> leftToProcess, int sourceState, String prefix)
focal_class.full_signature: private NGramState buildOrFind(LinkedList<NGramState> leftToProcess, int sourceState, String prefix)
focal_class.identifier: buildOrFind
focal_class.modifiers: private
focal_class.parameters: (LinkedList<NGramState> leftToProcess, int sourceState, String prefix)
focal_class.return: NGramState
focal_class.signature: NGramState buildOrFind(LinkedList<NGramState> leftToProcess, int sourceState, String prefix)
focal_method.body: public Expression<String> expression() {
          return Or.fromExpressionSources(acceptStates);
      }
focal_method.class_method_signature: NGramAutomaton.expression()
focal_method.full_signature: public Expression<String> expression()
focal_method.identifier: expression
focal_method.invocations: fromExpressionSources
focal_method.modifiers: public
focal_method.parameters: ()
focal_method.return: Expression<String>
focal_method.signature: Expression<String> expression()