code: public void repairIndex() throws IOException {
          byte[] currentLargestKey = new byte[keySize];
          int maxChunk = getChunkIndex(getFilledUpFromContentStart());
          for (int currentChunkId = 0; currentChunkId <= maxChunk; currentChunkId++) {
              long currentOffset = (currentChunkId + 1) * getChunkSize() - elementSize;
              if (currentOffset < getFilledUpFromContentStart()) {
                  read(currentOffset, currentLargestKey);
              } else {
                  read(getFilledUpFromContentStart() - elementSize, currentLargestKey);
              }
              getIndex().setLargestKey(currentChunkId, currentLargestKey);
          }
      }
docs: This method repairs the index. It runs over all chunks and writes the largest element into the
  {@link IndexForHeaderIndexFile}. This method should be called, if the file was not closed softly (
  {@link #isSoftlyClosed()}).
  
  @throws IOException