Program: 112498
Project: 112498
Buggy source:
private static Pair<List<Trade>,Results> calculate(CalculationRunner runner){
  ReferenceData refData=ReferenceData.standard();
  ImmutableMap<QuoteId,Double> quotes=QuotesCsvLoader.load(VAL_DATE,QUOTES_RESOURCE);
  Map<ObservableId,LocalDateDoubleTimeSeries> FIXINGS_US_CPI_U=FixingSeriesCsvLoader.load(FIXING_RESOURCE);
  MarketData marketData=ImmutableMarketData.builder(VAL_DATE).addValueMap(quotes).addTimeSeriesMap(FIXINGS_US_CPI_U).build();
  Map<CurveGroupName,CurveGroupDefinition> defns=RatesCalibrationCsvLoader.load(GROUPS_RESOURCE,SETTINGS_RESOURCE,CALIBRATION_RESOURCE);
  CurveGroupDefinition curveGroupDefinition=defns.get(CURVE_GROUP_NAME).filtered(VAL_DATE,refData);
  List<Trade> trades=curveGroupDefinition.getCurveDefinitions().stream().flatMap(defn -> defn.getNodes().stream()).filter(node -> !(node instanceof IborFixingDepositCurveNode)).map(node -> node.trade(1d,marketData,refData)).collect(toImmutableList());
  List<Column> columns=ImmutableList.of(Column.of(Measures.PRESENT_VALUE));
  MarketDataConfig marketDataConfig=MarketDataConfig.builder().add(CURVE_GROUP_NAME,curveGroupDefinition).build();
  CalculationFunctions functions=StandardComponents.calculationFunctions();
  RatesMarketDataLookup ratesLookup=RatesMarketDataLookup.of(curveGroupDefinition);
  CalculationRules rules=CalculationRules.of(functions,ratesLookup);
  MarketDataRequirements reqs=MarketDataRequirements.of(rules,trades,columns,refData);
  MarketData calibratedMarketData=marketDataFactory().create(reqs,marketDataConfig,marketData,refData);
  Results results=runner.calculate(rules,trades,columns,calibratedMarketData,refData);
  return Pair.of(trades,results);
}

Fixed version (ground truth):
private static Pair<List<Trade>,Results> calculate(CalculationRunner runner){
  ReferenceData refData=ReferenceData.standard();
  ImmutableMap<QuoteId,Double> quotes=QuotesCsvLoader.load(VAL_DATE,QUOTES_RESOURCE);
  Map<ObservableId,LocalDateDoubleTimeSeries> fixings=FixingSeriesCsvLoader.load(FIXING_RESOURCE);
  MarketData marketData=ImmutableMarketData.builder(VAL_DATE).addValueMap(quotes).addTimeSeriesMap(fixings).build();
  Map<CurveGroupName,CurveGroupDefinition> defns=RatesCalibrationCsvLoader.load(GROUPS_RESOURCE,SETTINGS_RESOURCE,CALIBRATION_RESOURCE);
  CurveGroupDefinition curveGroupDefinition=defns.get(CURVE_GROUP_NAME).filtered(VAL_DATE,refData);
  List<Trade> trades=curveGroupDefinition.getCurveDefinitions().stream().flatMap(defn -> defn.getNodes().stream()).filter(node -> !(node instanceof IborFixingDepositCurveNode)).map(node -> node.trade(1d,marketData,refData)).collect(toImmutableList());
  List<Column> columns=ImmutableList.of(Column.of(Measures.PRESENT_VALUE));
  MarketDataConfig marketDataConfig=MarketDataConfig.builder().add(CURVE_GROUP_NAME,curveGroupDefinition).build();
  CalculationFunctions functions=StandardComponents.calculationFunctions();
  RatesMarketDataLookup ratesLookup=RatesMarketDataLookup.of(curveGroupDefinition);
  CalculationRules rules=CalculationRules.of(functions,ratesLookup);
  MarketDataRequirements reqs=MarketDataRequirements.of(rules,trades,columns,refData);
  MarketData calibratedMarketData=marketDataFactory().create(reqs,marketDataConfig,marketData,refData);
  Results results=runner.calculate(rules,trades,columns,calibratedMarketData,refData);
  return Pair.of(trades,results);
}