code: private static Map<TextBlock, Integer> createIndexOfDuplicatedTextBlocks(Iterable<Duplication> duplications) {
      return extractAllDuplicatedTextBlocks(duplications)
        .stream().sorted()
        .collect(Collectors.toMap(e -> e, new TextBlockIndexGenerator(), (a, b) -> a, LinkedHashMap::new));
    }
docs: <p>
  This method uses the natural order of TextBlocks to ensure that given the same set of TextBlocks, they get the same
  index. It avoids false detections of changes in {@link DbFileSources.Line#getDuplicationList()}.
  </p>