Buggy code:
public class Compiler { final int option ; class CodeBlock { Instruction head ; int start ; int end ; } public UList < Instruction > codeList ; UMap < Compiler . CodeBlock > ruleMap ; HashMap < Integer , MemoPoint > memoMap ; public Compiler ( int CompilerOption ) { } private final boolean enablePackratParsing ( ) { } private final boolean enableASTConstruction ( ) { } MemoPoint issueMemoPoint ( Expression e ) { } public final int getInstructionSize ( ) { } public final int getMemoPointSize ( ) { } private UMap < String > visitedMap = null ; private boolean isContextSensitive ( Expression e ) { } public final Instruction encode ( UList < Rule > ruleList ) { } void encode ( Instruction inst ) { } public void dump ( UList < Rule > ruleList ) { } public final Instruction encodeMatchAny ( AnyChar p , Instruction next ) { } public final Instruction encodeByteChar ( ByteChar p , Instruction next ) { } public final Instruction encodeByteMap ( ByteMap p , Instruction next ) { } public Instruction encodeFail ( Expression p ) { } public final Instruction encodeRepetition ( Repetition p , Instruction next ) { } public final Instruction encodeOption ( Option p , Instruction next ) { } public final Instruction encodeAnd ( And p , Instruction next ) { } public final Instruction encodeNot ( Not p , Instruction next ) { } public final Instruction encodeSequence ( Expression p , Instruction next ) { } public final Instruction encodeChoice ( Choice p , Instruction next ) { } public final Instruction encodeUnoptimizedChoice ( Choice p , Instruction next ) { } public final Instruction encodeNonTerminal ( NonTerminal p , Instruction next ) { Expression pp = p . optimize ( option ) ; if ( ( ( pp instanceof ByteChar ) || ( pp instanceof ByteMap ) ) || ( pp instanceof AnyChar ) ) { Verbose . noticeOptimize ( "Inlining" , p , pp ) ; return pp . encode ( this , next ) ; } if ( this . enablePackratParsing ( ) ) { Rule r = p . getRule ( ) ; <START_BUG> if ( r . isPurePEG ( ) ) { <END_BUG> Expression ref = Factory . resolveNonTerminal ( r . getExpression ( ) ) ; MemoPoint m = this . issueMemoPoint ( ref ) ; if ( m != null ) { Instruction inside = new ICallPush ( r , newMemoize ( p , m , next ) ) ; return newLookup ( p , m , inside , next , newMemoizeFail ( p , m ) ) ; } } } return new ICallPush ( p . getRule ( ) , next ) ; } private Instruction newLookup ( Expression e , MemoPoint m , Instruction next , Instruction skip , Instruction failjump ) { } private Instruction newMemoize ( Expression e , MemoPoint m , Instruction next ) { } private Instruction newMemoizeFail ( Expression e , MemoPoint m ) { } public final Instruction encodeLink ( Link p , Instruction next ) { } private Instruction newLookupNode ( Link e , MemoPoint m , Instruction next , Instruction skip , Instruction failjump ) { } private Instruction newMemoizeNode ( Link e , MemoPoint m , Instruction next ) { } public final Instruction encodeNew ( New p , Instruction next ) { } public final Instruction encodeLeftNew ( LeftNew p , Instruction next ) { } public final Instruction encodeTagging ( Tagging p , Instruction next ) { } public final Instruction encodeReplace ( Replace p , Instruction next ) { } public final Instruction encodeBlock ( Block p , Instruction next ) { } public final Instruction encodeDefSymbol ( DefSymbol p , Instruction next ) { } public final Instruction encodeIsSymbol ( IsSymbol p , Instruction next ) { } public final Instruction encodeDefIndent ( DefIndent p , Instruction next ) { } public final Instruction encodeIsIndent ( IsIndent p , Instruction next ) { } }

Fix:
if ( ( ! ( this . enableASTConstruction ( ) ) ) || ( r . isPurePEG ( ) ) ) {