Program: 109003
Project: 109003
Buggy source:
private void parse(){
  final String query=text.getText();
  final DataSelector selector=DataSelector.create(data);
  QueryTokenizer parser=new QueryTokenizer(new QueryTokenizerListener(){
    private Operator current=null;
    private DataType<?> type=null;
    private void setCurrent(    Operator operator){
      if (current != null) {
        throw new RuntimeException("String_Node_Str" + operator);
      }
 else {
        current=operator;
      }
    }
    @Override public void geq(    int start,    int length){
      setCurrent(Operator.GEQ);
    }
    @Override public void value(    int start,    int length){
      if (current == null) {
        throw new RuntimeException("String_Node_Str" + query.substring(start + 1,start + length - 1));
      }
      if (type == null) {
        throw new RuntimeException("String_Node_Str" + query.substring(start + 1,start + length - 1));
      }
      Object value=type.fromString(query.substring(start + 1,start + length - 1));
switch (current) {
case EQUALS:
        if (value instanceof Date) {
          selector.equals((Date)value);
        }
 else         if (value instanceof String) {
          selector.equals((String)value);
        }
 else         if (value instanceof Double) {
          selector.equals((Double)value);
        }
      break;
case GEQ:
    if (value instanceof Date) {
      selector.geq((Date)value);
    }
 else     if (value instanceof String) {
      selector.geq((String)value);
    }
 else     if (value instanceof Double) {
      selector.geq((Double)value);
    }
  break;
case GREATER:
if (value instanceof Date) {
  selector.greater((Date)value);
}
 else if (value instanceof String) {
  selector.greater((String)value);
}
 else if (value instanceof Double) {
  selector.greater((Double)value);
}
break;
case LEQ:
if (value instanceof Date) {
selector.leq((Date)value);
}
 else if (value instanceof String) {
selector.leq((String)value);
}
 else if (value instanceof Double) {
selector.leq((Double)value);
}
break;
case LESS:
if (value instanceof Date) {
selector.less((Date)value);
}
 else if (value instanceof String) {
selector.less((String)value);
}
 else if (value instanceof Double) {
selector.less((Double)value);
}
break;
}
current=null;
type=null;
}
@Override public void field(int start,int length){
String field=query.substring(start + 1,start + length - 1);
int index=data.getHandle().getColumnIndexOf(field);
if (index == -1) {
throw new RuntimeException("String_Node_Str" + field);
}
 else {
type=data.getHandle().getDataType(field);
selector.field(field);
}
}
@Override public void begin(int start){
selector.begin();
}
@Override public void end(int start){
selector.end();
}
@Override public void and(int start,int length){
selector.and();
}
@Override public void or(int start,int length){
selector.or();
}
@Override public void less(int start){
setCurrent(Operator.LESS);
}
@Override public void greater(int start){
setCurrent(Operator.GREATER);
}
@Override public void leq(int start,int length){
setCurrent(Operator.LEQ);
}
@Override public void equals(int start){
setCurrent(Operator.EQUALS);
}
}
);
try {
parser.tokenize(query);
selector.compile();
}
 catch (Exception e) {
error.setText(e.getMessage());
e.printStackTrace();
return;
}
error.setText("String_Node_Str");
}

Fixed version (ground truth):
private void parse(){
  final String query=text.getText();
  final DataSelector selector=DataSelector.create(data);
  QueryTokenizer parser=new QueryTokenizer(new QueryTokenizerListener(){
    private Operator current=null;
    private DataType<?> type=null;
    private void setCurrent(    Operator operator){
      if (current != null) {
        throw new RuntimeException("String_Node_Str" + operator);
      }
 else {
        current=operator;
      }
    }
    @Override public void geq(    int start,    int length){
      setCurrent(Operator.GEQ);
    }
    @Override public void value(    int start,    int length){
      if (current == null) {
        throw new RuntimeException("String_Node_Str" + query.substring(start + 1,start + length - 1));
      }
      if (type == null) {
        throw new RuntimeException("String_Node_Str" + query.substring(start + 1,start + length - 1));
      }
      Object value=type.fromString(query.substring(start + 1,start + length - 1));
switch (current) {
case EQUALS:
        if (value instanceof Date) {
          selector.equals((Date)value);
        }
 else         if (value instanceof String) {
          selector.equals((String)value);
        }
 else         if (value instanceof Double) {
          selector.equals((Double)value);
        }
      break;
case GEQ:
    if (value instanceof Date) {
      selector.geq((Date)value);
    }
 else     if (value instanceof String) {
      selector.geq((String)value);
    }
 else     if (value instanceof Double) {
      selector.geq((Double)value);
    }
  break;
case GREATER:
if (value instanceof Date) {
  selector.greater((Date)value);
}
 else if (value instanceof String) {
  selector.greater((String)value);
}
 else if (value instanceof Double) {
  selector.greater((Double)value);
}
break;
case LEQ:
if (value instanceof Date) {
selector.leq((Date)value);
}
 else if (value instanceof String) {
selector.leq((String)value);
}
 else if (value instanceof Double) {
selector.leq((Double)value);
}
break;
case LESS:
if (value instanceof Date) {
selector.less((Date)value);
}
 else if (value instanceof String) {
selector.less((String)value);
}
 else if (value instanceof Double) {
selector.less((Double)value);
}
break;
}
current=null;
type=null;
}
@Override public void field(int start,int length){
String field=query.substring(start + 1,start + length - 1);
int index=data.getHandle().getColumnIndexOf(field);
if (index == -1) {
throw new RuntimeException("String_Node_Str" + field);
}
 else {
type=data.getHandle().getDataType(field);
selector.field(field);
}
}
@Override public void begin(int start){
selector.begin();
}
@Override public void end(int start){
selector.end();
}
@Override public void and(int start,int length){
selector.and();
}
@Override public void or(int start,int length){
selector.or();
}
@Override public void less(int start){
setCurrent(Operator.LESS);
}
@Override public void greater(int start){
setCurrent(Operator.GREATER);
}
@Override public void leq(int start,int length){
setCurrent(Operator.LEQ);
}
@Override public void equals(int start){
setCurrent(Operator.EQUALS);
}
@Override public void invalid(int start){
throw new RuntimeException("String_Node_Str" + start);
}
}
);
try {
parser.tokenize(query);
selector.compile();
}
 catch (Exception e) {
error.setText(e.getMessage());
ok.setEnabled(false);
return;
}
error.setText("String_Node_Str");
queryString=text.getText();
ok.setEnabled(true);
}