Program: 52214
Project: 52214
Buggy source:
/** 
 * Moves the position to the   {@code index}The indexes are stored in many excerpts, so the index2index tells chronicle where ( in other words the address of where ) the root first level targetIndex is stored. The indexing works like a tree, but only 2 levels deep, the root of the tree is at index2index ( this first level targetIndex is 1MB in size and there is only one of them, it only holds the addresses of the second level indexes, there will be many second level indexes ( created on demand ), each is about 1MB in size  (this second level targetIndex only stores the position of every 64th excerpt), so from every 64th excerpt a linear scan occurs. The indexes are only built when the indexer is run, this could be on a background thread. Each targetIndex is created into chronicle as an excerpt.
 * @param wire  the data structure we are navigating
 * @param index the index we wish to move to
 * @return the position of the {@code targetIndex}  or -1 if the index can not be found
 */
public long moveToIndex(@NotNull final Wire wire,final long index){
  final LongArrayValues array=this.longArray.get();
  final long indexToIndex0=indexToIndex(wire.bytes());
  final Bytes<?> bytes=wire.bytes();
  bytes.readLimit(indexContext.capacity()).readPosition(indexToIndex0);
  long startIndex=((index / 64L)) * 64L;
  try (@NotNull final DocumentContext documentContext0=wire.readingDocument()){
    if (!documentContext0.isPresent())     throw new IllegalStateException("String_Node_Str");
    if (documentContext0.isData())     throw new IllegalStateException("String_Node_Str" + "String_Node_Str" + indexToIndex0 + "String_Node_Str");
    final LongArrayValues primaryIndex=array(wire,array);
    long primaryOffset=toAddress0(index);
    do {
      long secondaryAddress=primaryIndex.getValueAt(primaryOffset);
      if (secondaryAddress == 0) {
        startIndex-=(1 << 23L);
        primaryOffset--;
        System.out.println("String_Node_Str" + "String_Node_Str");
        continue;
      }
      final Wire wire1=wireType.apply(indexContext.readPosition(secondaryAddress));
      final long limit=wire1.bytes().readLimit();
      try (@NotNull final DocumentContext documentContext1=wire1.readingDocument()){
        if (!documentContext1.isPresent())         throw new IllegalStateException("String_Node_Str");
        if (documentContext1.isData())         continue;
        final LongArrayValues array1=array(wire1,array);
        long secondaryOffset=toAddress1(index);
        do {
          long fromAddress=array1.getValueAt(secondaryOffset);
          if (fromAddress == 0) {
            secondaryOffset--;
            startIndex-=64;
            System.out.println("String_Node_Str");
            continue;
          }
          if (index == startIndex) {
            return fromAddress;
          }
 else {
            wire1.bytes().readLimit(limit);
            return linearScan(wire1,index,startIndex,fromAddress);
          }
        }
 while (secondaryOffset >= 0);
      }
       break;
    }
 while (primaryOffset >= 0);
  }
   return -1;
}

Fixed version (ground truth):
/** 
 * Moves the position to the   {@code index}The indexes are stored in many excerpts, so the index2index tells chronicle where ( in other words the address of where ) the root first level targetIndex is stored. The indexing works like a tree, but only 2 levels deep, the root of the tree is at index2index ( this first level targetIndex is 1MB in size and there is only one of them, it only holds the addresses of the second level indexes, there will be many second level indexes ( created on demand ), each is about 1MB in size  (this second level targetIndex only stores the position of every 64th excerpt), so from every 64th excerpt a linear scan occurs. The indexes are only built when the indexer is run, this could be on a background thread. Each targetIndex is created into chronicle as an excerpt.
 * @param wire  the data structure we are navigating
 * @param index the index we wish to move to
 * @return the position of the {@code targetIndex}  or -1 if the index can not be found
 */
public long moveToIndex(@NotNull final Wire wire,final long index){
  final LongArrayValues array=this.longArray.get();
  final long indexToIndex0=indexToIndex(wire.bytes());
  System.out.println("String_Node_Str" + indexToIndex0);
  final Bytes<?> bytes=wire.bytes();
  bytes.readLimit(indexContext.capacity()).readPosition(indexToIndex0);
  long startIndex=((index / 64L)) * 64L;
  try (@NotNull final DocumentContext documentContext0=wire.readingDocument()){
    if (!documentContext0.isPresent())     throw new IllegalStateException("String_Node_Str");
    if (documentContext0.isData())     throw new IllegalStateException("String_Node_Str" + "String_Node_Str" + indexToIndex0 + "String_Node_Str");
    final LongArrayValues primaryIndex=array(wire,array);
    long primaryOffset=toAddress0(index);
    do {
      long secondaryAddress=primaryIndex.getValueAt(primaryOffset);
      if (secondaryAddress == 0) {
        startIndex-=(1 << 23L);
        primaryOffset--;
        System.out.println("String_Node_Str" + "String_Node_Str");
        continue;
      }
      wire.bytes().readPosition(secondaryAddress);
      try (@NotNull final DocumentContext documentContext1=wire.readingDocument()){
        if (!documentContext1.isPresent())         throw new IllegalStateException("String_Node_Str");
        if (documentContext1.isData())         continue;
        final LongArrayValues array1=array(wire,array);
        long secondaryOffset=toAddress1(index);
        do {
          long fromAddress=array1.getValueAt(secondaryOffset);
          if (fromAddress == 0) {
            secondaryOffset--;
            startIndex-=64;
            System.out.println("String_Node_Str");
            continue;
          }
          if (index == startIndex) {
            return fromAddress;
          }
 else {
            wire.bytes().readLimit(bounds.getWritePosition());
            return linearScan(wire,index,startIndex,fromAddress);
          }
        }
 while (secondaryOffset >= 0);
      }
       break;
    }
 while (primaryOffset >= 0);
  }
   return -1;
}