pub struct VerifiedPair {
pub members: Vec<usize>,
pub canonical: usize,
pub fingerprint: CloneGroupFingerprint,
pub similarity: f64,
pub breakdown: Option<SimilarityBreakdown>,
pub class: CloneClass,
pub confidence: Confidence,
pub boilerplate: Option<Boilerplate>,
pub width_family: bool,
}Expand description
A verified clone relation between two contents that no reported group could hold.
The two contents are clones of each other by the judge’s own verdict; what they are not is members of one set whose every pair is a clone, which is what a group asserts. Similarity is not transitive, so a unit can be a clone of two others that are not clones of each other, and a partition into groups can keep only one of those relations. The other is evidence the judge accepted, and it leaves the analysis here rather than being dropped.
The entry describes contents, not one pair of places. Where a codebase holds eight copies of one content and eight of another, the judge reaches the same verdict about all sixty-four crossings of them, and reporting sixty-four entries states one fact sixty-four times — all of them under one identity, because a clone id is composed from member content and two entries over the same two contents cannot differ. So every unit the folded verdicts touched is a member here, and there is one entry per pair of contents.
Fields§
§members: Vec<usize>Every unit the folded verdicts touched, in unit-index order.
canonical: usizeWhich member is the canonical instance. Which content is canonical follows content order, so it does not depend on where either was found; among the occurrences of that content the first in member order stands for it, and they are interchangeable by construction.
fingerprint: CloneGroupFingerprintThe relation’s stable, position-free clone id, composed exactly as a group’s is: a pair is a group of two contents, and nothing about its identity should say otherwise.
similarity: f64The strongest composite similarity among the folded verdicts.
breakdown: Option<SimilarityBreakdown>Per-dimension evidence for the weakest accepted crossing represented by this pair. It is absent only for callers that constructed a scalar edge without verifier evidence.
class: CloneClassWhat the judge classified the relation as.
confidence: ConfidenceThe judge’s confidence in that classification.
boilerplate: Option<Boilerplate>The boilerplate category shared by the relation’s members, when one category dominates them under the same policy used for normal groups.
width_family: boolWhether the relation is one routine written once per integer width.
Implementations§
Trait Implementations§
Source§impl Clone for VerifiedPair
impl Clone for VerifiedPair
Source§fn clone(&self) -> VerifiedPair
fn clone(&self) -> VerifiedPair
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more