code: 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));
    }
docs: Get SCM information in the DB, if it exists, and use it for lines that didn't change. It optionally removes author and revision
  information (only keeping change dates).
  If the information is not present in the DB or some lines don't match existing lines in the DB,
  we generate change dates based on the analysis date.