Program: 169140
Project: 169140
Buggy source:
public final Filter simpleLogicalFilter() throws RecognitionException {
  Filter filter=null;
  Token o=null;
  Filter a=null;
  Filter b=null;
  Filter s=null;
  try {
    int alt104=2;
    int LA104_0=input.LA(1);
    if ((LA104_0 == ID || LA104_0 == NOT)) {
      alt104=1;
    }
 else     if ((LA104_0 == LPARAN)) {
switch (input.LA(2)) {
case WS:
{
          int LA104_4=input.LA(3);
          if ((LA104_4 == ID)) {
            int LA104_8=input.LA(4);
            if ((LA104_8 == WS)) {
              int LA104_13=input.LA(5);
              if ((LA104_13 == LIKE)) {
                int LA104_19=input.LA(6);
                if ((LA104_19 == WS)) {
                  alt104=1;
                }
 else {
                  int nvaeMark=input.mark();
                  try {
                    for (int nvaeConsume=0; nvaeConsume < 6 - 1; nvaeConsume++) {
                      input.consume();
                    }
                    NoViableAltException nvae=new NoViableAltException("String_Node_Str",104,19,input);
                    throw nvae;
                  }
  finally {
                    input.rewind(nvaeMark);
                  }
                }
              }
 else               if ((LA104_13 == EQUALS)) {
                int LA104_20=input.LA(6);
                if ((LA104_20 == WS)) {
                  alt104=1;
                }
 else                 if ((LA104_20 == FLOAT || LA104_20 == LONG || LA104_20 == SINGLE_QUOTE_STRING)) {
                  alt104=1;
                }
 else {
                  int nvaeMark=input.mark();
                  try {
                    for (int nvaeConsume=0; nvaeConsume < 6 - 1; nvaeConsume++) {
                      input.consume();
                    }
                    NoViableAltException nvae=new NoViableAltException("String_Node_Str",104,20,input);
                    throw nvae;
                  }
  finally {
                    input.rewind(nvaeMark);
                  }
                }
              }
 else {
                int nvaeMark=input.mark();
                try {
                  for (int nvaeConsume=0; nvaeConsume < 5 - 1; nvaeConsume++) {
                    input.consume();
                  }
                  NoViableAltException nvae=new NoViableAltException("String_Node_Str",104,13,input);
                  throw nvae;
                }
  finally {
                  input.rewind(nvaeMark);
                }
              }
            }
 else             if ((LA104_8 == EQUALS)) {
              int LA104_14=input.LA(5);
              if ((LA104_14 == WS)) {
                int LA104_21=input.LA(6);
                if ((LA104_21 == FLOAT || LA104_21 == LONG || LA104_21 == SINGLE_QUOTE_STRING)) {
                  alt104=1;
                }
 else {
                  int nvaeMark=input.mark();
                  try {
                    for (int nvaeConsume=0; nvaeConsume < 6 - 1; nvaeConsume++) {
                      input.consume();
                    }
                    NoViableAltException nvae=new NoViableAltException("String_Node_Str",104,21,input);
                    throw nvae;
                  }
  finally {
                    input.rewind(nvaeMark);
                  }
                }
              }
 else               if ((LA104_14 == FLOAT || LA104_14 == LONG || LA104_14 == SINGLE_QUOTE_STRING)) {
                int LA104_22=input.LA(6);
                if ((LA104_22 == WS)) {
                  alt104=1;
                }
 else                 if ((LA104_22 == RPARAN)) {
                  alt104=1;
                }
 else {
                  int nvaeMark=input.mark();
                  try {
                    for (int nvaeConsume=0; nvaeConsume < 6 - 1; nvaeConsume++) {
                      input.consume();
                    }
                    NoViableAltException nvae=new NoViableAltException("String_Node_Str",104,22,input);
                    throw nvae;
                  }
  finally {
                    input.rewind(nvaeMark);
                  }
                }
              }
 else {
                int nvaeMark=input.mark();
                try {
                  for (int nvaeConsume=0; nvaeConsume < 5 - 1; nvaeConsume++) {
                    input.consume();
                  }
                  NoViableAltException nvae=new NoViableAltException("String_Node_Str",104,14,input);
                  throw nvae;
                }
  finally {
                  input.rewind(nvaeMark);
                }
              }
            }
 else {
              int nvaeMark=input.mark();
              try {
                for (int nvaeConsume=0; nvaeConsume < 4 - 1; nvaeConsume++) {
                  input.consume();
                }
                NoViableAltException nvae=new NoViableAltException("String_Node_Str",104,8,input);
                throw nvae;
              }
  finally {
                input.rewind(nvaeMark);
              }
            }
          }
 else           if ((LA104_4 == LPARAN || LA104_4 == NOT)) {
            alt104=2;
          }
 else {
            int nvaeMark=input.mark();
            try {
              for (int nvaeConsume=0; nvaeConsume < 3 - 1; nvaeConsume++) {
                input.consume();
              }
              NoViableAltException nvae=new NoViableAltException("String_Node_Str",104,4,input);
              throw nvae;
            }
  finally {
              input.rewind(nvaeMark);
            }
          }
        }
      break;
case ID:
{
      int LA104_5=input.LA(3);
      if ((LA104_5 == WS)) {
        int LA104_11=input.LA(4);
        if ((LA104_11 == LIKE)) {
          int LA104_15=input.LA(5);
          if ((LA104_15 == WS)) {
            int LA104_23=input.LA(6);
            if ((LA104_23 == SINGLE_QUOTE_STRING)) {
              alt104=1;
            }
 else {
              int nvaeMark=input.mark();
              try {
                for (int nvaeConsume=0; nvaeConsume < 6 - 1; nvaeConsume++) {
                  input.consume();
                }
                NoViableAltException nvae=new NoViableAltException("String_Node_Str",104,23,input);
                throw nvae;
              }
  finally {
                input.rewind(nvaeMark);
              }
            }
          }
 else {
            int nvaeMark=input.mark();
            try {
              for (int nvaeConsume=0; nvaeConsume < 5 - 1; nvaeConsume++) {
                input.consume();
              }
              NoViableAltException nvae=new NoViableAltException("String_Node_Str",104,15,input);
              throw nvae;
            }
  finally {
              input.rewind(nvaeMark);
            }
          }
        }
 else         if ((LA104_11 == EQUALS)) {
          int LA104_16=input.LA(5);
          if ((LA104_16 == WS)) {
            int LA104_24=input.LA(6);
            if ((LA104_24 == FLOAT || LA104_24 == LONG || LA104_24 == SINGLE_QUOTE_STRING)) {
              alt104=1;
            }
 else {
              int nvaeMark=input.mark();
              try {
                for (int nvaeConsume=0; nvaeConsume < 6 - 1; nvaeConsume++) {
                  input.consume();
                }
                NoViableAltException nvae=new NoViableAltException("String_Node_Str",104,24,input);
                throw nvae;
              }
  finally {
                input.rewind(nvaeMark);
              }
            }
          }
 else           if ((LA104_16 == FLOAT || LA104_16 == LONG || LA104_16 == SINGLE_QUOTE_STRING)) {
            int LA104_25=input.LA(6);
            if ((LA104_25 == WS)) {
              alt104=1;
            }
 else             if ((LA104_25 == RPARAN)) {
              alt104=1;
            }
 else {
              int nvaeMark=input.mark();
              try {
                for (int nvaeConsume=0; nvaeConsume < 6 - 1; nvaeConsume++) {
                  input.consume();
                }
                NoViableAltException nvae=new NoViableAltException("String_Node_Str",104,25,input);
                throw nvae;
              }
  finally {
                input.rewind(nvaeMark);
              }
            }
          }
 else {
            int nvaeMark=input.mark();
            try {
              for (int nvaeConsume=0; nvaeConsume < 5 - 1; nvaeConsume++) {
                input.consume();
              }
              NoViableAltException nvae=new NoViableAltException("String_Node_Str",104,16,input);
              throw nvae;
            }
  finally {
              input.rewind(nvaeMark);
            }
          }
        }
 else {
          int nvaeMark=input.mark();
          try {
            for (int nvaeConsume=0; nvaeConsume < 4 - 1; nvaeConsume++) {
              input.consume();
            }
            NoViableAltException nvae=new NoViableAltException("String_Node_Str",104,11,input);
            throw nvae;
          }
  finally {
            input.rewind(nvaeMark);
          }
        }
      }
 else       if ((LA104_5 == EQUALS)) {
        int LA104_12=input.LA(4);
        if ((LA104_12 == WS)) {
          int LA104_17=input.LA(5);
          if ((LA104_17 == FLOAT || LA104_17 == LONG || LA104_17 == SINGLE_QUOTE_STRING)) {
            int LA104_26=input.LA(6);
            if ((LA104_26 == WS)) {
              alt104=1;
            }
 else             if ((LA104_26 == RPARAN)) {
              alt104=1;
            }
 else {
              int nvaeMark=input.mark();
              try {
                for (int nvaeConsume=0; nvaeConsume < 6 - 1; nvaeConsume++) {
                  input.consume();
                }
                NoViableAltException nvae=new NoViableAltException("String_Node_Str",104,26,input);
                throw nvae;
              }
  finally {
                input.rewind(nvaeMark);
              }
            }
          }
 else {
            int nvaeMark=input.mark();
            try {
              for (int nvaeConsume=0; nvaeConsume < 5 - 1; nvaeConsume++) {
                input.consume();
              }
              NoViableAltException nvae=new NoViableAltException("String_Node_Str",104,17,input);
              throw nvae;
            }
  finally {
              input.rewind(nvaeMark);
            }
          }
        }
 else         if ((LA104_12 == FLOAT || LA104_12 == LONG || LA104_12 == SINGLE_QUOTE_STRING)) {
          int LA104_18=input.LA(5);
          if ((LA104_18 == WS)) {
            int LA104_27=input.LA(6);
            if ((LA104_27 == AND || LA104_27 == OR)) {
              alt104=2;
            }
 else             if ((LA104_27 == RPARAN)) {
              alt104=1;
            }
 else {
              int nvaeMark=input.mark();
              try {
                for (int nvaeConsume=0; nvaeConsume < 6 - 1; nvaeConsume++) {
                  input.consume();
                }
                NoViableAltException nvae=new NoViableAltException("String_Node_Str",104,27,input);
                throw nvae;
              }
  finally {
                input.rewind(nvaeMark);
              }
            }
          }
 else           if ((LA104_18 == RPARAN)) {
            alt104=1;
          }
 else {
            int nvaeMark=input.mark();
            try {
              for (int nvaeConsume=0; nvaeConsume < 5 - 1; nvaeConsume++) {
                input.consume();
              }
              NoViableAltException nvae=new NoViableAltException("String_Node_Str",104,18,input);
              throw nvae;
            }
  finally {
              input.rewind(nvaeMark);
            }
          }
        }
 else {
          int nvaeMark=input.mark();
          try {
            for (int nvaeConsume=0; nvaeConsume < 4 - 1; nvaeConsume++) {
              input.consume();
            }
            NoViableAltException nvae=new NoViableAltException("String_Node_Str",104,12,input);
            throw nvae;
          }
  finally {
            input.rewind(nvaeMark);
          }
        }
      }
 else {
        int nvaeMark=input.mark();
        try {
          for (int nvaeConsume=0; nvaeConsume < 3 - 1; nvaeConsume++) {
            input.consume();
          }
          NoViableAltException nvae=new NoViableAltException("String_Node_Str",104,5,input);
          throw nvae;
        }
  finally {
          input.rewind(nvaeMark);
        }
      }
    }
  break;
case LPARAN:
case NOT:
{
  alt104=2;
}
break;
default :
int nvaeMark=input.mark();
try {
input.consume();
NoViableAltException nvae=new NoViableAltException("String_Node_Str",104,2,input);
throw nvae;
}
  finally {
input.rewind(nvaeMark);
}
}
}
 else {
NoViableAltException nvae=new NoViableAltException("String_Node_Str",104,0,input);
throw nvae;
}
switch (alt104) {
case 1:
{
int alt101=2;
int LA101_0=input.LA(1);
if ((LA101_0 == ID || LA101_0 == LPARAN)) {
alt101=1;
}
 else if ((LA101_0 == NOT)) {
alt101=2;
}
 else {
NoViableAltException nvae=new NoViableAltException("String_Node_Str",101,0,input);
throw nvae;
}
switch (alt101) {
case 1:
{
{
pushFollow(FOLLOW_simpleFilter_in_simpleLogicalFilter1720);
a=simpleFilter();
state._fsp--;
match(input,WS,FOLLOW_WS_in_simpleLogicalFilter1722);
o=input.LT(1);
if (input.LA(1) == AND || input.LA(1) == OR) {
input.consume();
state.errorRecovery=false;
}
 else {
MismatchedSetException mse=new MismatchedSetException(null,input);
throw mse;
}
match(input,WS,FOLLOW_WS_in_simpleLogicalFilter1732);
pushFollow(FOLLOW_simpleFilter_in_simpleLogicalFilter1736);
b=simpleFilter();
state._fsp--;
}
}
break;
case 2:
{
{
o=(Token)match(input,NOT,FOLLOW_NOT_in_simpleLogicalFilter1744);
match(input,WS,FOLLOW_WS_in_simpleLogicalFilter1746);
pushFollow(FOLLOW_simpleFilter_in_simpleLogicalFilter1750);
b=simpleFilter();
state._fsp--;
}
}
break;
}
filter=new Filter((o != null ? o.getText() : null).toLowerCase());
filter.fields=new ArrayList<>();
if (a != null) {
filter.fields.add(a);
}
filter.fields.add(b);
}
break;
case 2:
{
{
match(input,LPARAN,FOLLOW_LPARAN_in_simpleLogicalFilter1763);
int alt102=2;
int LA102_0=input.LA(1);
if ((LA102_0 == WS)) {
alt102=1;
}
switch (alt102) {
case 1:
{
match(input,WS,FOLLOW_WS_in_simpleLogicalFilter1765);
}
break;
}
pushFollow(FOLLOW_simpleLogicalFilter_in_simpleLogicalFilter1770);
s=simpleLogicalFilter();
state._fsp--;
int alt103=2;
int LA103_0=input.LA(1);
if ((LA103_0 == WS)) {
alt103=1;
}
switch (alt103) {
case 1:
{
match(input,WS,FOLLOW_WS_in_simpleLogicalFilter1772);
}
break;
}
match(input,RPARAN,FOLLOW_RPARAN_in_simpleLogicalFilter1775);
}
filter=s;
}
break;
}
}
 catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
 finally {
}
return filter;
}

Fixed version (ground truth):
public final Filter simpleLogicalFilter() throws RecognitionException {
  Filter filter=null;
  Token o=null;
  Filter a=null;
  Filter b=null;
  Filter s=null;
  try {
    int alt105=2;
    int LA105_0=input.LA(1);
    if ((LA105_0 == ID || LA105_0 == NOT)) {
      alt105=1;
    }
 else     if ((LA105_0 == LPARAN)) {
switch (input.LA(2)) {
case WS:
{
          int LA105_4=input.LA(3);
          if ((LA105_4 == ID)) {
            int LA105_8=input.LA(4);
            if ((LA105_8 == WS)) {
              int LA105_13=input.LA(5);
              if ((LA105_13 == LIKE)) {
                int LA105_19=input.LA(6);
                if ((LA105_19 == WS)) {
                  alt105=1;
                }
 else {
                  int nvaeMark=input.mark();
                  try {
                    for (int nvaeConsume=0; nvaeConsume < 6 - 1; nvaeConsume++) {
                      input.consume();
                    }
                    NoViableAltException nvae=new NoViableAltException("String_Node_Str",105,19,input);
                    throw nvae;
                  }
  finally {
                    input.rewind(nvaeMark);
                  }
                }
              }
 else               if ((LA105_13 == EQUALS)) {
                int LA105_20=input.LA(6);
                if ((LA105_20 == WS)) {
                  alt105=1;
                }
 else                 if ((LA105_20 == FLOAT || LA105_20 == LONG || LA105_20 == SINGLE_QUOTE_STRING)) {
                  alt105=1;
                }
 else {
                  int nvaeMark=input.mark();
                  try {
                    for (int nvaeConsume=0; nvaeConsume < 6 - 1; nvaeConsume++) {
                      input.consume();
                    }
                    NoViableAltException nvae=new NoViableAltException("String_Node_Str",105,20,input);
                    throw nvae;
                  }
  finally {
                    input.rewind(nvaeMark);
                  }
                }
              }
 else {
                int nvaeMark=input.mark();
                try {
                  for (int nvaeConsume=0; nvaeConsume < 5 - 1; nvaeConsume++) {
                    input.consume();
                  }
                  NoViableAltException nvae=new NoViableAltException("String_Node_Str",105,13,input);
                  throw nvae;
                }
  finally {
                  input.rewind(nvaeMark);
                }
              }
            }
 else             if ((LA105_8 == EQUALS)) {
              int LA105_14=input.LA(5);
              if ((LA105_14 == WS)) {
                int LA105_21=input.LA(6);
                if ((LA105_21 == FLOAT || LA105_21 == LONG || LA105_21 == SINGLE_QUOTE_STRING)) {
                  alt105=1;
                }
 else {
                  int nvaeMark=input.mark();
                  try {
                    for (int nvaeConsume=0; nvaeConsume < 6 - 1; nvaeConsume++) {
                      input.consume();
                    }
                    NoViableAltException nvae=new NoViableAltException("String_Node_Str",105,21,input);
                    throw nvae;
                  }
  finally {
                    input.rewind(nvaeMark);
                  }
                }
              }
 else               if ((LA105_14 == FLOAT || LA105_14 == LONG || LA105_14 == SINGLE_QUOTE_STRING)) {
                int LA105_22=input.LA(6);
                if ((LA105_22 == WS)) {
                  alt105=1;
                }
 else                 if ((LA105_22 == RPARAN)) {
                  alt105=1;
                }
 else {
                  int nvaeMark=input.mark();
                  try {
                    for (int nvaeConsume=0; nvaeConsume < 6 - 1; nvaeConsume++) {
                      input.consume();
                    }
                    NoViableAltException nvae=new NoViableAltException("String_Node_Str",105,22,input);
                    throw nvae;
                  }
  finally {
                    input.rewind(nvaeMark);
                  }
                }
              }
 else {
                int nvaeMark=input.mark();
                try {
                  for (int nvaeConsume=0; nvaeConsume < 5 - 1; nvaeConsume++) {
                    input.consume();
                  }
                  NoViableAltException nvae=new NoViableAltException("String_Node_Str",105,14,input);
                  throw nvae;
                }
  finally {
                  input.rewind(nvaeMark);
                }
              }
            }
 else {
              int nvaeMark=input.mark();
              try {
                for (int nvaeConsume=0; nvaeConsume < 4 - 1; nvaeConsume++) {
                  input.consume();
                }
                NoViableAltException nvae=new NoViableAltException("String_Node_Str",105,8,input);
                throw nvae;
              }
  finally {
                input.rewind(nvaeMark);
              }
            }
          }
 else           if ((LA105_4 == LPARAN || LA105_4 == NOT)) {
            alt105=2;
          }
 else {
            int nvaeMark=input.mark();
            try {
              for (int nvaeConsume=0; nvaeConsume < 3 - 1; nvaeConsume++) {
                input.consume();
              }
              NoViableAltException nvae=new NoViableAltException("String_Node_Str",105,4,input);
              throw nvae;
            }
  finally {
              input.rewind(nvaeMark);
            }
          }
        }
      break;
case ID:
{
      int LA105_5=input.LA(3);
      if ((LA105_5 == WS)) {
        int LA105_11=input.LA(4);
        if ((LA105_11 == LIKE)) {
          int LA105_15=input.LA(5);
          if ((LA105_15 == WS)) {
            int LA105_23=input.LA(6);
            if ((LA105_23 == SINGLE_QUOTE_STRING)) {
              alt105=1;
            }
 else {
              int nvaeMark=input.mark();
              try {
                for (int nvaeConsume=0; nvaeConsume < 6 - 1; nvaeConsume++) {
                  input.consume();
                }
                NoViableAltException nvae=new NoViableAltException("String_Node_Str",105,23,input);
                throw nvae;
              }
  finally {
                input.rewind(nvaeMark);
              }
            }
          }
 else {
            int nvaeMark=input.mark();
            try {
              for (int nvaeConsume=0; nvaeConsume < 5 - 1; nvaeConsume++) {
                input.consume();
              }
              NoViableAltException nvae=new NoViableAltException("String_Node_Str",105,15,input);
              throw nvae;
            }
  finally {
              input.rewind(nvaeMark);
            }
          }
        }
 else         if ((LA105_11 == EQUALS)) {
          int LA105_16=input.LA(5);
          if ((LA105_16 == WS)) {
            int LA105_24=input.LA(6);
            if ((LA105_24 == FLOAT || LA105_24 == LONG || LA105_24 == SINGLE_QUOTE_STRING)) {
              alt105=1;
            }
 else {
              int nvaeMark=input.mark();
              try {
                for (int nvaeConsume=0; nvaeConsume < 6 - 1; nvaeConsume++) {
                  input.consume();
                }
                NoViableAltException nvae=new NoViableAltException("String_Node_Str",105,24,input);
                throw nvae;
              }
  finally {
                input.rewind(nvaeMark);
              }
            }
          }
 else           if ((LA105_16 == FLOAT || LA105_16 == LONG || LA105_16 == SINGLE_QUOTE_STRING)) {
            int LA105_25=input.LA(6);
            if ((LA105_25 == WS)) {
              alt105=1;
            }
 else             if ((LA105_25 == RPARAN)) {
              alt105=1;
            }
 else {
              int nvaeMark=input.mark();
              try {
                for (int nvaeConsume=0; nvaeConsume < 6 - 1; nvaeConsume++) {
                  input.consume();
                }
                NoViableAltException nvae=new NoViableAltException("String_Node_Str",105,25,input);
                throw nvae;
              }
  finally {
                input.rewind(nvaeMark);
              }
            }
          }
 else {
            int nvaeMark=input.mark();
            try {
              for (int nvaeConsume=0; nvaeConsume < 5 - 1; nvaeConsume++) {
                input.consume();
              }
              NoViableAltException nvae=new NoViableAltException("String_Node_Str",105,16,input);
              throw nvae;
            }
  finally {
              input.rewind(nvaeMark);
            }
          }
        }
 else {
          int nvaeMark=input.mark();
          try {
            for (int nvaeConsume=0; nvaeConsume < 4 - 1; nvaeConsume++) {
              input.consume();
            }
            NoViableAltException nvae=new NoViableAltException("String_Node_Str",105,11,input);
            throw nvae;
          }
  finally {
            input.rewind(nvaeMark);
          }
        }
      }
 else       if ((LA105_5 == EQUALS)) {
        int LA105_12=input.LA(4);
        if ((LA105_12 == WS)) {
          int LA105_17=input.LA(5);
          if ((LA105_17 == FLOAT || LA105_17 == LONG || LA105_17 == SINGLE_QUOTE_STRING)) {
            int LA105_26=input.LA(6);
            if ((LA105_26 == WS)) {
              alt105=1;
            }
 else             if ((LA105_26 == RPARAN)) {
              alt105=1;
            }
 else {
              int nvaeMark=input.mark();
              try {
                for (int nvaeConsume=0; nvaeConsume < 6 - 1; nvaeConsume++) {
                  input.consume();
                }
                NoViableAltException nvae=new NoViableAltException("String_Node_Str",105,26,input);
                throw nvae;
              }
  finally {
                input.rewind(nvaeMark);
              }
            }
          }
 else {
            int nvaeMark=input.mark();
            try {
              for (int nvaeConsume=0; nvaeConsume < 5 - 1; nvaeConsume++) {
                input.consume();
              }
              NoViableAltException nvae=new NoViableAltException("String_Node_Str",105,17,input);
              throw nvae;
            }
  finally {
              input.rewind(nvaeMark);
            }
          }
        }
 else         if ((LA105_12 == FLOAT || LA105_12 == LONG || LA105_12 == SINGLE_QUOTE_STRING)) {
          int LA105_18=input.LA(5);
          if ((LA105_18 == WS)) {
            int LA105_27=input.LA(6);
            if ((LA105_27 == AND || LA105_27 == OR)) {
              alt105=2;
            }
 else             if ((LA105_27 == RPARAN)) {
              alt105=1;
            }
 else {
              int nvaeMark=input.mark();
              try {
                for (int nvaeConsume=0; nvaeConsume < 6 - 1; nvaeConsume++) {
                  input.consume();
                }
                NoViableAltException nvae=new NoViableAltException("String_Node_Str",105,27,input);
                throw nvae;
              }
  finally {
                input.rewind(nvaeMark);
              }
            }
          }
 else           if ((LA105_18 == RPARAN)) {
            alt105=1;
          }
 else {
            int nvaeMark=input.mark();
            try {
              for (int nvaeConsume=0; nvaeConsume < 5 - 1; nvaeConsume++) {
                input.consume();
              }
              NoViableAltException nvae=new NoViableAltException("String_Node_Str",105,18,input);
              throw nvae;
            }
  finally {
              input.rewind(nvaeMark);
            }
          }
        }
 else {
          int nvaeMark=input.mark();
          try {
            for (int nvaeConsume=0; nvaeConsume < 4 - 1; nvaeConsume++) {
              input.consume();
            }
            NoViableAltException nvae=new NoViableAltException("String_Node_Str",105,12,input);
            throw nvae;
          }
  finally {
            input.rewind(nvaeMark);
          }
        }
      }
 else {
        int nvaeMark=input.mark();
        try {
          for (int nvaeConsume=0; nvaeConsume < 3 - 1; nvaeConsume++) {
            input.consume();
          }
          NoViableAltException nvae=new NoViableAltException("String_Node_Str",105,5,input);
          throw nvae;
        }
  finally {
          input.rewind(nvaeMark);
        }
      }
    }
  break;
case LPARAN:
case NOT:
{
  alt105=2;
}
break;
default :
int nvaeMark=input.mark();
try {
input.consume();
NoViableAltException nvae=new NoViableAltException("String_Node_Str",105,2,input);
throw nvae;
}
  finally {
input.rewind(nvaeMark);
}
}
}
 else {
NoViableAltException nvae=new NoViableAltException("String_Node_Str",105,0,input);
throw nvae;
}
switch (alt105) {
case 1:
{
int alt102=2;
int LA102_0=input.LA(1);
if ((LA102_0 == ID || LA102_0 == LPARAN)) {
alt102=1;
}
 else if ((LA102_0 == NOT)) {
alt102=2;
}
 else {
NoViableAltException nvae=new NoViableAltException("String_Node_Str",102,0,input);
throw nvae;
}
switch (alt102) {
case 1:
{
{
pushFollow(FOLLOW_simpleFilter_in_simpleLogicalFilter1751);
a=simpleFilter();
state._fsp--;
match(input,WS,FOLLOW_WS_in_simpleLogicalFilter1753);
o=input.LT(1);
if (input.LA(1) == AND || input.LA(1) == OR) {
input.consume();
state.errorRecovery=false;
}
 else {
MismatchedSetException mse=new MismatchedSetException(null,input);
throw mse;
}
match(input,WS,FOLLOW_WS_in_simpleLogicalFilter1763);
pushFollow(FOLLOW_simpleFilter_in_simpleLogicalFilter1767);
b=simpleFilter();
state._fsp--;
}
}
break;
case 2:
{
{
o=(Token)match(input,NOT,FOLLOW_NOT_in_simpleLogicalFilter1775);
match(input,WS,FOLLOW_WS_in_simpleLogicalFilter1777);
pushFollow(FOLLOW_simpleFilter_in_simpleLogicalFilter1781);
b=simpleFilter();
state._fsp--;
}
}
break;
}
filter=new Filter((o != null ? o.getText() : null).toLowerCase());
filter.fields=new ArrayList<>();
if (a != null) {
filter.fields.add(a);
}
filter.fields.add(b);
}
break;
case 2:
{
{
match(input,LPARAN,FOLLOW_LPARAN_in_simpleLogicalFilter1794);
int alt103=2;
int LA103_0=input.LA(1);
if ((LA103_0 == WS)) {
alt103=1;
}
switch (alt103) {
case 1:
{
match(input,WS,FOLLOW_WS_in_simpleLogicalFilter1796);
}
break;
}
pushFollow(FOLLOW_simpleLogicalFilter_in_simpleLogicalFilter1801);
s=simpleLogicalFilter();
state._fsp--;
int alt104=2;
int LA104_0=input.LA(1);
if ((LA104_0 == WS)) {
alt104=1;
}
switch (alt104) {
case 1:
{
match(input,WS,FOLLOW_WS_in_simpleLogicalFilter1803);
}
break;
}
match(input,RPARAN,FOLLOW_RPARAN_in_simpleLogicalFilter1806);
}
filter=s;
}
break;
}
}
 catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
 finally {
}
return filter;
}