Program: 169139
Project: 169139
Buggy source:
public final void intervalClause(QueryMeta qMeta) throws RecognitionException {
  Token st2=null;
  Token et2=null;
  ParserRuleReturnScope st=null;
  ParserRuleReturnScope et=null;
  Pair<String> p1=null;
  Pair<String> p2=null;
  try {
{
      match(input,73,FOLLOW_73_in_intervalClause898);
      match(input,WS,FOLLOW_WS_in_intervalClause900);
      match(input,BETWEEN,FOLLOW_BETWEEN_in_intervalClause902);
      match(input,WS,FOLLOW_WS_in_intervalClause904);
      int alt52=2;
      int LA52_0=input.LA(1);
      if (((LA52_0 >= DATE && LA52_0 <= DATE_HOUR_MIN_SEC_SUB_UTC_TZ) || LA52_0 == SINGLE_QUOTE_STRING)) {
        alt52=1;
      }
 else       if ((LA52_0 == LPARAN)) {
        alt52=2;
      }
 else {
        NoViableAltException nvae=new NoViableAltException("String_Node_Str",52,0,input);
        throw nvae;
      }
switch (alt52) {
case 1:
{
{
{
              int alt45=2;
              int LA45_0=input.LA(1);
              if (((LA45_0 >= DATE && LA45_0 <= DATE_HOUR_MIN_SEC_SUB_UTC_TZ))) {
                alt45=1;
              }
 else               if ((LA45_0 == SINGLE_QUOTE_STRING)) {
                alt45=2;
              }
 else {
                NoViableAltException nvae=new NoViableAltException("String_Node_Str",45,0,input);
                throw nvae;
              }
switch (alt45) {
case 1:
{
                  pushFollow(FOLLOW_isoTime_in_intervalClause924);
                  st=isoTime();
                  state._fsp--;
                }
              break;
case 2:
{
              st2=(Token)match(input,SINGLE_QUOTE_STRING,FOLLOW_SINGLE_QUOTE_STRING_in_intervalClause931);
            }
          break;
      }
      match(input,WS,FOLLOW_WS_in_intervalClause935);
      match(input,AND,FOLLOW_AND_in_intervalClause937);
      match(input,WS,FOLLOW_WS_in_intervalClause939);
      int alt46=2;
      int LA46_0=input.LA(1);
      if (((LA46_0 >= DATE && LA46_0 <= DATE_HOUR_MIN_SEC_SUB_UTC_TZ))) {
        alt46=1;
      }
 else       if ((LA46_0 == SINGLE_QUOTE_STRING)) {
        alt46=2;
      }
 else {
        NoViableAltException nvae=new NoViableAltException("String_Node_Str",46,0,input);
        throw nvae;
      }
switch (alt46) {
case 1:
{
          pushFollow(FOLLOW_isoTime_in_intervalClause944);
          et=isoTime();
          state._fsp--;
        }
      break;
case 2:
{
      et2=(Token)match(input,SINGLE_QUOTE_STRING,FOLLOW_SINGLE_QUOTE_STRING_in_intervalClause951);
    }
  break;
}
}
if (st2 != null) {
if (et2 != null) {
qMeta.intervals.add(new Interval((st2 != null ? st2.getText() : null),(et2 != null ? et2.getText() : null)));
}
 else {
qMeta.intervals.add(new Interval((st2 != null ? st2.getText() : null),(et != null ? input.toString(et.start,et.stop) : null)));
}
}
 else {
if (et2 != null) {
qMeta.intervals.add(new Interval((st != null ? input.toString(st.start,st.stop) : null),(et2 != null ? et2.getText() : null)));
}
 else {
qMeta.intervals.add(new Interval((st != null ? input.toString(st.start,st.stop) : null),(et != null ? input.toString(et.start,et.stop) : null)));
}
}
}
}
break;
case 2:
{
{
match(input,LPARAN,FOLLOW_LPARAN_in_intervalClause976);
int alt47=2;
int LA47_0=input.LA(1);
if ((LA47_0 == WS)) {
alt47=1;
}
switch (alt47) {
case 1:
{
match(input,WS,FOLLOW_WS_in_intervalClause978);
}
break;
}
pushFollow(FOLLOW_pairString_in_intervalClause983);
p1=pairString();
state._fsp--;
qMeta.intervals.add(new Interval(p1.a,p1.b));
loop50: while (true) {
int alt50=2;
int LA50_0=input.LA(1);
if ((LA50_0 == WS)) {
int LA50_1=input.LA(2);
if ((LA50_1 == 72)) {
alt50=1;
}
}
 else if ((LA50_0 == 72)) {
alt50=1;
}
switch (alt50) {
case 1:
{
int alt48=2;
int LA48_0=input.LA(1);
if ((LA48_0 == WS)) {
alt48=1;
}
switch (alt48) {
case 1:
{
match(input,WS,FOLLOW_WS_in_intervalClause995);
}
break;
}
match(input,72,FOLLOW_72_in_intervalClause998);
int alt49=2;
int LA49_0=input.LA(1);
if ((LA49_0 == WS)) {
alt49=1;
}
switch (alt49) {
case 1:
{
match(input,WS,FOLLOW_WS_in_intervalClause1000);
}
break;
}
pushFollow(FOLLOW_pairString_in_intervalClause1005);
p2=pairString();
state._fsp--;
qMeta.intervals.add(new Interval(p2.a,p2.b));
}
break;
default :
break loop50;
}
}
int alt51=2;
int LA51_0=input.LA(1);
if ((LA51_0 == WS)) {
alt51=1;
}
switch (alt51) {
case 1:
{
match(input,WS,FOLLOW_WS_in_intervalClause1011);
}
break;
}
match(input,RPARAN,FOLLOW_RPARAN_in_intervalClause1014);
}
}
break;
}
}
}
 catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
 finally {
}
}

Fixed version (ground truth):
public final void intervalClause(QueryMeta qMeta) throws RecognitionException {
  Token st2=null;
  Token et2=null;
  ParserRuleReturnScope st=null;
  ParserRuleReturnScope et=null;
  Pair<String> p1=null;
  Pair<String> p2=null;
  try {
{
      match(input,73,FOLLOW_73_in_intervalClause929);
      match(input,WS,FOLLOW_WS_in_intervalClause931);
      match(input,BETWEEN,FOLLOW_BETWEEN_in_intervalClause933);
      match(input,WS,FOLLOW_WS_in_intervalClause935);
      int alt53=2;
      int LA53_0=input.LA(1);
      if (((LA53_0 >= DATE && LA53_0 <= DATE_HOUR_MIN_SEC_SUB_UTC_TZ) || LA53_0 == SINGLE_QUOTE_STRING)) {
        alt53=1;
      }
 else       if ((LA53_0 == LPARAN)) {
        alt53=2;
      }
 else {
        NoViableAltException nvae=new NoViableAltException("String_Node_Str",53,0,input);
        throw nvae;
      }
switch (alt53) {
case 1:
{
{
{
              int alt46=2;
              int LA46_0=input.LA(1);
              if (((LA46_0 >= DATE && LA46_0 <= DATE_HOUR_MIN_SEC_SUB_UTC_TZ))) {
                alt46=1;
              }
 else               if ((LA46_0 == SINGLE_QUOTE_STRING)) {
                alt46=2;
              }
 else {
                NoViableAltException nvae=new NoViableAltException("String_Node_Str",46,0,input);
                throw nvae;
              }
switch (alt46) {
case 1:
{
                  pushFollow(FOLLOW_isoTime_in_intervalClause955);
                  st=isoTime();
                  state._fsp--;
                }
              break;
case 2:
{
              st2=(Token)match(input,SINGLE_QUOTE_STRING,FOLLOW_SINGLE_QUOTE_STRING_in_intervalClause962);
            }
          break;
      }
      match(input,WS,FOLLOW_WS_in_intervalClause966);
      match(input,AND,FOLLOW_AND_in_intervalClause968);
      match(input,WS,FOLLOW_WS_in_intervalClause970);
      int alt47=2;
      int LA47_0=input.LA(1);
      if (((LA47_0 >= DATE && LA47_0 <= DATE_HOUR_MIN_SEC_SUB_UTC_TZ))) {
        alt47=1;
      }
 else       if ((LA47_0 == SINGLE_QUOTE_STRING)) {
        alt47=2;
      }
 else {
        NoViableAltException nvae=new NoViableAltException("String_Node_Str",47,0,input);
        throw nvae;
      }
switch (alt47) {
case 1:
{
          pushFollow(FOLLOW_isoTime_in_intervalClause975);
          et=isoTime();
          state._fsp--;
        }
      break;
case 2:
{
      et2=(Token)match(input,SINGLE_QUOTE_STRING,FOLLOW_SINGLE_QUOTE_STRING_in_intervalClause982);
    }
  break;
}
}
if (st2 != null) {
if (et2 != null) {
qMeta.intervals.add(new Interval((st2 != null ? st2.getText() : null),(et2 != null ? et2.getText() : null)));
}
 else {
qMeta.intervals.add(new Interval((st2 != null ? st2.getText() : null),(et != null ? input.toString(et.start,et.stop) : null)));
}
}
 else {
if (et2 != null) {
qMeta.intervals.add(new Interval((st != null ? input.toString(st.start,st.stop) : null),(et2 != null ? et2.getText() : null)));
}
 else {
qMeta.intervals.add(new Interval((st != null ? input.toString(st.start,st.stop) : null),(et != null ? input.toString(et.start,et.stop) : null)));
}
}
}
}
break;
case 2:
{
{
match(input,LPARAN,FOLLOW_LPARAN_in_intervalClause1007);
int alt48=2;
int LA48_0=input.LA(1);
if ((LA48_0 == WS)) {
alt48=1;
}
switch (alt48) {
case 1:
{
match(input,WS,FOLLOW_WS_in_intervalClause1009);
}
break;
}
pushFollow(FOLLOW_pairString_in_intervalClause1014);
p1=pairString();
state._fsp--;
qMeta.intervals.add(new Interval(p1.a,p1.b));
loop51: while (true) {
int alt51=2;
int LA51_0=input.LA(1);
if ((LA51_0 == WS)) {
int LA51_1=input.LA(2);
if ((LA51_1 == 72)) {
alt51=1;
}
}
 else if ((LA51_0 == 72)) {
alt51=1;
}
switch (alt51) {
case 1:
{
int alt49=2;
int LA49_0=input.LA(1);
if ((LA49_0 == WS)) {
alt49=1;
}
switch (alt49) {
case 1:
{
match(input,WS,FOLLOW_WS_in_intervalClause1026);
}
break;
}
match(input,72,FOLLOW_72_in_intervalClause1029);
int alt50=2;
int LA50_0=input.LA(1);
if ((LA50_0 == WS)) {
alt50=1;
}
switch (alt50) {
case 1:
{
match(input,WS,FOLLOW_WS_in_intervalClause1031);
}
break;
}
pushFollow(FOLLOW_pairString_in_intervalClause1036);
p2=pairString();
state._fsp--;
qMeta.intervals.add(new Interval(p2.a,p2.b));
}
break;
default :
break loop51;
}
}
int alt52=2;
int LA52_0=input.LA(1);
if ((LA52_0 == WS)) {
alt52=1;
}
switch (alt52) {
case 1:
{
match(input,WS,FOLLOW_WS_in_intervalClause1042);
}
break;
}
match(input,RPARAN,FOLLOW_RPARAN_in_intervalClause1045);
}
}
break;
}
}
}
 catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
 finally {
}
}