Program: 169142
Project: 169142
Buggy source:
public final Having simpleHaving() throws RecognitionException {
  Having having=null;
  Token a=null;
  Token t=null;
  Token v=null;
  Token n=null;
  EqualsToHolder e=null;
  try {
    int alt94=3;
    int LA94_0=input.LA(1);
    if ((LA94_0 == ID)) {
switch (input.LA(2)) {
case WS:
{
          int LA94_3=input.LA(3);
          if ((LA94_3 == COMPARE_OPER)) {
            alt94=1;
          }
 else           if ((LA94_3 == EQUALS)) {
            alt94=2;
          }
 else {
            int nvaeMark=input.mark();
            try {
              for (int nvaeConsume=0; nvaeConsume < 3 - 1; nvaeConsume++) {
                input.consume();
              }
              NoViableAltException nvae=new NoViableAltException("String_Node_Str",94,3,input);
              throw nvae;
            }
  finally {
              input.rewind(nvaeMark);
            }
          }
        }
      break;
case COMPARE_OPER:
{
      alt94=1;
    }
  break;
case EQUALS:
{
  alt94=2;
}
break;
default :
int nvaeMark=input.mark();
try {
input.consume();
NoViableAltException nvae=new NoViableAltException("String_Node_Str",94,1,input);
throw nvae;
}
  finally {
input.rewind(nvaeMark);
}
}
}
 else if ((LA94_0 == NOT)) {
alt94=3;
}
 else {
NoViableAltException nvae=new NoViableAltException("String_Node_Str",94,0,input);
throw nvae;
}
switch (alt94) {
case 1:
{
{
a=(Token)match(input,ID,FOLLOW_ID_in_simpleHaving1443);
int alt90=2;
int LA90_0=input.LA(1);
if ((LA90_0 == WS)) {
alt90=1;
}
switch (alt90) {
case 1:
{
match(input,WS,FOLLOW_WS_in_simpleHaving1445);
}
break;
}
t=(Token)match(input,COMPARE_OPER,FOLLOW_COMPARE_OPER_in_simpleHaving1450);
int alt91=2;
int LA91_0=input.LA(1);
if ((LA91_0 == WS)) {
alt91=1;
}
switch (alt91) {
case 1:
{
match(input,WS,FOLLOW_WS_in_simpleHaving1452);
}
break;
}
v=input.LT(1);
if (input.LA(1) == FLOAT || input.LA(1) == LONG) {
input.consume();
state.errorRecovery=false;
}
 else {
MismatchedSetException mse=new MismatchedSetException(null,input);
throw mse;
}
}
having=new Having((t != null ? t.getText() : null),(a != null ? a.getText() : null),(v != null ? v.getText() : null));
}
break;
case 2:
{
{
pushFollow(FOLLOW_getEquals_in_simpleHaving1474);
e=getEquals();
state._fsp--;
}
having=new Having("String_Node_Str",e.name,e.value);
}
break;
case 3:
{
{
n=(Token)match(input,NOT,FOLLOW_NOT_in_simpleHaving1485);
match(input,WS,FOLLOW_WS_in_simpleHaving1487);
a=(Token)match(input,ID,FOLLOW_ID_in_simpleHaving1491);
int alt92=2;
int LA92_0=input.LA(1);
if ((LA92_0 == WS)) {
alt92=1;
}
switch (alt92) {
case 1:
{
match(input,WS,FOLLOW_WS_in_simpleHaving1493);
}
break;
}
t=(Token)match(input,COMPARE_OPER,FOLLOW_COMPARE_OPER_in_simpleHaving1498);
int alt93=2;
int LA93_0=input.LA(1);
if ((LA93_0 == WS)) {
alt93=1;
}
switch (alt93) {
case 1:
{
match(input,WS,FOLLOW_WS_in_simpleHaving1500);
}
break;
}
v=input.LT(1);
if (input.LA(1) == FLOAT || input.LA(1) == LONG) {
input.consume();
state.errorRecovery=false;
}
 else {
MismatchedSetException mse=new MismatchedSetException(null,input);
throw mse;
}
}
having=new Having((n != null ? n.getText() : null).toLowerCase());
having.havingSpecs=Arrays.asList(new Having((t != null ? t.getText() : null),(a != null ? a.getText() : null),(v != null ? v.getText() : null)));
}
break;
}
}
 catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
 finally {
}
return having;
}

Fixed version (ground truth):
public final Having simpleHaving() throws RecognitionException {
  Having having=null;
  Token a=null;
  Token t=null;
  Token v=null;
  Token n=null;
  EqualsToHolder e=null;
  try {
    int alt95=3;
    int LA95_0=input.LA(1);
    if ((LA95_0 == ID)) {
switch (input.LA(2)) {
case WS:
{
          int LA95_3=input.LA(3);
          if ((LA95_3 == COMPARE_OPER)) {
            alt95=1;
          }
 else           if ((LA95_3 == EQUALS)) {
            alt95=2;
          }
 else {
            int nvaeMark=input.mark();
            try {
              for (int nvaeConsume=0; nvaeConsume < 3 - 1; nvaeConsume++) {
                input.consume();
              }
              NoViableAltException nvae=new NoViableAltException("String_Node_Str",95,3,input);
              throw nvae;
            }
  finally {
              input.rewind(nvaeMark);
            }
          }
        }
      break;
case COMPARE_OPER:
{
      alt95=1;
    }
  break;
case EQUALS:
{
  alt95=2;
}
break;
default :
int nvaeMark=input.mark();
try {
input.consume();
NoViableAltException nvae=new NoViableAltException("String_Node_Str",95,1,input);
throw nvae;
}
  finally {
input.rewind(nvaeMark);
}
}
}
 else if ((LA95_0 == NOT)) {
alt95=3;
}
 else {
NoViableAltException nvae=new NoViableAltException("String_Node_Str",95,0,input);
throw nvae;
}
switch (alt95) {
case 1:
{
{
a=(Token)match(input,ID,FOLLOW_ID_in_simpleHaving1474);
int alt91=2;
int LA91_0=input.LA(1);
if ((LA91_0 == WS)) {
alt91=1;
}
switch (alt91) {
case 1:
{
match(input,WS,FOLLOW_WS_in_simpleHaving1476);
}
break;
}
t=(Token)match(input,COMPARE_OPER,FOLLOW_COMPARE_OPER_in_simpleHaving1481);
int alt92=2;
int LA92_0=input.LA(1);
if ((LA92_0 == WS)) {
alt92=1;
}
switch (alt92) {
case 1:
{
match(input,WS,FOLLOW_WS_in_simpleHaving1483);
}
break;
}
v=input.LT(1);
if (input.LA(1) == FLOAT || input.LA(1) == LONG) {
input.consume();
state.errorRecovery=false;
}
 else {
MismatchedSetException mse=new MismatchedSetException(null,input);
throw mse;
}
}
having=new Having((t != null ? t.getText() : null),(a != null ? a.getText() : null),(v != null ? v.getText() : null));
}
break;
case 2:
{
{
pushFollow(FOLLOW_getEquals_in_simpleHaving1505);
e=getEquals();
state._fsp--;
}
having=new Having("String_Node_Str",e.name,e.value);
}
break;
case 3:
{
{
n=(Token)match(input,NOT,FOLLOW_NOT_in_simpleHaving1516);
match(input,WS,FOLLOW_WS_in_simpleHaving1518);
a=(Token)match(input,ID,FOLLOW_ID_in_simpleHaving1522);
int alt93=2;
int LA93_0=input.LA(1);
if ((LA93_0 == WS)) {
alt93=1;
}
switch (alt93) {
case 1:
{
match(input,WS,FOLLOW_WS_in_simpleHaving1524);
}
break;
}
t=(Token)match(input,COMPARE_OPER,FOLLOW_COMPARE_OPER_in_simpleHaving1529);
int alt94=2;
int LA94_0=input.LA(1);
if ((LA94_0 == WS)) {
alt94=1;
}
switch (alt94) {
case 1:
{
match(input,WS,FOLLOW_WS_in_simpleHaving1531);
}
break;
}
v=input.LT(1);
if (input.LA(1) == FLOAT || input.LA(1) == LONG) {
input.consume();
state.errorRecovery=false;
}
 else {
MismatchedSetException mse=new MismatchedSetException(null,input);
throw mse;
}
}
having=new Having((n != null ? n.getText() : null).toLowerCase());
having.havingSpecs=Arrays.asList(new Having((t != null ? t.getText() : null),(a != null ? a.getText() : null),(v != null ? v.getText() : null)));
}
break;
}
}
 catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
 finally {
}
return having;
}