Program: 17987
Project: 17987
Buggy source:
@Override protected QueryNode postProcessNode(QueryNode node) throws QueryNodeException {
  if (node instanceof FieldQueryNode) {
    FieldQueryNode fieldNode=(FieldQueryNode)node;
    String field=((FieldQueryNode)node).getFieldAsString();
    if (field.equals("String_Node_Str") && !(node.getParent() instanceof TermRangeQueryNode)) {
      String value=fieldNode.getTextAsString();
      Analyzer analyzer=getQueryConfigHandler().get(ConfigurationKeys.ANALYZER);
      TokenStream source;
      try {
        source=analyzer.tokenStream(field,new StringReader(value));
        source.reset();
        source.incrementToken();
      }
 catch (      IOException e1) {
        throw new RuntimeException(e1);
      }
      Date date=null;
      String normalizedDate=null;
      try {
        normalizedDate=source.getAttribute(CharTermAttribute.class).toString();
        date=sdf.parse(normalizedDate);
        dmp.setNow(date);
        String[] parts=value.split("String_Node_Str");
        if (parts.length == 1) {
          date=dmp.parseMath("String_Node_Str");
          date=dmp.parseMath("String_Node_Str");
        }
 else         if (parts.length == 2) {
          date=dmp.parseMath("String_Node_Str");
          date=dmp.parseMath("String_Node_Str");
        }
 else {
          date=dmp.parseMath("String_Node_Str");
          date=dmp.parseMath("String_Node_Str");
        }
      }
 catch (      ParseException e) {
        throw new QueryNodeException(new MessageImpl(e.getMessage()));
      }
      FieldQueryNode upperBound;
      try {
        upperBound=fieldNode.cloneTree();
      }
 catch (      CloneNotSupportedException e) {
        throw new QueryNodeException(new MessageImpl(e.getMessage()));
      }
      upperBound.setField("String_Node_Str");
      upperBound.setValue(DateField.formatExternal(date));
      fieldNode.setField("String_Node_Str");
      fieldNode.setValue(normalizedDate);
      return new TermRangeQueryNode(new AqpNonAnalyzedQueryNode(fieldNode),new AqpNonAnalyzedQueryNode(upperBound),true,false);
    }
  }
  return node;
}

Fixed version (ground truth):
@Override protected QueryNode postProcessNode(QueryNode node) throws QueryNodeException {
  if (node instanceof FieldQueryNode) {
    FieldQueryNode fieldNode=(FieldQueryNode)node;
    String field=((FieldQueryNode)node).getFieldAsString();
    if (field.equals("String_Node_Str")) {
      String value=fieldNode.getTextAsString();
      Analyzer analyzer=getQueryConfigHandler().get(ConfigurationKeys.ANALYZER);
      TokenStream source;
      try {
        source=analyzer.tokenStream(field,new StringReader(value));
        source.reset();
        source.incrementToken();
      }
 catch (      IOException e1) {
        throw new RuntimeException(e1);
      }
      Date date=null;
      String normalizedDate=null;
      try {
        normalizedDate=source.getAttribute(CharTermAttribute.class).toString();
        date=sdf.parse(normalizedDate);
        dmp.setNow(date);
        String[] parts=value.split("String_Node_Str");
        if (parts.length == 1) {
          date=dmp.parseMath("String_Node_Str");
          date=dmp.parseMath("String_Node_Str");
        }
 else         if (parts.length == 2) {
          date=dmp.parseMath("String_Node_Str");
          date=dmp.parseMath("String_Node_Str");
        }
 else {
          date=dmp.parseMath("String_Node_Str");
          date=dmp.parseMath("String_Node_Str");
        }
      }
 catch (      ParseException e) {
        throw new QueryNodeException(new MessageImpl(e.getMessage()));
      }
      if (node.getParent() instanceof TermRangeQueryNode) {
        fieldNode.setField("String_Node_Str");
        fieldNode.setValue(normalizedDate);
        return new AqpNonAnalyzedQueryNode(fieldNode);
      }
      FieldQueryNode upperBound;
      try {
        upperBound=fieldNode.cloneTree();
      }
 catch (      CloneNotSupportedException e) {
        throw new QueryNodeException(new MessageImpl(e.getMessage()));
      }
      upperBound.setField("String_Node_Str");
      upperBound.setValue(DateField.formatExternal(date));
      fieldNode.setField("String_Node_Str");
      fieldNode.setValue(normalizedDate);
      return new TermRangeQueryNode(new AqpNonAnalyzedQueryNode(fieldNode),new AqpNonAnalyzedQueryNode(upperBound),true,false);
    }
  }
  return node;
}