docs: private Optional<ScmInfo> generateAndMergeDb(Component file, boolean keepAuthorAndRevision) {
      Optional<DbScmInfo> dbInfoOpt = scmInfoDbLoader.getScmInfo(file);
      if (!dbInfoOpt.isPresent()) {
        return generateScmInfoForAllFile(file);
      }
  
      ScmInfo scmInfo = keepAuthorAndRevision ? dbInfoOpt.get() : removeAuthorAndRevision(dbInfoOpt.get());
      boolean fileUnchanged = file.getStatus() == Status.SAME && sourceHashRepository.getRawSourceHash(file).equals(dbInfoOpt.get().fileHash());
  
      if (fileUnchanged) {
        return Optional.of(scmInfo);
      }
  
      // generate date for new/changed lines
      int[] matchingLines = sourceLinesDiff.computeMatchingLines(file);
  
      return Optional.of(GeneratedScmInfo.create(analysisMetadata.getAnalysisDate(), matchingLines, scmInfo));
    }