Program: 59379
Project: 59379
Buggy source:
/** 
 * Prepare search part for a query of findByCriteria
 * @param entity
 * @param filterByAssociations
 * @param datatablesCriterias
 * @param findInAllColumns
 * @param associationMap
 * @param filtersByTablePredicate
 * @return
 */
private static <T>BooleanBuilder prepareQuerySearchPart(PathBuilder<T> entity,Map<String,List<String>> filterByAssociations,DatatablesCriterias datatablesCriterias,boolean findInAllColumns,Map<String,PathBuilder<?>> associationMap,BooleanBuilder filtersByTablePredicate,ConversionService conversionService){
  String searchStr=datatablesCriterias.getSearch();
  if (findInAllColumns) {
    boolean expressionExists=false;
    for (    ColumnDef column : datatablesCriterias.getColumnDefs()) {
      if (column.isFilterable()) {
        String fieldName=unescapeDot(column.getName());
        Class<?> fieldType=QuerydslUtils.getFieldType(fieldName,entity);
        TypeDescriptor descriptor=QuerydslUtils.getTypeDescriptor(fieldName,entity);
        Predicate expression=QuerydslUtils.createExpression(entity,fieldName,descriptor,searchStr,conversionService);
        if (expression != null) {
          filtersByTablePredicate=filtersByTablePredicate.or(expression);
          expressionExists=true;
        }
        List<String> attributes=filterByAssociations.get(fieldName);
        if (attributes != null && attributes.size() > 0) {
          PathBuilder<?> associationPath=associationMap.get(fieldName);
          List<String> associationFields=filterByAssociations.get(fieldName);
          for (          String associationFieldName : associationFields) {
            Class<?> associationFieldType=BeanUtils.findPropertyType(associationFieldName,ArrayUtils.<Class<?>>toArray(fieldType));
            filtersByTablePredicate=filtersByTablePredicate.or(QuerydslUtils.createExpression(associationPath,associationFieldName,associationFieldType,searchStr));
          }
        }
      }
    }
    if (!expressionExists) {
      throw new RuntimeException("String_Node_Str");
    }
  }
  return filtersByTablePredicate;
}

Fixed version (ground truth):
/** 
 * Prepare search part for a query of findByCriteria
 * @param entity
 * @param filterByAssociations
 * @param datatablesCriterias
 * @param findInAllColumns
 * @param associationMap
 * @param filtersByTablePredicate
 * @return
 */
private static <T>BooleanBuilder prepareQuerySearchPart(PathBuilder<T> entity,Map<String,List<String>> filterByAssociations,DatatablesCriterias datatablesCriterias,boolean findInAllColumns,Map<String,PathBuilder<?>> associationMap,BooleanBuilder filtersByTablePredicate,ConversionService conversionService){
  String searchStr=datatablesCriterias.getSearch();
  if (findInAllColumns) {
    boolean expressionExists=false;
    for (    ColumnDef column : datatablesCriterias.getColumnDefs()) {
      if (column.isFilterable()) {
        String fieldName=unescapeDot(column.getName());
        Class<?> fieldType=QuerydslUtils.getFieldType(fieldName,entity);
        Predicate expression=QuerydslUtils.createExpression(entity,fieldName,searchStr,conversionService);
        if (expression != null) {
          filtersByTablePredicate=filtersByTablePredicate.or(expression);
          expressionExists=true;
        }
        List<String> attributes=filterByAssociations.get(fieldName);
        if (attributes != null && attributes.size() > 0) {
          PathBuilder<?> associationPath=associationMap.get(fieldName);
          List<String> associationFields=filterByAssociations.get(fieldName);
          for (          String associationFieldName : associationFields) {
            Class<?> associationFieldType=BeanUtils.findPropertyType(associationFieldName,ArrayUtils.<Class<?>>toArray(fieldType));
            filtersByTablePredicate=filtersByTablePredicate.or(QuerydslUtils.createExpression(associationPath,associationFieldName,associationFieldType,searchStr));
          }
        }
      }
    }
    if (!expressionExists) {
      throw new RuntimeException("String_Node_Str");
    }
  }
  return filtersByTablePredicate;
}