Program: 155158
Project: 155158
Buggy source:
private static Set<Integer> checkPropertyIndexStore(String storeName) throws IOException {
  File indexStore=new File(storeName);
  if (!indexStore.exists()) {
    throw new IOException("String_Node_Str" + storeName);
  }
  File idGenerator=new File(storeName + "String_Node_Str");
  if (idGenerator.exists()) {
    boolean success=idGenerator.delete();
    assert success;
  }
  Set<Integer> keyStartBlocks=checkDynamicStore(storeName + "String_Node_Str");
  int recordSize=9;
  System.out.print(storeName);
  ByteBuffer buffer=ByteBuffer.allocate(recordSize);
  FileChannel fileChannel=new RandomAccessFile(storeName,"String_Node_Str").getChannel();
  long fileSize=fileChannel.size();
  fileChannel.position(0);
  long dot=fileSize / recordSize / 20;
  Set<Integer> startBlocks=new java.util.HashSet<Integer>();
  int i=0;
  int inUseCount=0;
  for (i=0; (i + 1) * recordSize <= fileSize; i++) {
    buffer.clear();
    fileChannel.position((long)i * recordSize);
    fileChannel.read(buffer);
    buffer.flip();
    byte inUse=buffer.get();
    if (inUse == RECORD_IN_USE) {
      inUseCount++;
      buffer.getInt();
      int key=buffer.getInt();
      if (!keyStartBlocks.remove(key)) {
        throw new IOException("String_Node_Str" + key + "String_Node_Str"+ i);
      }
      startBlocks.add(i);
    }
 else     if (inUse != RECORD_NOT_IN_USE) {
      System.out.println("String_Node_Str" + i);
      System.out.println("String_Node_Str" + inUse);
    }
    if (dot != 0 && i % dot == 0) {
      System.out.print("String_Node_Str");
    }
  }
  System.out.print("String_Node_Str" + i + "String_Node_Str"+ inUseCount);
  if (!keyStartBlocks.isEmpty()) {
    System.out.println("String_Node_Str" + keyStartBlocks.size());
  }
  fileChannel.close();
  System.out.println("String_Node_Str");
  return startBlocks;
}

Fixed version (ground truth):
private static Set<Integer> checkPropertyIndexStore(String storeName) throws IOException {
  File indexStore=new File(storeName);
  if (!indexStore.exists()) {
    throw new IOException("String_Node_Str" + storeName);
  }
  File idGenerator=new File(storeName + "String_Node_Str");
  if (idGenerator.exists()) {
    boolean success=idGenerator.delete();
    assert success;
  }
  Set<Integer> keyStartBlocks=checkDynamicStore(storeName + "String_Node_Str");
  int recordSize=9;
  System.out.print(storeName);
  ByteBuffer buffer=ByteBuffer.allocate(recordSize);
  FileChannel fileChannel=new RandomAccessFile(storeName,"String_Node_Str").getChannel();
  long fileSize=fileChannel.size();
  fileChannel.position(0);
  long dot=fileSize / recordSize / 20;
  Set<Integer> startBlocks=new java.util.HashSet<Integer>();
  int i=0;
  int inUseCount=0;
  for (i=0; (long)(i + 1) * recordSize <= fileSize; i++) {
    buffer.clear();
    fileChannel.position((long)i * recordSize);
    if (fileChannel.read(buffer) == 0) {
      break;
    }
    buffer.flip();
    byte inUse=buffer.get();
    if (inUse == RECORD_IN_USE) {
      inUseCount++;
      buffer.getInt();
      int key=buffer.getInt();
      if (!keyStartBlocks.remove(key)) {
        throw new IOException("String_Node_Str" + key + "String_Node_Str"+ i);
      }
      startBlocks.add(i);
    }
 else     if (inUse != RECORD_NOT_IN_USE) {
      System.out.println("String_Node_Str" + i);
      System.out.println("String_Node_Str" + inUse);
    }
    if (dot != 0 && i % dot == 0) {
      System.out.print("String_Node_Str");
    }
  }
  System.out.print("String_Node_Str" + i + "String_Node_Str"+ inUseCount);
  if (!keyStartBlocks.isEmpty()) {
    System.out.println("String_Node_Str" + keyStartBlocks.size());
  }
  fileChannel.close();
  System.out.println("String_Node_Str");
  return startBlocks;
}