Program: 66824
Project: 66824
Buggy source:
private void outputSfnts(PrintStream out){
  String[] tablesDesired={"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
  List<String> tablesToAdd=new ArrayList<String>();
  addTables(tablesToAdd,tablesDesired);
  Collections.sort(tablesToAdd);
  int tableNumber=tablesToAdd.size() + 1;
  int searchRange=getSearchRange(tableNumber);
  Util.putInt16(directoryRawData,4,tableNumber);
  Util.putInt16(directoryRawData,6,searchRange);
  Util.putInt16(directoryRawData,8,getExponent(searchRange));
  Util.putInt16(directoryRawData,10,(tableNumber << 4) - searchRange);
  ArrayList<byte[]> metadata=new ArrayList<byte[]>();
  ArrayList<byte[]> data=new ArrayList<byte[]>();
  metadata.add(directoryRawData);
  addGdirTable(metadata,0);
  int offset=12 + tableNumber * 16;
  byte[] headData=null;
  for (int i=0; i < tablesToAdd.size(); i++) {
    String name=(String)tablesToAdd.get(i);
    int newOffset=offset;
    try {
      int[] tableLocation=getTableLocation(name);
      if (tableLocation != null) {
        byte[] tableMetadata=metadataTables.get(name);
        setOffset(tableMetadata,offset);
        metadata.add(tableMetadata);
        newOffset=offset + getEvenLength(tableLocation[1]);
        List<byte[]> datas=readTable(name);
        if ("String_Node_Str".equals(name)) {
          headData=datas.get(0);
        }
        data.addAll(datas);
      }
    }
 catch (    Exception e) {
      logger.log(Level.WARNING,"String_Node_Str" + name);
    }
    offset=newOffset;
  }
  long adjustment=calculateChecksumAdjustment(metadata,data);
  Util.putInt32(headData,8,adjustment);
  out.println("String_Node_Str");
  byte[] metadataArray=concatMetadata(metadata);
  out.println(toHexString(metadataArray));
  for (  byte[] bytes : data) {
    out.println(toHexString(bytes));
  }
  out.println("String_Node_Str");
}

Fixed version (ground truth):
private void outputSfnts(PrintStream out){
  String[] tablesDesired={"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
  List<String> tablesToAdd=new ArrayList<String>();
  addTables(tablesToAdd,tablesDesired);
  Collections.sort(tablesToAdd);
  int tableNumber=tablesToAdd.size() + 1;
  int searchRange=getSearchRange(tableNumber);
  Util.putInt16(directoryRawData,4,tableNumber);
  Util.putInt16(directoryRawData,6,searchRange);
  Util.putInt16(directoryRawData,8,getExponent(searchRange));
  Util.putInt16(directoryRawData,10,(tableNumber << 4) - searchRange);
  ArrayList<byte[]> metadata=new ArrayList<byte[]>();
  ArrayList<byte[]> data=new ArrayList<byte[]>();
  metadata.add(directoryRawData);
  addGdirTable(metadata,0);
  int offset=12 + tableNumber * 16;
  byte[] headData=null;
  for (int i=0; i < tablesToAdd.size(); i++) {
    String name=(String)tablesToAdd.get(i);
    int newOffset=offset;
    try {
      int[] tableLocation=getTableLocation(name);
      if (tableLocation != null) {
        byte[] tableMetadata=metadataTables.get(name);
        setOffset(tableMetadata,offset);
        metadata.add(tableMetadata);
        newOffset=offset + getEvenLength(tableLocation[1]);
        List<byte[]> datas=readTable(name);
        if ("String_Node_Str".equals(name)) {
          headData=datas.get(0);
        }
        data.addAll(datas);
      }
    }
 catch (    IOException ioe) {
      logger.log(Level.WARNING,"String_Node_Str" + name);
    }
catch (    DocumentException de) {
      logger.log(Level.WARNING,"String_Node_Str" + name);
    }
    offset=newOffset;
  }
  long adjustment=calculateChecksumAdjustment(metadata,data);
  Util.putInt32(headData,8,adjustment);
  out.println("String_Node_Str");
  byte[] metadataArray=concatMetadata(metadata);
  out.println(toHexString(metadataArray));
  for (  byte[] bytes : data) {
    out.println(toHexString(bytes));
  }
  out.println("String_Node_Str");
}