Skip to main content

recompute_stats

Function recompute_stats 

Source
pub fn recompute_stats(report: &DuplicationReport) -> DuplicationStats
Expand description

Recompute duplication statistics after clone groups have been filtered.

Uses per-file line deduplication, matching the detector’s stats model, so overlapping clone instances do not inflate the duplicated line count.

clone_families is read from report.clone_families, so a scope filter must call refresh_clone_families before this. A presentation cap such as --top must not call this at all: it truncates the arrays while stats keeps describing the corpus the run measured.