Program: 155161
Project: 155161
Buggy source:
private static Set<Integer> checkPropertyStore(String storeName,Set<Integer> propertyIndex) throws IOException {
  File propStore=new File(storeName);
  if (!propStore.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> arrayStartBlocks=checkDynamicStore(storeName + "String_Node_Str");
  Set<Integer> stringStartBlocks=checkDynamicStore(storeName + "String_Node_Str");
  int recordSize=25;
  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++;
      int type=buffer.getInt();
      int key=buffer.getInt();
      long prop=buffer.getLong();
      int previous=buffer.getInt();
      int next=buffer.getInt();
      if (next != NO_NEXT_BLOCK) {
        if ((next + 1) * recordSize > fileSize || next < 0) {
          throw new IOException("String_Node_Str" + next + "String_Node_Str"+ i);
        }
        buffer.clear();
        fileChannel.position((long)next * recordSize);
        fileChannel.read(buffer);
        buffer.flip();
        if (buffer.get() != RECORD_IN_USE) {
          throw new IOException("String_Node_Str" + next + "String_Node_Str"+ i);
        }
        buffer.getInt();
        buffer.getInt();
        buffer.getLong();
        int prev=buffer.getInt();
        if (prev != i) {
          throw new IOException("String_Node_Str" + next + "String_Node_Str"+ i);
        }
      }
      if (previous == NO_PREV_BLOCK) {
        startBlocks.add(i);
      }
 else {
        if ((previous + 1) * recordSize > fileSize || previous < 0) {
          throw new IOException("String_Node_Str" + previous + "String_Node_Str"+ i);
        }
        buffer.clear();
        fileChannel.position((long)previous * recordSize);
        fileChannel.read(buffer);
        buffer.flip();
        if (buffer.get() != RECORD_IN_USE) {
          throw new IOException("String_Node_Str" + previous + "String_Node_Str"+ i);
        }
        buffer.getInt();
        buffer.getInt();
        buffer.getLong();
        buffer.getInt();
        int nxt=buffer.getInt();
        if (nxt != i) {
          throw new IOException("String_Node_Str" + previous + "String_Node_Str"+ i);
        }
      }
      if (type < 1 || type > 10) {
        throw new IOException("String_Node_Str" + type + "String_Node_Str"+ i);
      }
      if (!propertyIndex.contains(key)) {
        throw new IOException("String_Node_Str" + key + "String_Node_Str"+ i);
      }
      if (type == 9 && !arrayStartBlocks.remove((int)prop)) {
        throw new IOException("String_Node_Str" + prop + "String_Node_Str"+ i);
      }
      if (type == 2 && !stringStartBlocks.remove((int)prop)) {
        throw new IOException("String_Node_Str" + prop + "String_Node_Str"+ 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 (!stringStartBlocks.isEmpty()) {
    System.out.println("String_Node_Str" + stringStartBlocks.size());
  }
  fileChannel.close();
  System.out.println("String_Node_Str");
  return startBlocks;
}

Fixed version (ground truth):
private static Set<Integer> checkPropertyStore(String storeName,Set<Integer> propertyIndex) throws IOException {
  File propStore=new File(storeName);
  if (!propStore.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> arrayStartBlocks=checkDynamicStore(storeName + "String_Node_Str");
  Set<Integer> stringStartBlocks=checkDynamicStore(storeName + "String_Node_Str");
  int recordSize=25;
  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++;
      int type=buffer.getInt();
      int key=buffer.getInt();
      long prop=buffer.getLong();
      int previous=buffer.getInt();
      int next=buffer.getInt();
      if (next != NO_NEXT_BLOCK) {
        if ((next + 1) * recordSize > fileSize || next < 0) {
          throw new IOException("String_Node_Str" + next + "String_Node_Str"+ i);
        }
        buffer.clear();
        fileChannel.position((long)next * recordSize);
        fileChannel.read(buffer);
        buffer.flip();
        if (buffer.get() != RECORD_IN_USE) {
          throw new IOException("String_Node_Str" + next + "String_Node_Str"+ i);
        }
        buffer.getInt();
        buffer.getInt();
        buffer.getLong();
        int prev=buffer.getInt();
        if (prev != i) {
          throw new IOException("String_Node_Str" + next + "String_Node_Str"+ i);
        }
      }
      if (previous == NO_PREV_BLOCK) {
        startBlocks.add(i);
      }
 else {
        if ((long)(previous + 1) * recordSize > fileSize || previous < 0) {
          throw new IOException("String_Node_Str" + previous + "String_Node_Str"+ i);
        }
        buffer.clear();
        fileChannel.position((long)previous * recordSize);
        fileChannel.read(buffer);
        buffer.flip();
        if (buffer.get() != RECORD_IN_USE) {
          throw new IOException("String_Node_Str" + previous + "String_Node_Str"+ i);
        }
        buffer.getInt();
        buffer.getInt();
        buffer.getLong();
        buffer.getInt();
        int nxt=buffer.getInt();
        if (nxt != i) {
          throw new IOException("String_Node_Str" + previous + "String_Node_Str"+ i);
        }
      }
      if (type < 1 || type > 10) {
        throw new IOException("String_Node_Str" + type + "String_Node_Str"+ i);
      }
      if (!propertyIndex.contains(key)) {
        throw new IOException("String_Node_Str" + key + "String_Node_Str"+ i);
      }
      if (type == 9 && !arrayStartBlocks.remove((int)prop)) {
        throw new IOException("String_Node_Str" + prop + "String_Node_Str"+ i);
      }
      if (type == 2 && !stringStartBlocks.remove((int)prop)) {
        throw new IOException("String_Node_Str" + prop + "String_Node_Str"+ 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 (!stringStartBlocks.isEmpty()) {
    System.out.println("String_Node_Str" + stringStartBlocks.size());
  }
  fileChannel.close();
  System.out.println("String_Node_Str");
  return startBlocks;
}