Struct CloneCouplingRow
pub struct CloneCouplingRow {Show 19 fields
pub clone_group_id: u32,
pub fingerprint: String,
pub file_a: String,
pub file_b: String,
pub entity_a: String,
pub entity_b: String,
pub start_line_a: u32,
pub end_line_a: u32,
pub start_line_b: u32,
pub end_line_b: u32,
pub node_count: u32,
pub similarity: f64,
pub shared_revs: u32,
pub support_a: u32,
pub support_b: u32,
pub degree_pct: f64,
pub p_value: f64,
pub combined_score: f64,
pub at_risk: bool,
}Expand description
One clone-coupling finding. A pair of files from the same clone family
that also co-change at Fisher-significant rates. Sorted by combined_score
desc so PR-review tooling surfaces the most actionable findings first.
Fields§
§clone_group_id: u32clone_group_id shared by file_a and file_b.
fingerprint: StringAST structural digest (hex) of the shared clone fingerprint.
file_a: String§file_b: String§entity_a: StringFunction name in file_a (may be empty for closures / anonymous fns).
entity_b: String§start_line_a: u32§end_line_a: u32§start_line_b: u32§end_line_b: u32§node_count: u32Number of AST nodes in each member’s fingerprint (shared by both — they’re in the same clone family).
similarity: f641.0 for T1+T2 exact matches; < 1.0 for Type-3 near-miss.
Commits where both files co-changed.
support_a: u32Total commits touching file_a.
support_b: u32Total commits touching file_b.
degree_pct: f64shared_revs / max(support_a, support_b) ∈ [0, 1].
p_value: f64Fisher exact test p-value. Lower = more confident.
combined_score: f64similarity × degree_pct × (1 − p_value) ∈ [0, 1]. Ranks the row;
SARIF security-severity is derived from this × 10.
at_risk: boolT9: true when either file_a or file_b is currently a
knowledge-island file (departed primary author + no substantial
other owners). Live clones AT-RISK files are the most actionable
debt findings: the clone is already a refactoring liability and
the people who could refactor it have already left.
Computed by intersecting clone-coupling output with the
knowledge-islands analysis result set. Honors the same
--departed-threshold-days and --age-time-now flags as the
standalone analysis. No knowledge-islands data → all rows have
at_risk = false (graceful degradation when the repo has no
departed contributors).
Trait Implementations§
§impl Clone for CloneCouplingRow
impl Clone for CloneCouplingRow
§fn clone(&self) -> CloneCouplingRow
fn clone(&self) -> CloneCouplingRow
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for CloneCouplingRow
impl Debug for CloneCouplingRow
§impl Serialize for CloneCouplingRow
impl Serialize for CloneCouplingRow
Auto Trait Implementations§
impl Freeze for CloneCouplingRow
impl RefUnwindSafe for CloneCouplingRow
impl Send for CloneCouplingRow
impl Sync for CloneCouplingRow
impl Unpin for CloneCouplingRow
impl UnsafeUnpin for CloneCouplingRow
impl UnwindSafe for CloneCouplingRow
Blanket Implementations§
impl<T> Allocation for T
impl<T> Allocation for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more