Repository Analysis

darrylmorley/whatcable

macOS menu bar app that tells you, in plain English, what each USB-C cable plugged into your Mac can actually do

6.1 Low AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of darrylmorley/whatcable, a Swift project with 8,046 GitHub stars. SynthScan v2.0 examined 113,971 lines of code across 356 source files, recording 685 pattern matches distributed across 7 syntactic categories. The overall adjusted score of 6.1 places this repository in the Low AI signal band.

The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).

6.1
Adjusted Score
6.1
Raw Score
100%
Time Factor
2026-07-31
Last Push
8.0K
Stars
Swift
Language
114.0K
Lines of Code
356
Files
685
Pattern Hits
2026-08-02
Scan Date
0.00
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

Longitudinal tracking requires multiple scan runs. Once this repository is re-scanned after new commits land, this chart will visualise how the synthetic code signal evolves over time — enabling you to detect whether AI authorship is growing, stabilising, or being actively corrected by human engineers.

No multi-scan history yet — run the scanner again to build trend data.

Severity Breakdown

Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.

CRITICAL 0HIGH 0MEDIUM 4LOW 681

Directory Score Breakdown

This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.

Pattern Findings

The scanner identified 685 distinct pattern matches across 7 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.

Over-Commented Block666 hits · 666 pts
SeverityFileLineSnippetContext
LOW.gitleaks.toml1# gitleaks configuration for WhatCable.COMMENT
LOWprobes/test-kit/25_usb_bos_descriptor.c21 * Compile:COMMENT
LOWprobes/test-kit/19_pdo_decode_and_usb3_watch.c1// Decode raw PDO (Power Data Object) integers from PortControllerPortPDOCOMMENT
LOWprobes/test-kit/19_pdo_decode_and_usb3_watch.c21//COMMENT
LOWprobes/test-kit/36_xhci_port_map.c1// Map each USB host-controller port to its physical USB-C port number andCOMMENT
LOWprobes/test-kit/36_xhci_port_map.c101// probe 35 (35_hpm_port_uuid.c). @N alone is confirmed unreliable as aCOMMENT
LOWprobes/test-kit/35_hpm_port_uuid.c1// Map each USB-C / MagSafe port to its power-controller identity.COMMENT
LOWprobes/test-kit/17_deep_property_dump.c1// Deep dump of every property on every service in the HPM/IOPort tree,COMMENT
LOWprobes/test-kit/40_hub_port_statistics.c1// Dump every USB hub node (AppleUSB20Hub / AppleUSB30Hub) and per-downstream-portCOMMENT
LOWprobes/test-kit/40_hub_port_statistics.c21// descriptor strings. Those descriptor strings can include the model / productCOMMENT
LOWprobes/test-kit/40_hub_port_statistics.c41#include <CoreFoundation/CoreFoundation.h>COMMENT
LOWprobes/test-kit/26_displayport_altmode.c1// Capture connected-display capability as a tree, from the real Apple SiliconCOMMENT
LOWprobes/test-kit/26_displayport_altmode.c21// (DisplayVendorID / DisplayProductID / ManufacturerID), manufacture date, andCOMMENT
LOWprobes/test-kit/04_raw_registry_dump.c1// Dump EVERY property from a wide set of USB-C / Thunderbolt / port-controllerCOMMENT
LOWprobes/test-kit/04_raw_registry_dump.c21#include <IOKit/IOKitLib.h>COMMENT
LOWprobes/test-kit/04_raw_registry_dump.c41COMMENT
LOWprobes/test-kit/37_tb_tunnel_port_map.c1// Map a Thunderbolt-tunnelled USB device back to its physical USB-C port.COMMENT
LOWprobes/test-kit/37_tb_tunnel_port_map.c21// is: tunnelled device -> AppleUSBXHCITR -> apciecN ==(by index)== acioN ->COMMENT
LOWprobes/test-kit/37_tb_tunnel_port_map.c341 // Appended 2026-07: HPM UUID map (side-table join by @N).COMMENT
LOWprobes/test-kit/38_usb_device_tree.c1// Capture the IOUSB device tree with the ancestor walk WhatCable's classifierCOMMENT
LOWprobes/test-kit/38_usb_device_tree.c21// Vendor Name, USB Serial Number; UsbIOPort and USBPortType on ancestors).COMMENT
LOWprobes/test-kit/38_usb_device_tree.c121 if (portType >= 0) printf(" USBPortType=%lld", portType);COMMENT
LOWTests/WhatCableCoreTests/VendorDBTests.swift41COMMENT
LOW…atCableCoreTests/LocalizedBundleConcurrencyTests.swift1import FoundationCOMMENT
LOWTests/WhatCableCoreTests/TRMTransportTests.swift101 #expect(t.transportType == "USB2")COMMENT
LOW…ts/WhatCableCoreTests/ThunderboltProbeSweepTests.swift1import FoundationCOMMENT
LOW…ts/WhatCableCoreTests/ThunderboltProbeSweepTests.swift421 #expect(port?.adapterType == .lane)COMMENT
LOWTests/WhatCableCoreTests/CableCertLookupTests.swift1import FoundationCOMMENT
LOWTests/WhatCableCoreTests/CableCertLookupTests.swift41COMMENT
LOW…s/WhatCableCoreTests/PortSummaryCorpusSweepTests.swift1import FoundationCOMMENT
LOW…s/WhatCableCoreTests/PortSummaryCorpusSweepTests.swift21/// probe capture (never a decodable array), so `PowerSource.options` isCOMMENT
LOW…sts/WhatCableCoreTests/PowerSourceSynthesisTests.swift441 }COMMENT
LOW…sts/WhatCableCoreTests/PowerSourceSynthesisTests.swift501 // Rung a is skipped entirely (not attempted with an out-of-range orCOMMENT
LOW…bleCoreTests/PowerSourceSynthesisProbeSweepTests.swift1import FoundationCOMMENT
LOW…bleCoreTests/PowerSourceSynthesisProbeSweepTests.swift421 }COMMENT
LOWTests/WhatCableCoreTests/AppInfoVersionTests.swift1import TestingCOMMENT
LOWTests/WhatCableCoreTests/DisplayDiagnosticTests.swift81 // MARK: - Core verdictsCOMMENT
LOWTests/WhatCableCoreTests/DisplayDiagnosticTests.swift261 func parsesRate() {COMMENT
LOWTests/WhatCableCoreTests/DisplayDiagnosticTests.swift301 @Test("4K240 at the DP ceiling (4-lane HBR3) reads as compression, not a warning")COMMENT
LOWTests/WhatCableCoreTests/DisplayDiagnosticTests.swift561 // (lanes < maxLanes), so the existing .compressionPlausible block doesCOMMENT
LOWTests/WhatCableCoreTests/DisplayDiagnosticTests.swift641 // threshold, so the helper would NOT call DSC. But the live mode isCOMMENT
LOWTests/WhatCableCoreTests/DisplayDiagnosticTests.swift661 @Test("nil bpc falls back to the 24bpp default (backwards compatible)")COMMENT
LOWTests/WhatCableCoreTests/PDVDOTests.swift41COMMENT
LOWTests/WhatCableCoreTests/PDVDOTests.swift61COMMENT
LOWTests/WhatCableCoreTests/PDVDOTests.swift101 // 1 << 23 = 0x0080_0000COMMENT
LOWTests/WhatCableCoreTests/PDVDOTests.swift141 // speed=3 (USB4 Gen3), current=2 (5A) -> 2<<5=0x40COMMENT
LOWTests/WhatCableCoreTests/PDVDOTests.swift181 func cheap_USB2_3A() {COMMENT
LOWTests/WhatCableCoreTests/PDVDOTests.swift201 // But power is clamped to USB-PD's 48V ceiling: 48 * 5 = 240, not 250.COMMENT
LOWTests/WhatCableCoreTests/PDVDOTests.swift521 }COMMENT
LOWTests/WhatCableCoreTests/PDVDOTests.swift561 #expect(v2.shutdownTempC == 120)COMMENT
LOWTests/WhatCableCoreTests/PDVDOTests.swift581 let v2 = PDVDO.decodeActiveCableVDO2(0)COMMENT
LOWTests/WhatCableCoreTests/USBDeviceBillboardTests.swift41 // bDeviceClass 9 is a USB hub, the common case next to a dock.COMMENT
LOW…tCableCoreTests/PowerMonitorSnapshotCodableTests.swift61 #expect(snapshot(externalConnected: true, batteryInstalled: true, chargerAttached: true).externalPowerAbsent == COMMENT
LOWTests/WhatCableCoreTests/USBDeviceTreeTests.swift141 let tree = USBDeviceNode.buildTree(from: [grandchild, child2, hub, child1])COMMENT
LOW…WhatCableCoreTests/ConnectedDeviceTreeChainTests.swift1import FoundationCOMMENT
LOW…WhatCableCoreTests/ConnectedDeviceTreeChainTests.swift201 let rows = referenceRows(hubs: .endpointsOnly)COMMENT
LOWTests/WhatCableCoreTests/ConnectedDeviceTreeTests.swift1import FoundationCOMMENT
LOWTests/WhatCableCoreTests/ConnectedDeviceTreeTests.swift601 #expect(labels.contains("USB bus 0x20"))COMMENT
LOWTests/WhatCableCoreTests/ConnectedDeviceTreeTests.swift701 #expect(rows[1].depth == 1)COMMENT
LOWTests/WhatCableCoreTests/ConnectedDeviceTreeTests.swift941 // checks is not a check" rule.COMMENT
606 more matches not shown…
AI Slop Vocabulary3 hits · 9 pts
SeverityFileLineSnippetContext
MEDIUM…eTests/ReferenceScenarios/JoeshawDaisyChainTests.swift26/// not sensitive to that field, so this test is robust to thatCOMMENT
MEDIUMSources/WhatCable/Services/Installer.swift223 // so the parse is robust to that (and to any future change in whichCOMMENT
MEDIUM…rces/WhatCableWidget/Cable/CableTimelineProvider.swift56 /// discards the objects. This is simpler and more robust than keeping aCOMMENT
Deep Nesting7 hits · 7 pts
SeverityFileLineSnippetContext
LOWscripts/check-duplicate-readers.py250CODE
LOWscripts/check-duplicate-readers.py286CODE
LOWscripts/check-localisation.py637CODE
LOWscripts/check-localisation.py710CODE
LOWscripts/check-localisation.py758CODE
LOWscripts/check-localisation.py1189CODE
LOWscripts/check-localisation.py1266CODE
Example Usage Blocks4 hits · 6 pts
SeverityFileLineSnippetContext
LOWscripts/bump-formula.sh5# Usage:COMMENT
LOWscripts/bump-cask.sh4# Usage:COMMENT
LOWscripts/beta-release.sh4# Usage:COMMENT
LOWscripts/release.sh4# Usage:COMMENT
Hyper-Verbose Identifiers3 hits · 3 pts
SeverityFileLineSnippetContext
LOWscripts/check-localisation.py758def scan_triple_quoted_literal(text: str, start: int):CODE
LOWscripts/check-localisation.py1095def build_string_returning_funcs(all_contents):CODE
LOWscripts/check-localisation.py1189def check_stringsdict_structure(target, lang, path, failures):CODE
Slop Phrases1 hit · 2 pts
SeverityFileLineSnippetContext
MEDIUMdocs/blog/feed.xml259&lt;p&gt;The cable knows what it is. There&#39;s a chip inside the connector called an e-marker that declares its capabiCODE
Fake / Example Data1 hit · 0 pts
SeverityFileLineSnippetContext
LOWscripts/build-cable-db.swift551 "Acme Ltd info@example.co.uk", "Acme Ltd"),STRING