Program: 49300
Project: 49300
Buggy source:
/** 
 * Update pool for master pool.
 * @param existingPools the existing pools
 * @param pool the master pool
 * @param originalQuantity the pool's original quantity before multiplier was applied
 * @param updateStackDerived whether or not to attempt to update stackderived pools
 */
Set<String> updatePoolsForMasterPool(List<Pool> existingPools,Pool pool,Long originalQuantity,boolean updateStackDerived,Set<Product> changedProducts){
  if (existingPools == null || existingPools.isEmpty()) {
    return new HashSet<String>(0);
  }
  log.debug("String_Node_Str",existingPools.size(),pool);
  Map<String,EventBuilder> poolEvents=new HashMap<String,EventBuilder>();
  for (  Pool existing : existingPools) {
    EventBuilder eventBuilder=eventFactory.getEventBuilder(Target.POOL,Type.MODIFIED).setOldEntity(existing);
    poolEvents.put(existing.getId(),eventBuilder);
  }
  List<PoolUpdate> updatedPools=poolRules.updatePools(pool,existingPools,originalQuantity,changedProducts);
  String virtLimit=pool.getProduct().getAttributeValue("String_Node_Str");
  boolean createsSubPools=!StringUtils.isBlank(virtLimit) && !"String_Node_Str".equals(virtLimit);
  if (updateStackDerived && !updatedPools.isEmpty() && createsSubPools&& pool.isStacked()) {
    List<Pool> subPools=getOwnerSubPoolsForStackId(pool.getOwner(),pool.getStackId());
    for (    Pool subPool : subPools) {
      PoolUpdate update=updatePoolFromStack(subPool,changedProducts);
      if (update.changed()) {
        updatedPools.add(update);
      }
    }
  }
  Set<String> entsToRegen=processPoolUpdates(poolEvents,updatedPools);
  return entsToRegen;
}

Fixed version (ground truth):
/** 
 * Update pool for master pool.
 * @param existingPools the existing pools
 * @param pool the master pool
 * @param originalQuantity the pool's original quantity before multiplier was applied
 * @param updateStackDerived whether or not to attempt to update stackderived pools
 */
Set<String> updatePoolsForMasterPool(List<Pool> existingPools,Pool pool,Long originalQuantity,boolean updateStackDerived,Set<Product> changedProducts){
  if (existingPools == null || existingPools.isEmpty()) {
    return new HashSet<String>(0);
  }
  log.debug("String_Node_Str",existingPools.size(),pool);
  Map<String,EventBuilder> poolEvents=new HashMap<String,EventBuilder>();
  for (  Pool existing : existingPools) {
    EventBuilder eventBuilder=eventFactory.getEventBuilder(Target.POOL,Type.MODIFIED).setOldEntity(existing);
    poolEvents.put(existing.getId(),eventBuilder);
  }
  List<PoolUpdate> updatedPools=poolRules.updatePools(pool,existingPools,originalQuantity,changedProducts);
  String virtLimit=pool.getProduct().getAttributeValue("String_Node_Str");
  boolean createsSubPools=!StringUtils.isBlank(virtLimit) && !"String_Node_Str".equals(virtLimit);
  if (updateStackDerived && !updatedPools.isEmpty() && createsSubPools&& pool.isStacked()) {
    List<Pool> subPools=getOwnerSubPoolsForStackId(pool.getOwner(),pool.getStackId());
    for (    Pool subPool : subPools) {
      PoolUpdate update=updatePoolFromStack(subPool,changedProducts);
      if (update.changed()) {
        updatedPools.add(update);
        EventBuilder eventBuilder=eventFactory.getEventBuilder(Target.POOL,Type.MODIFIED).setOldEntity(subPool);
        poolEvents.put(subPool.getId(),eventBuilder);
      }
    }
  }
  Set<String> entsToRegen=processPoolUpdates(poolEvents,updatedPools);
  return entsToRegen;
}