original_string: public function nextState( $currentState, $inputChar ) {
  		$initialState = $currentState;
  		while ( true ) {
  			$transitions =& $this->yesTransitions[$currentState];
  			if ( isset( $transitions[$inputChar] ) ) {
  				$nextState = $transitions[$inputChar];
  				// Avoid failure transitions next time.
  				if ( $currentState !== $initialState ) {
  					$this->yesTransitions[$initialState][$inputChar] = $nextState;
  				}
  				return $nextState;
  			}
  			if ( $currentState === 0 ) {
  				return 0;
  			}
  			$currentState = $this->noTransitions[$currentState];
  		}
  		// Unreachable outside 'while'
  	}
code: public function nextState( $currentState, $inputChar ) {
  		$initialState = $currentState;
  		while ( true ) {
  			$transitions =& $this->yesTransitions[$currentState];
  			if ( isset( $transitions[$inputChar] ) ) {
  				$nextState = $transitions[$inputChar];
  				// Avoid failure transitions next time.
  				if ( $currentState !== $initialState ) {
  					$this->yesTransitions[$initialState][$inputChar] = $nextState;
  				}
  				return $nextState;
  			}
  			if ( $currentState === 0 ) {
  				return 0;
  			}
  			$currentState = $this->noTransitions[$currentState];
  		}
  		// Unreachable outside 'while'
  	}
code_tokens: public function nextState ( $ currentState , $ inputChar ) { $ initialState = $ currentState ; while ( true ) { $ transitions = & $ this -> yesTransitions [ $ currentState ] ; if ( isset ( $ transitions [ $ inputChar ] ) ) { $ nextState = $ transitions [ $ inputChar ] ; // Avoid failure transitions next time. if ( $ currentState !== $ initialState ) { $ this -> yesTransitions [ $ initialState ] [ $ inputChar ] = $ nextState ; } return $ nextState ; } if ( $ currentState === 0 ) { return 0 ; } $ currentState = $ this -> noTransitions [ $ currentState ] ; } // Unreachable outside 'while' }
docstring: Map the current state and input character to the next state.
  
  @param int $currentState The current state of the string-matching
  automaton.
  @param string $inputChar The character the string-matching
  automaton is currently processing.
  @return int The state the automaton should transition to.
docstring_tokens: Map the current state and input character to the next state .