Program: 155157
Project: 155157
Buggy source:
private static void checkRelationshipStore(String storeName,Set<Integer> propertySet,Set<Integer> relTypeSet,Set<Integer> nodeSet) throws IOException {
  File relStore=new File(storeName);
  if (!relStore.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;
  }
  int recordSize=33;
  System.out.print(storeName);
  ByteBuffer buffer=ByteBuffer.allocate(recordSize);
  FileChannel fileChannel=new RandomAccessFile(relStore,"String_Node_Str").getChannel();
  long fileSize=fileChannel.size();
  fileChannel.position(0);
  long dot=fileSize / recordSize / 20;
  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 + NOT_DIRECTED || inUse == RECORD_IN_USE + DIRECTED) {
      inUseCount++;
      int firstNode=buffer.getInt();
      int secondNode=buffer.getInt();
      int type=buffer.getInt();
      int firstPrev=buffer.getInt();
      int firstNext=buffer.getInt();
      int secondPrev=buffer.getInt();
      int secondNext=buffer.getInt();
      int prop=buffer.getInt();
      if (firstPrev == NO_PREVIOUS_RELATIONSHIP && !nodeSet.remove(firstNode)) {
        throw new IOException("String_Node_Str" + firstNode + "String_Node_Str"+ "String_Node_Str"+ i);
      }
      if (secondPrev == NO_PREVIOUS_RELATIONSHIP && !nodeSet.remove(secondNode)) {
        throw new IOException("String_Node_Str" + secondNode + "String_Node_Str"+ "String_Node_Str"+ i);
      }
      checkRelationshipList(i,firstNode,firstPrev,firstNext,fileChannel,buffer);
      checkRelationshipList(i,secondNode,secondPrev,secondNext,fileChannel,buffer);
      if (prop != NO_NEXT_PROPERTY && !propertySet.remove(prop)) {
        throw new IOException("String_Node_Str" + prop + "String_Node_Str"+ i);
      }
      if (!relTypeSet.contains(type)) {
        throw new IOException("String_Node_Str" + type + "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);
  fileChannel.close();
  System.out.println("String_Node_Str");
}

Fixed version (ground truth):
private static void checkRelationshipStore(String storeName,Set<Integer> propertySet,Set<Integer> relTypeSet,Set<Integer> nodeSet) throws IOException {
  File relStore=new File(storeName);
  if (!relStore.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;
  }
  int recordSize=33;
  System.out.print(storeName);
  ByteBuffer buffer=ByteBuffer.allocate(recordSize);
  FileChannel fileChannel=new RandomAccessFile(relStore,"String_Node_Str").getChannel();
  long fileSize=fileChannel.size();
  fileChannel.position(0);
  long dot=fileSize / recordSize / 20;
  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 + NOT_DIRECTED || inUse == RECORD_IN_USE + DIRECTED) {
      inUseCount++;
      int firstNode=buffer.getInt();
      int secondNode=buffer.getInt();
      int type=buffer.getInt();
      int firstPrev=buffer.getInt();
      int firstNext=buffer.getInt();
      int secondPrev=buffer.getInt();
      int secondNext=buffer.getInt();
      int prop=buffer.getInt();
      if (firstPrev == NO_PREVIOUS_RELATIONSHIP && !nodeSet.remove(firstNode)) {
        throw new IOException("String_Node_Str" + firstNode + "String_Node_Str"+ "String_Node_Str"+ i);
      }
      if (secondPrev == NO_PREVIOUS_RELATIONSHIP && !nodeSet.remove(secondNode)) {
        throw new IOException("String_Node_Str" + secondNode + "String_Node_Str"+ "String_Node_Str"+ i);
      }
      checkRelationshipList(i,firstNode,firstPrev,firstNext,fileChannel,buffer);
      checkRelationshipList(i,secondNode,secondPrev,secondNext,fileChannel,buffer);
      if (prop != NO_NEXT_PROPERTY && !propertySet.remove(prop)) {
        throw new IOException("String_Node_Str" + prop + "String_Node_Str"+ i);
      }
      if (!relTypeSet.contains(type)) {
        throw new IOException("String_Node_Str" + type + "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);
  fileChannel.close();
  System.out.println("String_Node_Str");
}