Program: 52736
Project: 52736
Buggy source:
@Test public void testThatSecuritiesAreGroupedIntoClassifications(){
  Client client=new Client();
  Taxonomy taxonomy=new TaxonomyBuilder().addClassification("String_Node_Str").addClassification("String_Node_Str").addClassification("String_Node_Str").addTo(client);
  Security a=new SecurityBuilder().addPrice("String_Node_Str",1000).assign(taxonomy,"String_Node_Str").addTo(client);
  Security c=new SecurityBuilder().addPrice("String_Node_Str",1200).assign(taxonomy,"String_Node_Str").addTo(client);
  Security d=new SecurityBuilder().addPrice("String_Node_Str",1200).assign(taxonomy,"String_Node_Str").addTo(client);
  Portfolio portfolio=new PortfolioBuilder().inbound_delivery(a,"String_Node_Str",1000000,10000).inbound_delivery(c,"String_Node_Str",1000000,12000).inbound_delivery(d,"String_Node_Str",1000000,12000).addTo(client);
  PortfolioSnapshot snapshot=PortfolioSnapshot.create(portfolio,new DateTime("String_Node_Str").toDate());
  assertNotNull(snapshot);
  GroupByTaxonomy grouping=snapshot.groupByTaxonomy(taxonomy);
  AssetCategory debt=grouping.byClassification(taxonomy.getClassificationById("String_Node_Str"));
  assertThat(debt.getValuation(),is(10000L));
  assertThat(debt.getPositions().size(),is(1));
  AssetCategory stocks=grouping.byClassification(taxonomy.getClassificationById("String_Node_Str"));
  assertThat(stocks.getValuation(),is(24000L));
  assertThat(stocks.getPositions().size(),is(2));
  AssetCategory realEstate=grouping.byClassification(taxonomy.getClassificationById("String_Node_Str"));
  assertThat(realEstate,nullValue());
}

Fixed version (ground truth):
@Test public void testThatSecuritiesAreGroupedIntoClassifications(){
  Client client=new Client();
  Taxonomy taxonomy=new TaxonomyBuilder().addClassification("String_Node_Str").addClassification("String_Node_Str").addClassification("String_Node_Str").addTo(client);
  Security a=new SecurityBuilder().addPrice("String_Node_Str",1000).assign(taxonomy,"String_Node_Str").addTo(client);
  Security c=new SecurityBuilder().addPrice("String_Node_Str",1200).assign(taxonomy,"String_Node_Str").addTo(client);
  Security d=new SecurityBuilder().addPrice("String_Node_Str",1200).assign(taxonomy,"String_Node_Str").addTo(client);
  Portfolio portfolio=new PortfolioBuilder().inbound_delivery(a,"String_Node_Str",Values.Share.factorize(10),10000).inbound_delivery(c,"String_Node_Str",Values.Share.factorize(10),12000).inbound_delivery(d,"String_Node_Str",Values.Share.factorize(10),12000).addTo(client);
  PortfolioSnapshot snapshot=PortfolioSnapshot.create(portfolio,new DateTime("String_Node_Str").toDate());
  assertNotNull(snapshot);
  GroupByTaxonomy grouping=snapshot.groupByTaxonomy(taxonomy);
  AssetCategory debt=grouping.byClassification(taxonomy.getClassificationById("String_Node_Str"));
  assertThat(debt.getValuation(),is(10000L));
  assertThat(debt.getPositions().size(),is(1));
  AssetCategory stocks=grouping.byClassification(taxonomy.getClassificationById("String_Node_Str"));
  assertThat(stocks.getValuation(),is(24000L));
  assertThat(stocks.getPositions().size(),is(2));
  AssetCategory realEstate=grouping.byClassification(taxonomy.getClassificationById("String_Node_Str"));
  assertThat(realEstate,nullValue());
}