Program: 59383
Project: 59383
Buggy source:
/** 
 * Return equal expression for   {@code entityPath.fieldName}. <p/> Expr:   {@code entityPath.fieldName eq searchObj}
 * @param entityPath Full path to entity and associations. For example:{@code Pet} , {@code Pet.owner}
 * @param fieldName Property name in the given entity path. For example:{@code name} in {@code Pet} entity, {@code firstName} in{@code Pet.owner} entity.
 * @param searchObj the value to find, may be null
 * @return BooleanExpression
 */
public static <T>BooleanExpression createObjectExpression(PathBuilder<T> entityPath,String fieldName,Object searchObj){
  return createExpression(entityPath,fieldName,searchObj,null);
}

Fixed version (ground truth):
/** 
 * Return an expression for   {@code entityPath.fieldName} with the{@code operator} or "equal" by default.<p/> Expr:  {@code entityPath.fieldName eq searchObj}
 * @param entityPath Full path to entity and associations. For example:{@code Pet} , {@code Pet.owner}
 * @param fieldName Property name in the given entity path. For example:{@code name} in {@code Pet} entity, {@code firstName} in{@code Pet.owner} entity.
 * @param searchObj the value to find, may be null
 * @param operator the operator to use into the expression. Supportedoperators: <ul> <li>For all types:  {@code eq},   {@code in},   {@code ne},  {@code notIn},   {@code isNull} and {@code isNotNull}.</li> <li> For strings and numbers:   {@code goe},   {@code gt},   {@code loe},  {@code lt} and {@code like}.</li> <li> For booleans:   {@code goe},  {@code gt},   {@code loe} and {@code lt}.</li> <li> For dates:  {@code goe},   {@code gt},   {@code before},   {@code loe},   {@code lt}and   {@code after}. </li> </ul>
 * @return BooleanExpression
 */
@SuppressWarnings({"String_Node_Str","String_Node_Str"}) public static <T>BooleanExpression createObjectExpression(PathBuilder<T> entityPath,String fieldName,Object searchObj,String operator,ConversionService conversionService){
  if (searchObj == null) {
    return null;
  }
  TypeDescriptor typeDescriptor=getTypeDescriptor(fieldName,entityPath);
  if (typeDescriptor == null) {
    throw new IllegalArgumentException(String.format("String_Node_Str",fieldName,entityPath.getType()));
  }
  if (StringUtils.isBlank(operator) || StringUtils.equalsIgnoreCase(operator,"String_Node_Str")) {
    return entityPath.get(fieldName).eq(searchObj);
  }
 else   if (StringUtils.equalsIgnoreCase(operator,"String_Node_Str")) {
    return entityPath.get(fieldName).in(searchObj);
  }
 else   if (StringUtils.equalsIgnoreCase(operator,"String_Node_Str")) {
    return entityPath.get(fieldName).ne(searchObj);
  }
 else   if (StringUtils.equalsIgnoreCase(operator,"String_Node_Str")) {
    return entityPath.get(fieldName).notIn(searchObj);
  }
 else   if (StringUtils.equalsIgnoreCase(operator,"String_Node_Str")) {
    return entityPath.get(fieldName).isNull();
  }
 else   if (StringUtils.equalsIgnoreCase(operator,"String_Node_Str")) {
    return entityPath.get(fieldName).isNotNull();
  }
  Class<?> fieldType=getFieldType(fieldName,entityPath);
  if (String.class == fieldType && String.class == searchObj.getClass()) {
    return createStringExpression(entityPath,fieldName,searchObj,operator);
  }
 else   if ((Boolean.class == fieldType || boolean.class == fieldType) && String.class == searchObj.getClass()) {
    return createBooleanExpression(entityPath,fieldName,searchObj,operator);
  }
 else   if ((Number.class.isAssignableFrom(fieldType) || NUMBER_PRIMITIVES.contains(fieldType)) && String.class == searchObj.getClass() && isValidValueFor((String)searchObj,typeDescriptor,conversionService)) {
    return createNumericExpression(entityPath,fieldName,searchObj,operator,fieldType);
  }
 else   if ((Date.class.isAssignableFrom(fieldType) || Calendar.class.isAssignableFrom(fieldType)) && String.class == searchObj.getClass()) {
    return createDateExpression(entityPath,fieldName,searchObj,operator,fieldType);
  }
 else   if (fieldType.isEnum() && String.class == searchObj.getClass()) {
    return createEnumExpression(entityPath,fieldName,(String)searchObj,(Class<? extends Enum>)fieldType);
  }
  return entityPath.get(fieldName).eq(searchObj);
}