Program: 16000
Project: 16000
Buggy source:
/** 
 * Dump the contents of the file.
 * @param fileName the name of the file
 * @param writer the print writer
 */
public static void dump(String fileName,PrintWriter writer){
  if (!FileUtils.exists(fileName)) {
    writer.println("String_Node_Str" + fileName);
    return;
  }
  FileChannel file=null;
  try {
    file=FilePath.get(fileName).open("String_Node_Str");
    long fileLength=file.size();
    file.position(0);
    byte[] header=new byte[blockSize];
    file.read(ByteBuffer.wrap(header));
    Properties prop=new Properties();
    prop.load(new ByteArrayInputStream(header));
    prop.load(new StringReader(new String(header,"String_Node_Str")));
    writer.println("String_Node_Str" + fileName);
    writer.println("String_Node_Str" + fileLength);
    writer.println("String_Node_Str" + prop);
    ByteBuffer block=ByteBuffer.wrap(new byte[32]);
    for (long pos=0; pos < fileLength; ) {
      file.position(pos);
      block.rewind();
      FileUtils.readFully(file,block);
      block.rewind();
      if (block.get() != 'c') {
        pos+=blockSize;
        continue;
      }
      int chunkLength=block.getInt();
      int chunkId=block.getInt();
      long metaRootPos=block.getLong();
      writer.println("String_Node_Str" + chunkId + "String_Node_Str"+ pos+ "String_Node_Str"+ chunkLength+ "String_Node_Str"+ metaRootPos);
      ByteBuffer chunk=ByteBuffer.allocate(chunkLength);
      file.position(pos);
      FileUtils.readFully(file,chunk);
      int p=block.position();
      pos=(pos + chunkLength + blockSize) / blockSize * blockSize;
      chunkLength-=p;
      while (chunkLength > 0) {
        chunk.position(p);
        int pageLength=chunk.getInt();
        chunk.getShort();
        long mapId=DataUtils.readVarInt(chunk);
        int len=DataUtils.readVarInt(chunk);
        int type=chunk.get();
        boolean compressed=(type & 2) != 0;
        boolean node=(type & 1) != 0;
        writer.println("String_Node_Str" + mapId + "String_Node_Str"+ p+ "String_Node_Str"+ (node ? "String_Node_Str" : "String_Node_Str")+ "String_Node_Str"+ (compressed ? "String_Node_Str" : "String_Node_Str")+ "String_Node_Str"+ "String_Node_Str"+ pageLength+ "String_Node_Str"+ len);
        p+=pageLength;
        chunkLength-=pageLength;
      }
    }
  }
 catch (  IOException e) {
    writer.println("String_Node_Str" + e);
  }
 finally {
    try {
      file.close();
    }
 catch (    IOException e) {
    }
  }
  writer.println();
  writer.flush();
}

Fixed version (ground truth):
/** 
 * Dump the contents of the file.
 * @param fileName the name of the file
 * @param writer the print writer
 */
public static void dump(String fileName,PrintWriter writer){
  if (!FileUtils.exists(fileName)) {
    writer.println("String_Node_Str" + fileName);
    return;
  }
  FileChannel file=null;
  try {
    file=FilePath.get(fileName).open("String_Node_Str");
    long fileLength=file.size();
    file.position(0);
    byte[] header=new byte[blockSize];
    file.read(ByteBuffer.wrap(header));
    Properties prop=new Properties();
    prop.load(new ByteArrayInputStream(header));
    prop.load(new StringReader(new String(header,"String_Node_Str")));
    writer.println("String_Node_Str" + fileName);
    writer.println("String_Node_Str" + fileLength);
    writer.println("String_Node_Str" + prop);
    ByteBuffer block=ByteBuffer.wrap(new byte[32]);
    for (long pos=0; pos < fileLength; ) {
      file.position(pos);
      block.rewind();
      FileUtils.readFully(file,block);
      block.rewind();
      if (block.get() != 'c') {
        pos+=blockSize;
        continue;
      }
      int chunkLength=block.getInt();
      int chunkId=block.getInt();
      long metaRootPos=block.getLong();
      writer.println("String_Node_Str" + chunkId + "String_Node_Str"+ pos+ "String_Node_Str"+ chunkLength+ "String_Node_Str"+ metaRootPos);
      ByteBuffer chunk=ByteBuffer.allocate(chunkLength);
      file.position(pos);
      FileUtils.readFully(file,chunk);
      int p=block.position();
      pos=(pos + chunkLength + blockSize) / blockSize * blockSize;
      chunkLength-=p;
      while (chunkLength > 0) {
        chunk.position(p);
        int pageLength=chunk.getInt();
        chunk.getShort();
        long mapId=DataUtils.readVarInt(chunk);
        int len=DataUtils.readVarInt(chunk);
        int type=chunk.get();
        boolean compressed=(type & 2) != 0;
        boolean node=(type & 1) != 0;
        writer.println("String_Node_Str" + mapId + "String_Node_Str"+ p+ "String_Node_Str"+ (node ? "String_Node_Str" : "String_Node_Str")+ "String_Node_Str"+ (compressed ? "String_Node_Str" : "String_Node_Str")+ "String_Node_Str"+ "String_Node_Str"+ pageLength+ "String_Node_Str"+ len);
        p+=pageLength;
        chunkLength-=pageLength;
      }
    }
  }
 catch (  IOException e) {
    writer.println("String_Node_Str" + e);
  }
 finally {
    if (file != null) {
      try {
        file.close();
      }
 catch (      IOException e) {
      }
    }
  }
  writer.println();
  writer.flush();
}