Skip to main content

DuplicationStats

Type Alias DuplicationStats 

Source
pub type DuplicationStats = DuplicationStats;

Aliased Type§

pub struct DuplicationStats {
    pub total_files: usize,
    pub files_with_clones: usize,
    pub total_lines: usize,
    pub duplicated_lines: usize,
    pub total_tokens: usize,
    pub duplicated_tokens: usize,
    pub clone_groups: usize,
    pub clone_instances: usize,
    pub duplication_percentage: f64,
    pub clone_groups_below_min_occurrences: usize,
}

Fields§

§total_files: usize

Total files analyzed.

§files_with_clones: usize

Files containing at least one clone instance.

§total_lines: usize

Total lines across all analyzed files.

§duplicated_lines: usize

Lines that are part of at least one clone.

§total_tokens: usize

Total tokens across all analyzed files.

§duplicated_tokens: usize

Tokens that are part of at least one clone.

§clone_groups: usize

Number of clone groups in the reported clone_groups[] array. Matches clone_groups[].length post minOccurrences filtering; the count of groups hidden by the filter is exposed in clone_groups_below_min_occurrences.

§clone_instances: usize

Total clone instances across all reported groups. Matches the sum of clone_groups[].locations[].length post minOccurrences filtering.

§duplication_percentage: f64

Percentage of duplicated lines (0.0 to 100.0). Always reflects the FULL corpus, computed BEFORE the minOccurrences filter so trend lines and threshold gates stay stable when the filter changes.

§clone_groups_below_min_occurrences: usize

Number of clone groups hidden by duplicates.minOccurrences. Absent (or 0) when the filter is at its default of 2 and nothing was hidden. Pre-filter clone group count = clone_groups + clone_groups_below_min_occurrences.