Program: 51106
Project: 51106
Buggy source:
public double evaluateDouble(Evaluator evaluator){
  Aggregator aggregator=(Aggregator)evaluator.getProperty(Property.AGGREGATION_TYPE.name,null);
  if (aggregator == null) {
    throw newEvalException(null,"String_Node_Str");
  }
  Aggregator rollup=aggregator.getRollup();
  if (rollup == null) {
    throw newEvalException(null,"String_Node_Str" + aggregator + "String_Node_Str");
  }
  List list=evaluateCurrentList(listCalc,evaluator);
  if (aggregator == RolapAggregator.DistinctCount) {
    if (list.size() == 0) {
      return DoubleNull;
    }
    List<Member[]> tupleList;
    if (list.get(0) instanceof Member) {
      tupleList=makeTupleList((List<Member>)list);
    }
 else {
      tupleList=(List<Member[]>)list;
    }
    RolapEvaluator rolapEvaluator=null;
    if (evaluator instanceof RolapEvaluator) {
      rolapEvaluator=(RolapEvaluator)evaluator;
    }
    if ((rolapEvaluator != null) && rolapEvaluator.getDialect().supportsUnlimitedValueList()) {
    }
 else {
      if ((rolapEvaluator != null) && rolapEvaluator.getDialect().getDatabaseProduct() == Dialect.DatabaseProduct.ACCESS && false) {
        tupleList=removeOverlappingTupleEntries(tupleList);
      }
      if (true) {
        tupleList=optimizeChildren(tupleList,evaluator.getSchemaReader(),evaluator.getMeasureCube());
      }
      checkIfAggregationSizeIsTooLarge(tupleList);
    }
    Evaluator evaluator2=evaluator.pushAggregation(tupleList);
    final Object o=evaluator2.evaluateCurrent();
    final Number number=(Number)o;
    return GenericCalc.numberToDouble(number);
  }
  return (Double)rollup.aggregate(evaluator.push(),list,calc);
}

Fixed version (ground truth):
public double evaluateDouble(Evaluator evaluator){
  Aggregator aggregator=(Aggregator)evaluator.getProperty(Property.AGGREGATION_TYPE.name,null);
  if (aggregator == null) {
    throw newEvalException(null,"String_Node_Str");
  }
  Aggregator rollup=aggregator.getRollup();
  if (rollup == null) {
    throw newEvalException(null,"String_Node_Str" + aggregator + "String_Node_Str");
  }
  List list=evaluateCurrentList(listCalc,evaluator);
  if (aggregator == RolapAggregator.DistinctCount) {
    if (list.size() == 0) {
      return DoubleNull;
    }
    List<Member[]> tupleList;
    if (list.get(0) instanceof Member) {
      tupleList=makeTupleList((List<Member>)list);
    }
 else {
      tupleList=(List<Member[]>)list;
    }
    RolapEvaluator rolapEvaluator=null;
    if (evaluator instanceof RolapEvaluator) {
      rolapEvaluator=(RolapEvaluator)evaluator;
    }
    if ((rolapEvaluator != null) && rolapEvaluator.getDialect().supportsUnlimitedValueList()) {
    }
 else {
      if ((rolapEvaluator != null) && rolapEvaluator.getDialect().getDatabaseProduct() == Dialect.DatabaseProduct.ACCESS && false) {
        tupleList=removeOverlappingTupleEntries(tupleList);
      }
      if (true) {
        tupleList=optimizeChildren(tupleList,evaluator.getSchemaReader(),evaluator.getMeasureCube());
      }
      checkIfAggregationSizeIsTooLarge(tupleList);
    }
    Evaluator evaluator2=evaluator.pushAggregation(tupleList);
    evaluator2.setNonEmpty(false);
    final Object o=evaluator2.evaluateCurrent();
    final Number number=(Number)o;
    return GenericCalc.numberToDouble(number);
  }
  return (Double)rollup.aggregate(evaluator.push(false),list,calc);
}