Program: 176005
Project: 176005
Buggy source:
/** 
 * Inits the filter.
 */
private void initFilter(){
  EntityMetadata metadata=KunderaMetadataManager.getEntityMetadata(kunderaMetadata,entityClass);
  Metamodel metaModel=kunderaMetadata.getApplicationMetadata().getMetamodel(getPersistenceUnit());
  EntityType entityType=metaModel.entity(entityClass);
  if (null == filter) {
    List<String> clauses=new ArrayList<String>();
    addDiscriminatorClause(clauses,entityType);
    return;
  }
  List<String> clauses=tokenize(filter,INTER_CLAUSE_PATTERN,true);
  clauses=parseFilterForBetweenClause(clauses);
  boolean newClause=true;
  for (  String clause : clauses) {
    if (Arrays.asList(INTER_CLAUSE_OPERATORS).contains(clause.toUpperCase().trim())) {
      filtersQueue.add(clause.toUpperCase().trim());
      newClause=true;
    }
 else     if (newClause) {
      List<String> tokens=tokenize(clause,INTRA_CLAUSE_PATTERN,false);
      if (tokens.size() != 3) {
        throw new PersistenceException("String_Node_Str" + clause);
      }
      String property=tokens.get(0);
      if (property.indexOf("String_Node_Str") > 0) {
        property=property.substring((entityAlias + "String_Node_Str").length());
      }
      String columnName=null;
      try {
        columnName=((AbstractAttribute)entityType.getAttribute(property)).getJPAColumnName();
      }
 catch (      IllegalArgumentException iaex) {
        logger.warn("String_Node_Str" + property + "String_Node_Str");
      }
      if (columnName == null && property.indexOf("String_Node_Str") > 0) {
        String enclosingEmbeddedField=MetadataUtils.getEnclosingEmbeddedFieldName(metadata,property,true,kunderaMetadata);
        if (enclosingEmbeddedField != null) {
          columnName=property;
        }
      }
      if (columnName == null) {
        logger.error("String_Node_Str" + property);
        throw new JPQLParseException("String_Node_Str" + property + "String_Node_Str");
      }
      String condition=tokens.get(1);
      if (!Arrays.asList(INTRA_CLAUSE_OPERATORS).contains(condition.toUpperCase().trim())) {
        throw new JPQLParseException("String_Node_Str" + clause);
      }
      FilterClause filterClause=new FilterClause(columnName,condition,tokens.get(2));
      filtersQueue.add(filterClause);
      onTypedParameter(tokens,filterClause,property);
      newClause=false;
    }
 else {
      throw new JPQLParseException("String_Node_Str" + clause);
    }
  }
  addDiscriminatorClause(clauses,entityType);
}

Fixed version (ground truth):
/** 
 * Inits the filter.
 */
private void initFilter(){
  EntityMetadata metadata=KunderaMetadataManager.getEntityMetadata(kunderaMetadata,entityClass);
  Metamodel metaModel=kunderaMetadata.getApplicationMetadata().getMetamodel(getPersistenceUnit());
  EntityType entityType=metaModel.entity(entityClass);
  if (null == filter) {
    List<String> clauses=new ArrayList<String>();
    addDiscriminatorClause(clauses,entityType);
    return;
  }
  List<String> clauses=tokenize(filter,INTER_CLAUSE_PATTERN,true);
  clauses=parseFilterForBetweenClause(clauses);
  boolean newClause=true;
  for (  String clause : clauses) {
    if (Arrays.asList(INTER_CLAUSE_OPERATORS).contains(clause.toUpperCase().trim()) || (clause.startsWith("String_Node_Str") && clause.endsWith("String_Node_Str"))) {
      filtersQueue.add(clause.toUpperCase().trim());
      newClause=true;
    }
 else     if (newClause) {
      List<String> tokens=tokenize(clause,INTRA_CLAUSE_PATTERN,false);
      if (tokens.size() != 3) {
        throw new PersistenceException("String_Node_Str" + clause);
      }
      String property=tokens.get(0);
      if (property.indexOf("String_Node_Str") > 0) {
        property=property.substring((entityAlias + "String_Node_Str").length());
      }
      String columnName=null;
      try {
        columnName=((AbstractAttribute)entityType.getAttribute(property)).getJPAColumnName();
      }
 catch (      IllegalArgumentException iaex) {
        logger.warn("String_Node_Str" + property + "String_Node_Str");
      }
      if (columnName == null && property.indexOf("String_Node_Str") > 0) {
        String enclosingEmbeddedField=MetadataUtils.getEnclosingEmbeddedFieldName(metadata,property,true,kunderaMetadata);
        if (enclosingEmbeddedField != null) {
          columnName=property;
        }
      }
      if (columnName == null) {
        logger.error("String_Node_Str" + property);
        throw new JPQLParseException("String_Node_Str" + property + "String_Node_Str");
      }
      String condition=tokens.get(1);
      if (!Arrays.asList(INTRA_CLAUSE_OPERATORS).contains(condition.toUpperCase().trim())) {
        throw new JPQLParseException("String_Node_Str" + clause);
      }
      FilterClause filterClause=new FilterClause(columnName,condition,tokens.get(2));
      filtersQueue.add(filterClause);
      onTypedParameter(tokens,filterClause,property);
      newClause=false;
    }
 else {
      throw new JPQLParseException("String_Node_Str" + clause);
    }
  }
  addDiscriminatorClause(clauses,entityType);
}