Buggy code:
public class Reaction extends BEASTObject { public Input < String > nameInput = new Input ( "reactionName" , "Name<seq2seq4repair_space>of<seq2seq4repair_space>reaction.<seq2seq4repair_space>(Not<seq2seq4repair_space>used<seq2seq4repair_space>for<seq2seq4repair_space>grouped<seq2seq4repair_space>reactions.)" ) ; public Input < String > rateInput = new Input ( "rate" , "Individual<seq2seq4repair_space>reaction<seq2seq4repair_space>rate.<seq2seq4repair_space>(Only<seq2seq4repair_space>used<seq2seq4repair_space>if<seq2seq4repair_space>group<seq2seq4repair_space>rate<seq2seq4repair_space>unset.)" ) ; public Input < String > rateMultiplierInput = new Input ( "rateMultiplier" , ( "The<seq2seq4repair_space>result<seq2seq4repair_space>of<seq2seq4repair_space>evaluating<seq2seq4repair_space>this<seq2seq4repair_space>expression<seq2seq4repair_space>involving<seq2seq4repair_space>" + ( "population<seq2seq4repair_space>location<seq2seq4repair_space>variables<seq2seq4repair_space>is<seq2seq4repair_space>multiplied<seq2seq4repair_space>with" + "the<seq2seq4repair_space>base<seq2seq4repair_space>reaction<seq2seq4repair_space>rate<seq2seq4repair_space>to<seq2seq4repair_space>produce<seq2seq4repair_space>a<seq2seq4repair_space>location-specific<seq2seq4repair_space>rate." ) ) ) ; public Input < String > reactionStringInput = new Input ( "value" , "String<seq2seq4repair_space>description<seq2seq4repair_space>of<seq2seq4repair_space>reaction." , Validate . REQUIRED ) ; public Input < List < Predicate > > predicatesInput = new Input ( "predicate" , "Predicate<seq2seq4repair_space>used<seq2seq4repair_space>to<seq2seq4repair_space>determine<seq2seq4repair_space>which<seq2seq4repair_space>reactions<seq2seq4repair_space>to<seq2seq4repair_space>include" , new ArrayList ( ) ) ; public String reactionName ; public Map < Population , Integer > reactCount ; public Map < Population , Integer > prodCount ; public Map < Population , Integer > deltaCount ; public Map < Population , List < Node > > reactNodes ; public Map < Population , List < Node > > prodNodes ; public List < Double > rates ; public List < Double > rateTimes ; public double propensity ; ParseTree reactionStringParseTree ; ParseTree rateMultiplierParseTree ; ParseTreeWalker parseTreeWalker = new ParseTreeWalker ( ) ; RateMultiplierExpressionVisitor rateMultiplierVisitor ; public Reaction ( ) { } public Reaction ( String reactionGroupName ) { } @ Override public void initAndValidate ( ) { reactionName = nameInput . get ( ) ; if ( ( rateInput . get ( ) ) != null ) { setRateFromString ( rateInput . get ( ) ) ; } ANTLRInputStream rsInput = new ANTLRInputStream ( reactionStringInput . get ( ) ) ; ReactionStringLexer rsLexer = new ReactionStringLexer ( rsInput ) ; CommonTokenStream rsTokens = new CommonTokenStream ( rsLexer ) ; ReactionStringParser rsParser = new ReactionStringParser ( rsTokens ) ; reactionStringParseTree = rsParser . reaction ( ) ; if ( ( rateMultiplierInput . get ( ) ) != null ) { ANTLRInputStream rmInput = new ANTLRInputStream ( rateMultiplierInput . get ( ) ) ; <START_BUG> ExpressionLexer rmLexer = new ExpressionLexer ( rsInput ) ; <END_BUG> CommonTokenStream rmTokens = new CommonTokenStream ( rmLexer ) ; ExpressionParser rmParser = new ExpressionParser ( rmTokens ) ; rateMultiplierParseTree = rmParser . expression ( ) ; } } private void variableLoop ( int depth , int [ ] maxIndices , int [ ] indices , List < int [ ] > indicesList ) { } public List < Reaction > getAllReactions ( List < PopulationType > populationTypes ) { } public void setRateFromString ( String rateString ) { } public List < Double > getRates ( ) { } public List < Double > getRateTimes ( ) { } public double getRate ( double t ) { } public void calcPropensity ( PopulationState state , double t ) { } public double getPropensity ( ) { } public void setName ( String reactionName ) { } public String getName ( ) { } @ Override @ JsonValue public String toString ( ) { } No newline ; at end ; of file ; }

Fix:
ExpressionLexer rmLexer = new ExpressionLexer ( rmInput ) ;