Program: 176860
Project: 176860
Buggy source:
/** 
 * Inits the filter.
 */
private void initFilter(){
  EntityMetadata metadata=KunderaMetadataManager.getEntityMetadata(entityClass);
  String indexName=metadata.getIndexName();
  if (null == filter) {
    return;
  }
  List<String> clauses=tokenize(filter,INTER_CLAUSE_PATTERN);
  clauses=parseFilterForBetweenClause(clauses,indexName);
  boolean newClause=true;
  for (  String clause : clauses) {
    if (newClause) {
      List<String> tokens=tokenize(clause,INTRA_CLAUSE_PATTERN);
      if (tokens.size() != 3) {
        throw new PersistenceException("String_Node_Str" + clause);
      }
      String property=tokens.get(0);
      property=property.substring((entityAlias + "String_Node_Str").length());
      String columnName=null;
      try {
        Metamodel metaModel=KunderaMetadata.INSTANCE.getApplicationMetadata().getMetamodel(getPersistenceUnit());
        columnName=((AbstractAttribute)metaModel.entity(entityClass).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);
        if (enclosingEmbeddedField != null) {
          columnName=property;
        }
      }
      String condition=tokens.get(1);
      if (!Arrays.asList(INTRA_CLAUSE_OPERATORS).contains(condition.toUpperCase())) {
        throw new JPQLParseException("String_Node_Str" + clause);
      }
      FilterClause filterClause=new FilterClause(MetadataUtils.useSecondryIndex(persistenceUnit) ? columnName : indexName + "String_Node_Str" + columnName,condition,tokens.get(2));
      filtersQueue.add(filterClause);
      onTypedParameter(tokens,filterClause,property);
      newClause=false;
    }
 else {
      if (Arrays.asList(INTER_CLAUSE_OPERATORS).contains(clause.toUpperCase())) {
        filtersQueue.add(clause.toUpperCase());
        newClause=true;
      }
 else {
        throw new JPQLParseException("String_Node_Str" + clause);
      }
    }
  }
}

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