pub struct GroupFacts {Show 17 fields
pub clone_type: CloneClass,
pub scope: CloneScope,
pub instances: u64,
pub smallest_member_tokens: u64,
pub largest_member_tokens: u64,
pub min_pairwise: f64,
pub files: u64,
pub directories: u64,
pub languages: u64,
pub min_clone_tokens: u64,
pub identifier_jaccard: Option<f64>,
pub api_similarity: Option<f64>,
pub has_loop: Option<bool>,
pub has_dynamic_allocation: Option<bool>,
pub call_count: Option<u64>,
pub churn: Option<f64>,
pub ownership_spread: Option<f64>,
}Expand description
What the ranking reads about one clone group.
Every field is a fact the scan established, not a judgement: the judgements
are what rank derives from them. The reserved fields are inputs the
requirements name that no analysis mode can supply yet; they are declared
here and reported as absent rather than defaulted, so that the day a
backend supplies one, nothing has to be told the difference between a
missing value and a zero.
Fields§
§clone_type: CloneClassHow closely the members match.
scope: CloneScopeWhether the members are whole units or runs inside them.
instances: u64Occurrences in the group.
smallest_member_tokens: u64Token count of the smallest occurrence.
The smallest rather than the largest: a group is only as convincing as its least substantial member, since that is the one that could most easily have matched by coincidence.
largest_member_tokens: u64Token count of the largest occurrence, which is what a reader would have to read, keep in step, or lift out.
min_pairwise: f64Weakest pairwise similarity across the group. Exactly 1 for a group matched on identical content.
files: u64Distinct files the occurrences sit in.
directories: u64Distinct directories the occurrences sit in.
languages: u64Distinct languages the occurrences are written in.
One, in every mode that exists today: content fingerprints are computed per language, so no group can span two. The input is read anyway, so that a cross-language frontend starts affecting the ranking by being implemented rather than by also being wired in here.
min_clone_tokens: u64The run’s minimum clone length, which the sizes above are read against.
identifier_jaccard: Option<f64>Weakest raw identifier-set agreement against the canonical member.
Structural whole-unit analysis supplies this before normalization loses the spelling. Other modes leave it absent rather than treating an unavailable measurement as disagreement.
api_similarity: Option<f64>Weakest call-surface agreement the analysis measured.
None means neither side offered a call surface to compare, not that
their call surfaces agree.
has_loop: Option<bool>Whether every member has a loop, when Structural mode measured bodies.
has_dynamic_allocation: Option<bool>Whether every member calls a recognised allocation API.
call_count: Option<u64>Fewest call sites in any member, when Structural mode measured bodies.
churn: Option<f64>How often the duplicated code changed. Reserved: this needs repository history, which no analysis mode reads yet.
ownership_spread: Option<f64>How many people own the copies. Reserved, on the same footing as
Self::churn.
Trait Implementations§
Source§impl Clone for GroupFacts
impl Clone for GroupFacts
Source§fn clone(&self) -> GroupFacts
fn clone(&self) -> GroupFacts
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more