Skip to main content

GroupDetail

Struct GroupDetail 

Source
pub struct GroupDetail {
    pub fingerprint: CloneGroupFingerprint,
    pub member_breakdowns: Vec<SimilarityBreakdown>,
    pub cohesion_breakdown: SimilarityBreakdown,
    pub identifier_jaccard: f64,
    pub body_materiality: BodyMateriality,
    pub boilerplate: Option<Boilerplate>,
    pub test_code: bool,
    pub test_code_evidence: Option<TestCodeEvidence>,
    pub width_family: bool,
}
Expand description

Reporting detail for one clone group, parallel to the group at the same index in StructuralReport::groups.

Fields§

§fingerprint: CloneGroupFingerprint

The group’s stable, position-free fingerprint (its clone id).

§member_breakdowns: Vec<SimilarityBreakdown>

The similarity breakdown of the medoid against each member, parallel to the group’s members (the medoid’s own entry is a perfect self-match).

§cohesion_breakdown: SimilarityBreakdown

The verifier breakdown for the actual weakest pair in the cohesive group. This is the evidence that establishes min_pairwise.

§identifier_jaccard: f64

Smallest raw-identifier Jaccard agreement against the canonical unit. It is evidence only: detection, clone class, and priority ignore it.

§body_materiality: BodyMateriality

Conservative evidence that every member carries a material body.

This is not a code-size estimate. It records only syntactic work that a maintainer must understand while changing each copy.

§boilerplate: Option<Boilerplate>

The dominant boilerplate shape of the whole group, when at least four fifths of its members match it. The per-member classifications remain available in reports so the exceptional bodies are never hidden.

§test_code: bool

Whether every member is test code. A group with even one member outside the suite is duplication between test and tested code, which is the interesting case and must not be ranked with the suite.

§test_code_evidence: Option<TestCodeEvidence>

The aggregate evidence for Self::test_code.

Marker takes precedence when any member has it; path is named only when every member is path-derived. None means at least one member is not test code.

§width_family: bool

Whether the group reads as one routine written once per integer width.

A Boilerplate category is a judgement about one body, aggregated to the group only when every member agrees. This is not: it is a statement about how two bodies differ, which no member can carry on its own, so it sits beside the category rather than inside it.

Trait Implementations§

Source§

impl Clone for GroupDetail

Source§

fn clone(&self) -> GroupDetail

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for GroupDetail

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for GroupDetail

Source§

fn eq(&self, other: &GroupDetail) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for GroupDetail

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.