code: private void validateSegments(List<LogSegment> segments) {
          synchronized (lock) {
              for (int i = 0; i < segments.size() - 1; i++) {
                  LogSegment curr = segments.get(i);
                  LogSegment next = segments.get(i + 1);
                  if (curr.start() + curr.size() != next.start()) {
                      throw new IllegalStateException("The following segments don't validate: " + curr.getFile()
                              .getAbsolutePath() + ", " + next.getFile().getAbsolutePath());
                  }
              }
          }
      }
docs: Check that the ranges and sizes add up, otherwise we have lost some data somewhere