Program: 160817
Project: 160817
Buggy source:
public final Postfix_expressionContext postfix_expression(int _p) throws RecognitionException {
  ParserRuleContext _parentctx=_ctx;
  int _parentState=getState();
  Postfix_expressionContext _localctx=new Postfix_expressionContext(_ctx,_parentState,_p);
  Postfix_expressionContext _prevctx=_localctx;
  int _startState=82;
  enterRecursionRule(_localctx,RULE_postfix_expression);
  int _la;
  try {
    int _alt;
    enterOuterAlt(_localctx,1);
{
{
        _localctx=new PrimaryOnlyContext(_localctx);
        _ctx=_localctx;
        _prevctx=_localctx;
        setState(348);
        primary_expression();
      }
      _ctx.stop=_input.LT(-1);
      setState(376);
      _errHandler.sync(this);
      _alt=getInterpreter().adaptivePredict(_input,25,_ctx);
      while (_alt != 2 && _alt != -1) {
        if (_alt == 1) {
          if (_parseListeners != null)           triggerExitRuleEvent();
          _prevctx=_localctx;
{
            setState(374);
switch (getInterpreter().adaptivePredict(_input,24,_ctx)) {
case 1:
{
                _localctx=new ArrayIndexingContext(new Postfix_expressionContext(_parentctx,_parentState,_p));
                pushNewRecursionContext(_localctx,_startState,RULE_postfix_expression);
                setState(350);
                if (!(6 >= _localctx._p))                 throw new FailedPredicateException(this,"String_Node_Str");
                setState(351);
                match(3);
                setState(352);
                expr();
                setState(353);
                match(22);
              }
            break;
case 2:
{
            _localctx=new FuncCallContext(new Postfix_expressionContext(_parentctx,_parentState,_p));
            pushNewRecursionContext(_localctx,_startState,RULE_postfix_expression);
            setState(355);
            if (!(5 >= _localctx._p))             throw new FailedPredicateException(this,"String_Node_Str");
            setState(356);
            match(28);
            setState(357);
            function_argument_list();
            setState(358);
            match(12);
          }
        break;
case 3:
{
        _localctx=new MemberAccessContext(new Postfix_expressionContext(_parentctx,_parentState,_p));
        pushNewRecursionContext(_localctx,_startState,RULE_postfix_expression);
        setState(360);
        if (!(4 >= _localctx._p))         throw new FailedPredicateException(this,"String_Node_Str");
        setState(361);
        match(42);
        setState(363);
        _la=_input.LA(1);
        if (_la == TEMPLATE) {
{
            setState(362);
            match(TEMPLATE);
          }
        }
        setState(365);
        identifier();
      }
    break;
case 4:
{
    _localctx=new PtrMemberAccessContext(new Postfix_expressionContext(_parentctx,_parentState,_p));
    pushNewRecursionContext(_localctx,_startState,RULE_postfix_expression);
    setState(366);
    if (!(3 >= _localctx._p))     throw new FailedPredicateException(this,"String_Node_Str");
    setState(367);
    match(9);
    setState(369);
    _la=_input.LA(1);
    if (_la == TEMPLATE) {
{
        setState(368);
        match(TEMPLATE);
      }
    }
    setState(371);
    identifier();
  }
break;
case 5:
{
_localctx=new IncDecOpContext(new Postfix_expressionContext(_parentctx,_parentState,_p));
pushNewRecursionContext(_localctx,_startState,RULE_postfix_expression);
setState(372);
if (!(2 >= _localctx._p)) throw new FailedPredicateException(this,"String_Node_Str");
setState(373);
inc_dec();
}
break;
}
}
}
setState(378);
_errHandler.sync(this);
_alt=getInterpreter().adaptivePredict(_input,25,_ctx);
}
}
}
 catch (RecognitionException re) {
_localctx.exception=re;
_errHandler.reportError(this,re);
_errHandler.recover(this,re);
}
 finally {
unrollRecursionContexts(_parentctx);
}
return _localctx;
}

Fixed version (ground truth):
public final Postfix_expressionContext postfix_expression(int _p) throws RecognitionException {
  ParserRuleContext _parentctx=_ctx;
  int _parentState=getState();
  Postfix_expressionContext _localctx=new Postfix_expressionContext(_ctx,_parentState,_p);
  Postfix_expressionContext _prevctx=_localctx;
  int _startState=82;
  enterRecursionRule(_localctx,RULE_postfix_expression);
  int _la;
  try {
    int _alt;
    enterOuterAlt(_localctx,1);
{
{
        _localctx=new PrimaryOnlyContext(_localctx);
        _ctx=_localctx;
        _prevctx=_localctx;
        setState(361);
        primary_expression();
      }
      _ctx.stop=_input.LT(-1);
      setState(389);
      _errHandler.sync(this);
      _alt=getInterpreter().adaptivePredict(_input,26,_ctx);
      while (_alt != 2 && _alt != -1) {
        if (_alt == 1) {
          if (_parseListeners != null)           triggerExitRuleEvent();
          _prevctx=_localctx;
{
            setState(387);
switch (getInterpreter().adaptivePredict(_input,25,_ctx)) {
case 1:
{
                _localctx=new ArrayIndexingContext(new Postfix_expressionContext(_parentctx,_parentState,_p));
                pushNewRecursionContext(_localctx,_startState,RULE_postfix_expression);
                setState(363);
                if (!(6 >= _localctx._p))                 throw new FailedPredicateException(this,"String_Node_Str");
                setState(364);
                match(3);
                setState(365);
                expr();
                setState(366);
                match(23);
              }
            break;
case 2:
{
            _localctx=new FuncCallContext(new Postfix_expressionContext(_parentctx,_parentState,_p));
            pushNewRecursionContext(_localctx,_startState,RULE_postfix_expression);
            setState(368);
            if (!(5 >= _localctx._p))             throw new FailedPredicateException(this,"String_Node_Str");
            setState(369);
            match(29);
            setState(370);
            function_argument_list();
            setState(371);
            match(12);
          }
        break;
case 3:
{
        _localctx=new MemberAccessContext(new Postfix_expressionContext(_parentctx,_parentState,_p));
        pushNewRecursionContext(_localctx,_startState,RULE_postfix_expression);
        setState(373);
        if (!(4 >= _localctx._p))         throw new FailedPredicateException(this,"String_Node_Str");
        setState(374);
        match(43);
        setState(376);
        _la=_input.LA(1);
        if (_la == TEMPLATE) {
{
            setState(375);
            match(TEMPLATE);
          }
        }
        setState(378);
        identifier();
      }
    break;
case 4:
{
    _localctx=new PtrMemberAccessContext(new Postfix_expressionContext(_parentctx,_parentState,_p));
    pushNewRecursionContext(_localctx,_startState,RULE_postfix_expression);
    setState(379);
    if (!(3 >= _localctx._p))     throw new FailedPredicateException(this,"String_Node_Str");
    setState(380);
    match(9);
    setState(382);
    _la=_input.LA(1);
    if (_la == TEMPLATE) {
{
        setState(381);
        match(TEMPLATE);
      }
    }
    setState(384);
    identifier();
  }
break;
case 5:
{
_localctx=new IncDecOpContext(new Postfix_expressionContext(_parentctx,_parentState,_p));
pushNewRecursionContext(_localctx,_startState,RULE_postfix_expression);
setState(385);
if (!(2 >= _localctx._p)) throw new FailedPredicateException(this,"String_Node_Str");
setState(386);
inc_dec();
}
break;
}
}
}
setState(391);
_errHandler.sync(this);
_alt=getInterpreter().adaptivePredict(_input,26,_ctx);
}
}
}
 catch (RecognitionException re) {
_localctx.exception=re;
_errHandler.reportError(this,re);
_errHandler.recover(this,re);
}
 finally {
unrollRecursionContexts(_parentctx);
}
return _localctx;
}