Skip to main content

GroupFacts

Struct GroupFacts 

Source
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: CloneClass

How closely the members match.

§scope: CloneScope

Whether the members are whole units or runs inside them.

§instances: u64

Occurrences in the group.

§smallest_member_tokens: u64

Token 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: u64

Token count of the largest occurrence, which is what a reader would have to read, keep in step, or lift out.

§min_pairwise: f64

Weakest pairwise similarity across the group. Exactly 1 for a group matched on identical content.

§files: u64

Distinct files the occurrences sit in.

§directories: u64

Distinct directories the occurrences sit in.

§languages: u64

Distinct 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: u64

The 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

Source§

fn clone(&self) -> GroupFacts

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 Copy for GroupFacts

Source§

impl Debug for GroupFacts

Source§

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

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

impl PartialEq for GroupFacts

Source§

fn eq(&self, other: &GroupFacts) -> 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 GroupFacts

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.