Program: 14437
Project: 14437
Buggy source:
@Override public void render(final ReportArtEntity report,final OutputStream os,final Units units) throws IOException {
  doc.setWriter(new OutputStreamWriter(os));
  doc.open();
  doc.textLine("String_Node_Str",1);
  doc.textLine("String_Node_Str" + new Date(report.getBeginMs()).toString(),4);
  doc.textLine("String_Node_Str" + new Date(report.getEndMs()).toString(),4);
  doc.textLine("String_Node_Str",3);
  doc.tableOpen();
  doc.newRow().addEmptyValCols(5).addValCol("String_Node_Str" + units.getSizeUnit(),2,"String_Node_Str").addValCol("String_Node_Str" + units.getSizeUnit(),2,"String_Node_Str").addValCol("String_Node_Str",2,"String_Node_Str").addValCol("String_Node_Str",2,"String_Node_Str");
  doc.newRow().addValCol("String_Node_Str").addValCol("String_Node_Str").addValCol("String_Node_Str").addValCol(units.getTimeUnit().toString()).addValCol("String_Node_Str").addValCol("String_Node_Str").addValCol("String_Node_Str").addValCol("String_Node_Str").addValCol("String_Node_Str").addValCol("String_Node_Str").addValCol("String_Node_Str").addValCol("String_Node_Str").addValCol("String_Node_Str");
  for (  final String zoneName : report.getZones().keySet()) {
    final AvailabilityZoneArtEntity zone=report.getZones().get(zoneName);
    doc.newRow().addLabelCol(0,"String_Node_Str" + zoneName).addValCol("String_Node_Str").addValCol("String_Node_Str");
    addUsageCols(doc,zone.getUsageTotals().getInstanceTotals(),units);
    for (    String accountName : zone.getAccounts().keySet()) {
      AccountArtEntity account=zone.getAccounts().get(accountName);
      doc.newRow().addLabelCol(1,"String_Node_Str" + accountName).addValCol("String_Node_Str").addValCol("String_Node_Str");
      addUsageCols(doc,account.getUsageTotals().getInstanceTotals(),units);
      for (      String userName : account.getUsers().keySet()) {
        UserArtEntity user=account.getUsers().get(userName);
        doc.newRow().addLabelCol(2,"String_Node_Str" + userName).addValCol("String_Node_Str").addValCol("String_Node_Str");
        addUsageCols(doc,user.getUsageTotals().getInstanceTotals(),units);
        for (        String instanceUuid : user.getInstances().keySet()) {
          InstanceArtEntity instance=user.getInstances().get(instanceUuid);
          doc.newRow().addValCol(instance.getInstanceId()).addValCol(instance.getInstanceType());
          addUsageCols(doc,instance.getUsage(),units);
        }
      }
    }
  }
  doc.tableClose();
  doc.textLine("String_Node_Str",3);
  doc.tableOpen();
  doc.newRow().addValCol("String_Node_Str",2,"String_Node_Str").addValCol("String_Node_Str",2,"String_Node_Str").addValCol("String_Node_Str",2,"String_Node_Str").addValCol("String_Node_Str",2,"String_Node_Str").addValCol("String_Node_Str",2,"String_Node_Str");
  doc.newRow().addValCol("String_Node_Str",1,"String_Node_Str").addValCol(units.getTimeUnit().toString(),1,"String_Node_Str").addValCol("String_Node_Str",1,"String_Node_Str").addValCol(units.getTimeUnit().toString(),1,"String_Node_Str").addValCol("String_Node_Str",1,"String_Node_Str").addValCol(units.getTimeUnit().toString(),1,"String_Node_Str").addValCol("String_Node_Str",1,"String_Node_Str").addValCol(units.getTimeUnit().toString(),1,"String_Node_Str").addValCol("String_Node_Str",1,"String_Node_Str").addValCol(units.getTimeUnit().toString(),1,"String_Node_Str");
  for (  String zoneName : report.getZones().keySet()) {
    AvailabilityZoneArtEntity zone=report.getZones().get(zoneName);
    doc.newRow().addLabelCol(0,"String_Node_Str" + zoneName);
    addTimeCols(doc,zone.getUsageTotals(),units);
    for (    String accountName : zone.getAccounts().keySet()) {
      AccountArtEntity account=zone.getAccounts().get(accountName);
      doc.newRow().addLabelCol(1,"String_Node_Str" + accountName);
      addTimeCols(doc,account.getUsageTotals(),units);
      for (      String userName : account.getUsers().keySet()) {
        UserArtEntity user=account.getUsers().get(userName);
        doc.newRow().addLabelCol(2,"String_Node_Str" + userName);
        addTimeCols(doc,user.getUsageTotals(),units);
      }
    }
  }
  doc.tableClose();
  doc.close();
}

Fixed version (ground truth):
@Override public void render(final ReportArtEntity report,final OutputStream os,final Units units) throws IOException {
  doc.setWriter(new OutputStreamWriter(os));
  doc.open();
  doc.textLine("String_Node_Str",1);
  doc.textLine("String_Node_Str" + new Date(report.getBeginMs()).toString(),4);
  doc.textLine("String_Node_Str" + new Date(report.getEndMs()).toString(),4);
  doc.textLine("String_Node_Str",3);
  doc.tableOpen();
  doc.newRow().addEmptyValCols(5).addValCol("String_Node_Str" + units.getSizeUnit(),2,"String_Node_Str").addValCol("String_Node_Str" + units.getSizeUnit(),2,"String_Node_Str").addValCol("String_Node_Str",2,"String_Node_Str").addValCol("String_Node_Str" + TimeUnit.values()[units.getTimeUnit().ordinal() - 1] + "String_Node_Str",2,"String_Node_Str");
  doc.newRow().addValCol("String_Node_Str").addValCol("String_Node_Str").addValCol("String_Node_Str").addValCol(units.getTimeUnit().toString()).addValCol("String_Node_Str").addValCol("String_Node_Str").addValCol("String_Node_Str").addValCol("String_Node_Str").addValCol("String_Node_Str").addValCol("String_Node_Str").addValCol("String_Node_Str").addValCol("String_Node_Str").addValCol("String_Node_Str");
  for (  final String zoneName : report.getZones().keySet()) {
    final AvailabilityZoneArtEntity zone=report.getZones().get(zoneName);
    doc.newRow().addLabelCol(0,"String_Node_Str" + zoneName).addValCol("String_Node_Str").addValCol("String_Node_Str");
    addUsageCols(doc,zone.getUsageTotals().getInstanceTotals(),units);
    for (    String accountName : zone.getAccounts().keySet()) {
      AccountArtEntity account=zone.getAccounts().get(accountName);
      doc.newRow().addLabelCol(1,"String_Node_Str" + accountName).addValCol("String_Node_Str").addValCol("String_Node_Str");
      addUsageCols(doc,account.getUsageTotals().getInstanceTotals(),units);
      for (      String userName : account.getUsers().keySet()) {
        UserArtEntity user=account.getUsers().get(userName);
        doc.newRow().addLabelCol(2,"String_Node_Str" + userName).addValCol("String_Node_Str").addValCol("String_Node_Str");
        addUsageCols(doc,user.getUsageTotals().getInstanceTotals(),units);
        for (        String instanceUuid : user.getInstances().keySet()) {
          InstanceArtEntity instance=user.getInstances().get(instanceUuid);
          doc.newRow().addValCol(instance.getInstanceId()).addValCol(instance.getInstanceType());
          addUsageCols(doc,instance.getUsage(),units);
        }
      }
    }
  }
  doc.tableClose();
  doc.textLine("String_Node_Str",3);
  doc.tableOpen();
  doc.newRow().addValCol("String_Node_Str",2,"String_Node_Str").addValCol("String_Node_Str",2,"String_Node_Str").addValCol("String_Node_Str",2,"String_Node_Str").addValCol("String_Node_Str",2,"String_Node_Str").addValCol("String_Node_Str",2,"String_Node_Str");
  doc.newRow().addValCol("String_Node_Str",1,"String_Node_Str").addValCol(units.getTimeUnit().toString(),1,"String_Node_Str").addValCol("String_Node_Str",1,"String_Node_Str").addValCol(units.getTimeUnit().toString(),1,"String_Node_Str").addValCol("String_Node_Str",1,"String_Node_Str").addValCol(units.getTimeUnit().toString(),1,"String_Node_Str").addValCol("String_Node_Str",1,"String_Node_Str").addValCol(units.getTimeUnit().toString(),1,"String_Node_Str").addValCol("String_Node_Str",1,"String_Node_Str").addValCol(units.getTimeUnit().toString(),1,"String_Node_Str");
  for (  String zoneName : report.getZones().keySet()) {
    AvailabilityZoneArtEntity zone=report.getZones().get(zoneName);
    doc.newRow().addLabelCol(0,"String_Node_Str" + zoneName);
    addTimeCols(doc,zone.getUsageTotals(),units);
    for (    String accountName : zone.getAccounts().keySet()) {
      AccountArtEntity account=zone.getAccounts().get(accountName);
      doc.newRow().addLabelCol(1,"String_Node_Str" + accountName);
      addTimeCols(doc,account.getUsageTotals(),units);
      for (      String userName : account.getUsers().keySet()) {
        UserArtEntity user=account.getUsers().get(userName);
        doc.newRow().addLabelCol(2,"String_Node_Str" + userName);
        addTimeCols(doc,user.getUsageTotals(),units);
      }
    }
  }
  doc.tableClose();
  doc.close();
}