Program: 153263
Project: 153263
Buggy source:
public boolean readSingleFile(File file,boolean all,PassthroughConnection ptc){
  FileInputStream in;
  try {
    in=new FileInputStream(file);
  }
 catch (  FileNotFoundException e) {
    return false;
  }
  int blockSize;
  long blockHash;
  long[] hashes;
  byte[][] hashData;
  int requiredUpdates=0;
  int skippedUpdates=0;
  try {
    GZIPInputStream gzIn;
    try {
      gzIn=new GZIPInputStream(in);
    }
 catch (    IOException e1) {
      return false;
    }
    DataInputStream inData=new DataInputStream(gzIn);
    try {
      blockHash=inData.readLong();
      blockSize=inData.readInt();
      hashes=new long[blockSize];
      hashData=new byte[blockSize][];
      for (int cnt=0; cnt < blockSize; cnt++) {
        hashes[cnt]=inData.readLong();
        if (ptc.hashesReceivedThisConnection != null && !ptc.hashesReceivedThisConnection.containsKey(hashes[cnt])) {
          ptc.hashQueue.offer(hashes[cnt]);
        }
      }
      if (all) {
        for (int cnt=0; cnt < blockSize; cnt++) {
          if (!cache.containsKey(hashes[cnt])) {
            int skip=skippedUpdates * 2048;
            if (inData.skip(skip) != skip) {
              System.out.println("String_Node_Str");
              return false;
            }
            hashData[cnt]=new byte[2048];
            inData.readFully(hashData[cnt]);
            requiredUpdates++;
            skippedUpdates=0;
          }
 else {
            hashData[cnt]=null;
            skippedUpdates++;
          }
        }
      }
    }
 catch (    IOException e) {
      e.printStackTrace();
      System.out.println("String_Node_Str" + file.getName());
      return false;
    }
  }
  finally {
    try {
      in.close();
    }
 catch (    IOException e) {
    }
  }
  if (all) {
    for (int cnt=0; cnt < blockSize; cnt++) {
      if (hashData[cnt] != null) {
        cache.put(hashes[cnt],new SoftReference<byte[]>(hashData[cnt]));
        hardReferencesLoop.addLast(hashData[cnt]);
        if (hardReferencesLoop.size() > 32768) {
          hardReferencesLoop.removeFirst();
        }
      }
    }
  }
 else {
    blockHashList.put(blockHash,hashes);
    for (int cnt=0; cnt < blockSize; cnt++) {
      File current=FAT.get(hashes[cnt]);
      if (current == null) {
        FAT.put(hashes[cnt],file);
      }
    }
  }
  return true;
}

Fixed version (ground truth):
public boolean readSingleFile(File file,boolean all,PassthroughConnection ptc){
  FileInputStream in;
  try {
    in=new FileInputStream(file);
  }
 catch (  FileNotFoundException e) {
    return false;
  }
  int blockSize;
  long blockHash;
  long[] hashes;
  byte[][] hashData;
  int requiredUpdates=0;
  int skippedUpdates=0;
  try {
    GZIPInputStream gzIn;
    try {
      gzIn=new GZIPInputStream(in);
    }
 catch (    IOException e1) {
      return false;
    }
    DataInputStream inData=new DataInputStream(gzIn);
    try {
      blockHash=inData.readLong();
      blockSize=inData.readInt();
      hashes=new long[blockSize];
      hashData=new byte[blockSize][];
      for (int cnt=0; cnt < blockSize; cnt++) {
        hashes[cnt]=inData.readLong();
        if (all && ptc.hashesSentThisConnection != null && !ptc.hashesSentThisConnection.containsKey(hashes[cnt])) {
          ptc.hashQueue.offer(hashes[cnt]);
        }
      }
      if (all) {
        for (int cnt=0; cnt < blockSize; cnt++) {
          if (!cache.containsKey(hashes[cnt])) {
            int skip=skippedUpdates * 2048;
            if (inData.skip(skip) != skip) {
              System.out.println("String_Node_Str");
              return false;
            }
            hashData[cnt]=new byte[2048];
            inData.readFully(hashData[cnt]);
            requiredUpdates++;
            skippedUpdates=0;
          }
 else {
            hashData[cnt]=null;
            skippedUpdates++;
          }
        }
      }
    }
 catch (    IOException e) {
      e.printStackTrace();
      System.out.println("String_Node_Str" + file.getName());
      return false;
    }
  }
  finally {
    try {
      in.close();
    }
 catch (    IOException e) {
    }
  }
  if (all) {
    for (int cnt=0; cnt < blockSize; cnt++) {
      if (hashData[cnt] != null) {
        cache.put(hashes[cnt],new SoftReference<byte[]>(hashData[cnt]));
        hardReferencesLoop.addLast(hashData[cnt]);
        if (hardReferencesLoop.size() > 32768) {
          hardReferencesLoop.removeFirst();
        }
      }
    }
  }
 else {
    blockHashList.put(blockHash,hashes);
    for (int cnt=0; cnt < blockSize; cnt++) {
      File current=FAT.get(hashes[cnt]);
      if (current == null) {
        FAT.put(hashes[cnt],file);
      }
    }
  }
  return true;
}