Program: 49448
Project: 49448
Buggy source:
/** 
 * List entitlement pools. Pools will be refreshed from the underlying subscription service.
 * @param c Consumer being entitled.
 * @param o Owner whose subscriptions should be inspected.
 * @param productId only entitlements which provide this product are included.
 * @param activeOn Indicates to return only pools valid on this date.Set to null for no date filtering.
 * @param activeOnly if true, only active entitlements are included.
 * @param filters filter builder with set filters to apply to the criteria.
 * @param pageRequest used to specify paging criteria.
 * @param postFilter if you plan on filtering the list in java
 * @return List of entitlement pools.
 */
@SuppressWarnings("String_Node_Str") @Transactional public Page<List<Pool>> listAvailableEntitlementPools(Consumer c,Owner o,String productId,Date activeOn,boolean activeOnly,PoolFilterBuilder filters,PageRequest pageRequest,boolean postFilter){
  if (o == null && c != null) {
    o=c.getOwner();
  }
  if (log.isDebugEnabled()) {
    log.debug("String_Node_Str");
    log.debug("String_Node_Str" + c);
    log.debug("String_Node_Str" + o);
    log.debug("String_Node_Str" + productId);
  }
  Criteria crit=createSecureCriteria();
  crit.createAlias("String_Node_Str","String_Node_Str");
  crit.createAlias("String_Node_Str","String_Node_Str");
  crit.createAlias("String_Node_Str","String_Node_Str");
  if (activeOnly) {
    crit.add(Restrictions.eq("String_Node_Str",Boolean.TRUE));
  }
  if (c != null) {
    crit.add(Restrictions.eq("String_Node_Str",c.getOwner()));
    List<Criterion> filterCriteria=poolCriteria.availableEntitlementCriteria(c);
    if (log.isDebugEnabled()) {
      log.debug("String_Node_Str" + filterCriteria.size() + "String_Node_Str");
    }
    for (    Criterion rulesCriteria : filterCriteria) {
      crit.add(rulesCriteria);
    }
  }
  if (o != null) {
    crit.add(Restrictions.eq("String_Node_Str",o));
    crit.add(Restrictions.ne("String_Node_Str",Product.ueberProductNameForOwner(o)));
  }
  if (activeOn != null) {
    crit.add(Restrictions.le("String_Node_Str",activeOn));
    crit.add(Restrictions.ge("String_Node_Str",activeOn));
  }
  if (productId != null) {
    crit.add(Restrictions.or(Restrictions.eq("String_Node_Str",productId),Restrictions.eq("String_Node_Str",productId)));
  }
  if (filters != null) {
    filters.applyTo(crit);
  }
  return listByCriteria(crit,pageRequest,postFilter);
}

Fixed version (ground truth):
/** 
 * List entitlement pools. Pools will be refreshed from the underlying subscription service.
 * @param c Consumer being entitled.
 * @param o Owner whose subscriptions should be inspected.
 * @param productId only entitlements which provide this product are included.
 * @param activeOn Indicates to return only pools valid on this date.Set to null for no date filtering.
 * @param activeOnly if true, only active entitlements are included.
 * @param filters filter builder with set filters to apply to the criteria.
 * @param pageRequest used to specify paging criteria.
 * @param postFilter if you plan on filtering the list in java
 * @return List of entitlement pools.
 */
@SuppressWarnings("String_Node_Str") @Transactional public Page<List<Pool>> listAvailableEntitlementPools(Consumer c,Owner o,String productId,Date activeOn,boolean activeOnly,PoolFilterBuilder filters,PageRequest pageRequest,boolean postFilter){
  if (o == null && c != null) {
    o=c.getOwner();
  }
  if (log.isDebugEnabled()) {
    log.debug("String_Node_Str");
    log.debug("String_Node_Str" + c);
    log.debug("String_Node_Str" + o);
    log.debug("String_Node_Str" + productId);
  }
  Criteria crit=createSecureCriteria();
  crit.createAlias("String_Node_Str","String_Node_Str");
  crit.createAlias("String_Node_Str","String_Node_Str");
  if (activeOnly) {
    crit.add(Restrictions.eq("String_Node_Str",Boolean.TRUE));
  }
  if (c != null) {
    crit.add(Restrictions.eq("String_Node_Str",c.getOwner()));
    List<Criterion> filterCriteria=poolCriteria.availableEntitlementCriteria(c);
    if (log.isDebugEnabled()) {
      log.debug("String_Node_Str" + filterCriteria.size() + "String_Node_Str");
    }
    for (    Criterion rulesCriteria : filterCriteria) {
      crit.add(rulesCriteria);
    }
  }
  if (o != null) {
    crit.add(Restrictions.eq("String_Node_Str",o));
    crit.add(Restrictions.ne("String_Node_Str",Product.ueberProductNameForOwner(o)));
  }
  if (activeOn != null) {
    crit.add(Restrictions.le("String_Node_Str",activeOn));
    crit.add(Restrictions.ge("String_Node_Str",activeOn));
  }
  if (productId != null) {
    crit.add(Restrictions.or(Restrictions.eq("String_Node_Str",productId),Restrictions.eq("String_Node_Str",productId)));
  }
  if (filters != null) {
    filters.applyTo(crit);
  }
  return listByCriteria(crit,pageRequest,postFilter);
}