Program: 89960
Project: 89960
Buggy source:
private File createImage(ApplicationGroup appgroup) throws IOException {
  Map<String,Double> costs=Maps.newHashMap();
  DateTime end=new DateTime(DateTimeZone.UTC).withDayOfWeek(1).withMillisOfDay(0);
  Interval interval=new Interval(end.minusWeeks(numWeeks),end);
  for (  Product product : products) {
    List<ResourceGroup> resourceGroups=getResourceGroups(appgroup,product);
    if (resourceGroups.size() == 0)     continue;
    DataManager dataManager=config.managers.getCostManager(product,ConsolidateType.weekly);
    TagLists tagLists=new TagLists(accounts,regions,null,Lists.newArrayList(product),null,null,resourceGroups);
    Map<Tag,double[]> data=dataManager.getData(interval,tagLists,TagType.Product,AggregateType.none,false);
    for (    Tag tag : data.keySet()) {
      for (int week=0; week < numWeeks; week++) {
        String key=tag + "String_Node_Str" + week;
        if (costs.containsKey(key))         costs.put(key,data.get(tag)[week] + costs.get(key));
 else         costs.put(key,data.get(tag)[week]);
      }
    }
  }
  DefaultCategoryDataset dataset=new DefaultCategoryDataset();
  for (  Product product : products) {
    for (int week=numWeeks - 1; week >= 0; week--) {
      String weekStr=String.format("String_Node_Str",formatter.print(end.minusWeeks(week + 1)).substring(5),formatter.print(end.minusWeeks(week)).substring(5));
      dataset.addValue(costs.get(product + "String_Node_Str" + week),product.name,weekStr);
    }
  }
  JFreeChart chart=ChartFactory.createBarChart3D(appgroup.getDisplayName() + "String_Node_Str","String_Node_Str","String_Node_Str",dataset,PlotOrientation.VERTICAL,true,false,false);
  CategoryPlot categoryplot=(CategoryPlot)chart.getPlot();
  BarRenderer3D renderer=(BarRenderer3D)categoryplot.getRenderer();
  renderer.setItemLabelAnchorOffset(10.0);
  TextTitle title=chart.getTitle();
  title.setFont(title.getFont().deriveFont((title.getFont().getSize() - 3)));
  renderer.setBaseItemLabelGenerator(new StandardCategoryItemLabelGenerator(){
    public java.lang.String generateLabel(    org.jfree.data.category.CategoryDataset dataset,    int row,    int column){
      return costFormatter.format(dataset.getValue(row,column));
    }
  }
);
  renderer.setBaseItemLabelsVisible(true);
  renderer.setBasePositiveItemLabelPosition(new ItemLabelPosition(ItemLabelAnchor.OUTSIDE12,TextAnchor.BASELINE_CENTER));
  NumberAxis numberaxis=(NumberAxis)categoryplot.getRangeAxis();
  numberaxis.setNumberFormatOverride(costFormatter);
  BufferedImage image=chart.createBufferedImage(1200,400);
  File outputfile=File.createTempFile("String_Node_Str","String_Node_Str");
  ImageIO.write(image,"String_Node_Str",outputfile);
  return outputfile;
}

Fixed version (ground truth):
private File createImage(ApplicationGroup appgroup) throws IOException {
  Map<String,Double> costs=Maps.newHashMap();
  DateTime end=new DateTime(DateTimeZone.UTC).withDayOfWeek(1).withMillisOfDay(0);
  Interval interval=new Interval(end.minusWeeks(numWeeks),end);
  for (  Product product : products) {
    List<ResourceGroup> resourceGroups=getResourceGroups(appgroup,product);
    if (resourceGroups.size() == 0)     continue;
    DataManager dataManager=config.managers.getCostManager(product,ConsolidateType.weekly);
    TagLists tagLists=new TagLists(accounts,regions,null,Lists.newArrayList(product),null,null,resourceGroups);
    Map<Tag,double[]> data=dataManager.getData(interval,tagLists,TagType.Product,AggregateType.none,false);
    for (    Tag tag : data.keySet()) {
      for (int week=0; week < numWeeks; week++) {
        String key=tag + "String_Node_Str" + week;
        if (costs.containsKey(key))         costs.put(key,data.get(tag)[week] + costs.get(key));
 else         costs.put(key,data.get(tag)[week]);
      }
    }
  }
  boolean hasData=false;
  for (  Map.Entry<String,Double> entry : costs.entrySet()) {
    if (!entry.getKey().contains("String_Node_Str") && entry.getValue() != null && entry.getValue() >= 0.1) {
      hasData=true;
      break;
    }
  }
  if (!hasData)   return null;
  DefaultCategoryDataset dataset=new DefaultCategoryDataset();
  for (  Product product : products) {
    for (int week=0; week < numWeeks; week++) {
      String weekStr=String.format("String_Node_Str",formatter.print(end.minusWeeks(numWeeks - week)).substring(5),formatter.print(end.minusWeeks(numWeeks - week - 1)).substring(5));
      dataset.addValue(costs.get(product + "String_Node_Str" + week),product.name,weekStr);
    }
  }
  JFreeChart chart=ChartFactory.createBarChart3D(appgroup.getDisplayName() + "String_Node_Str","String_Node_Str","String_Node_Str",dataset,PlotOrientation.VERTICAL,true,false,false);
  CategoryPlot categoryplot=(CategoryPlot)chart.getPlot();
  BarRenderer3D renderer=(BarRenderer3D)categoryplot.getRenderer();
  renderer.setItemLabelAnchorOffset(10.0);
  TextTitle title=chart.getTitle();
  title.setFont(title.getFont().deriveFont((title.getFont().getSize() - 3)));
  renderer.setBaseItemLabelGenerator(new StandardCategoryItemLabelGenerator(){
    public java.lang.String generateLabel(    org.jfree.data.category.CategoryDataset dataset,    int row,    int column){
      return costFormatter.format(dataset.getValue(row,column));
    }
  }
);
  renderer.setBaseItemLabelsVisible(true);
  renderer.setBasePositiveItemLabelPosition(new ItemLabelPosition(ItemLabelAnchor.OUTSIDE12,TextAnchor.BASELINE_CENTER));
  NumberAxis numberaxis=(NumberAxis)categoryplot.getRangeAxis();
  numberaxis.setNumberFormatOverride(costFormatter);
  BufferedImage image=chart.createBufferedImage(1200,400);
  File outputfile=File.createTempFile("String_Node_Str","String_Node_Str");
  ImageIO.write(image,"String_Node_Str",outputfile);
  return outputfile;
}