AI Slop Code RIsk Monitor

apple/swift-collections

Commonly used data structures for Swift

12.0 Moderate pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for apple/swift-collections, a Swift project with 4,519 GitHub stars. SynthScan examined 151,201 lines of code across 839 source files, recording 1803 pattern matches distributed across 6 syntactic categories. The legacy adjusted pattern signal is 12.0 (Moderate pattern signal); it is not an authorship estimate.

Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.

12.0
Adjusted Signal
12.0
Raw Pattern Score
100%
Time Factor
2026-10-09
Last Push
4.5K
Stars
Swift
Language
151.2K
Lines of Code
839
Files
1.8K
Pattern Hits
2026-10-12
Scan Date
0.00
HC Hit Rate

Risk Review · v3

Use each vector to guide manual verification of the underlying findings.

Cognitive Ownership Risk 43.7/100 · MEDIUM

Can maintainers explain intent, assumptions, and trade-offs? 1784 finding(s).

Hallucinated Dependency & Supply Chain Risk 0.4/100 · LOW

Are imports declared and package/API names verified? 4 finding(s).

Agent Over-Engineering Ratio 2.1/100 · LOW

Are wrappers, guards, and repeated structures necessary? 15 finding(s).

PR Review Velocity Impact 45.6/100 · MEDIUM

Which changes need focused human review? 1803 finding(s).

What These Metrics Mean

Adjusted Signal
Legacy pattern score normalized per 1,000 scanned lines and multiplied by the repository-level time factor. It is not an estimate of AI authorship.
Raw Pattern Score
Sum of severity- and context-weighted pattern findings before applying the time factor.
Time Factor
A coarse multiplier based on repository last-push metadata. It does not identify when individual code was written.
Pattern Hits
Count of configured pattern findings. Review each location and surrounding code before acting.
HC Hit Rate
High- and critical-severity findings per scanned file. Severity is a configured detector weight, not proof of a vulnerability or authorship.
Lines / Files
Scan coverage denominators used by the legacy normalized score.

Pattern-Signal History

This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.

Severity Breakdown

Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.

CRITICAL 1HIGH 0MEDIUM 15LOW 1787

Directory Score Breakdown

This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.

Pattern Findings

The scanner identified 1803 distinct pattern matches across 6 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. 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 configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.

Over-Commented Block1778 hits · 1732 pts
SeverityFileLineSnippetContext
LOWPackage@swift-6.2.swift1// swift-tools-version:6.2COMMENT
LOWPackage@swift-6.2.swift61 // the hash table itself. This setting should never be enabled in productionCOMMENT
LOWCMakeLists.txt1##===----------------------------------------------------------------------===##COMMENT
LOWPackage.swift1// swift-tools-version:6.4COMMENT
LOWPackage.swift61 // the hash table itself. This setting should never be enabled in productionCOMMENT
LOWDocumentation/Container-design.md1521### `protocol Drain`COMMENT
LOWDocumentation/Container-design.md1541 /// underlying consumable sequence. As soon as the sequence has run out ofCOMMENT
LOWDocumentation/Container-design.md1561 /// - Returns: An input span of at most the specified maximum count (if any),COMMENT
LOWDocumentation/Container-design.md1781 /// hint for the batch size of appends, to allow bulk operation even ifCOMMENT
LOW…umentation/Announcement-benchmarks/generate-results.sh1#!/bin/shCOMMENT
LOWcmake/modules/CMakeLists.txt1##===----------------------------------------------------------------------===##COMMENT
LOW…ts/SortedSet/SortedSet+SetAlgebra Sequence Tests.swift1//===----------------------------------------------------------------------===//COMMENT
LOW…SortedCollectionsTests/SortedSet/SortedSet Tests.swift1//===----------------------------------------------------------------------===//COMMENT
LOW…onsTests/SortedDictionary/SortedDictionary Utils.swift1//===----------------------------------------------------------------------===//COMMENT
LOW…onsTests/SortedDictionary/SortedDictionary Tests.swift1//===----------------------------------------------------------------------===//COMMENT
LOW…SortedCollectionsTests/BTree/BTree.Builder Tests.swift1//===----------------------------------------------------------------------===//COMMENT
LOW…sts/SortedCollectionsTests/BTree/Node+Join Tests.swift1//===----------------------------------------------------------------------===//COMMENT
LOW…ortedCollectionsTests/BTree/Node+Balancing Tests.swift1//===----------------------------------------------------------------------===//COMMENT
LOWTests/SortedCollectionsTests/BTree/BTree Tests.swift1//===----------------------------------------------------------------------===//COMMENT
LOW…ortedCollectionsTests/BTree/Node+Insertion Tests.swift1//===----------------------------------------------------------------------===//COMMENT
LOWTests/SortedCollectionsTests/BTree/Node Utils.swift1//===----------------------------------------------------------------------===//COMMENT
LOWTests/SortedCollectionsTests/BTree/NodeTests.swift1//===----------------------------------------------------------------------===//COMMENT
LOW…ortedCollectionsTests/BTree/BTree+Deletion Tests.swift1//===----------------------------------------------------------------------===//COMMENT
LOWTests/CollectionsTestSupportTests/UtilitiesTests.swift1//===----------------------------------------------------------------------===//COMMENT
LOW…lectionsTestSupportTests/MinimalTypeConformances.swift1//===----------------------------------------------------------------------===//COMMENT
LOW…ctionsTestSupportTests/IndexRangeCollectionTests.swift1//===----------------------------------------------------------------------===//COMMENT
LOW…/CollectionsTestSupportTests/CombinatoricsChecks.swift1//===----------------------------------------------------------------------===//COMMENT
LOWTests/HashTreeCollectionsTests/Hash.swift1//===----------------------------------------------------------------------===//COMMENT
LOWTests/HashTreeCollectionsTests/Utilities.swift1//===----------------------------------------------------------------------===//COMMENT
LOW…hTreeCollectionsTests/TreeDictionary Smoke Tests.swift1//===----------------------------------------------------------------------===//COMMENT
LOW…shTreeCollectionsTests/TreeDictionary.Keys Tests.swift1//===----------------------------------------------------------------------===//COMMENT
LOW…ts/HashTreeCollectionsTests/TreeDictionary Tests.swift1//===----------------------------------------------------------------------===//COMMENT
LOW…ts/HashTreeCollectionsTests/TreeDictionary Tests.swift1581 }COMMENT
LOW…ts/HashTreeCollectionsTests/TreeDictionary Tests.swift1621 }COMMENT
LOW…ts/HashTreeCollectionsTests/TreeDictionary Tests.swift1641COMMENT
LOW…ts/HashTreeCollectionsTests/TreeDictionary Tests.swift1661 // func test_grouping_initializer() {COMMENT
LOW…ts/HashTreeCollectionsTests/TreeDictionary Tests.swift1681 // "three": 3,COMMENT
LOW…ts/HashTreeCollectionsTests/TreeDictionary Tests.swift1781 expectEqual(d[keys[offset]], values[offset])COMMENT
LOW…ts/HashTreeCollectionsTests/TreeDictionary Tests.swift1801// let (k, v) = d[offset: i]COMMENT
LOW…ts/HashTreeCollectionsTests/TreeDictionary Tests.swift1821// keys.remove(at: offset)COMMENT
LOW…ts/HashTreeCollectionsTests/TreeDictionary Tests.swift1841// var d: TreeDictionary<LifetimeTracked<Int>, LifetimeTracked<Int>> = [:]COMMENT
LOW…ts/HashTreeCollectionsTests/TreeDictionary Tests.swift1861// var (d, keys, values) = tracker.shareableDictionary(keys: 0 ..< count)COMMENT
LOW…ts/HashTreeCollectionsTests/TreeDictionary Tests.swift1881 // var (d, keys, values) = tracker.shareableDictionary(keys: 0 ..< count)COMMENT
LOW…ts/HashTreeCollectionsTests/TreeDictionary Tests.swift1901 // withEvery("isShared", in: [false, true]) { isShared inCOMMENT
LOW…ts/HashTreeCollectionsTests/TreeDictionary Tests.swift1921 // }COMMENT
LOW…ts/HashTreeCollectionsTests/TreeDictionary Tests.swift1941 // expectEqual(v, values[i])COMMENT
LOW…ts/HashTreeCollectionsTests/TreeDictionary Tests.swift1961 // }COMMENT
LOW…ts/HashTreeCollectionsTests/TreeDictionary Tests.swift1981 // }COMMENT
LOW…ts/HashTreeCollectionsTests/TreeDictionary Tests.swift2001 // withHiddenCopies(if: isShared, of: &d) { d inCOMMENT
LOW…ts/HashTreeCollectionsTests/TreeDictionary Tests.swift2021 // withEvery("count", in: 0 ..< 30) { count inCOMMENT
LOW…ts/HashTreeCollectionsTests/TreeDictionary Tests.swift2041 // }COMMENT
LOW…ts/HashTreeCollectionsTests/TreeDictionary Tests.swift2061 // let (k, v) = d[offset: i]COMMENT
LOW…ts/HashTreeCollectionsTests/TreeDictionary Tests.swift2081 // let key = keys[offset]COMMENT
LOW…ts/HashTreeCollectionsTests/TreeDictionary Tests.swift2101 // withLifetimeTracking { tracker inCOMMENT
LOW…ts/HashTreeCollectionsTests/TreeDictionary Tests.swift2121 // }COMMENT
LOW…ts/HashTreeCollectionsTests/TreeDictionary Tests.swift2141 // expectEqual(k, keys[count - 1 - offset + i])COMMENT
LOW…ts/HashTreeCollectionsTests/TreeDictionary Tests.swift2161 // d.modifyValue(forKey: key, default: fallback) { value inCOMMENT
LOW…ts/HashTreeCollectionsTests/TreeDictionary Tests.swift2181 // withLifetimeTracking { tracker inCOMMENT
LOW…ts/HashTreeCollectionsTests/TreeDictionary Tests.swift2201 // }COMMENT
LOW…ts/HashTreeCollectionsTests/TreeDictionary Tests.swift2221 // values[offset] = replacementCOMMENT
1718 more matches not shown…
Decorative Section Separators15 hits · 64 pts
SeverityFileLineSnippetContext
MEDIUM⚡…s/OrderedCollections/HashTable/_Hashtable+Header.swift27 /// ├──────────────────────────────────────────────┼────────┤COMMENT
MEDIUM⚡…s/OrderedCollections/HashTable/_Hashtable+Header.swift29 /// └──────────────────────────────────────────────┴────────┘COMMENT
MEDIUM⚡…s/OrderedCollections/HashTable/_Hashtable+Header.swift31 /// ├──────────────────────────────────────────────┼────────┤COMMENT
MEDIUM⚡…s/OrderedCollections/HashTable/_Hashtable+Header.swift33 /// └──────────────────────────────────────────────┴────────┘COMMENT
MEDIUM⚡…rces/RopeModule/BigString/Basics/BigString+Index.swift19 // ┌───────────────────────────────┬───┬───────────┬────────────────────┐COMMENT
MEDIUM⚡…rces/RopeModule/BigString/Basics/BigString+Index.swift21 // ├───────────────────────────────┼───┼───────────┼────────────────────┤COMMENT
MEDIUM⚡…rces/RopeModule/BigString/Basics/BigString+Index.swift23 // └───────────────────────────────┴───┴───────────┴────────────────────┘COMMENT
MEDIUM⚡…RopeModule/BigString/Chunk/BigString+Chunk+Index.swift19 // ┌──────────────────┬───┬───────────┐COMMENT
MEDIUM⚡…RopeModule/BigString/Chunk/BigString+Chunk+Index.swift21 // ├──────────────────┼───┼───────────┤COMMENT
MEDIUM⚡…RopeModule/BigString/Chunk/BigString+Chunk+Index.swift23 // └──────────────────┴───┴───────────┘COMMENT
MEDIUM⚡Sources/RopeModule/Rope/Basics/_RopePath.swift18 // ┌──────────────────────────────────┬────────┐COMMENT
MEDIUM⚡Sources/RopeModule/Rope/Basics/_RopePath.swift20 // ├──────────────────────────────────┼────────┤COMMENT
MEDIUM⚡Sources/RopeModule/Rope/Basics/_RopePath.swift22 // └──────────────────────────────────┴────────┘COMMENT
MEDIUMSources/HashTreeCollections/HashNode/_HashNode.swift26/// ┌───┬───┬───┬───┬───┬──────────────────┬───┬───┬───┬───┐COMMENT
MEDIUMSources/HashTreeCollections/HashNode/_HashNode.swift28/// └───┴───┴───┴───┴───┴──────────────────┴───┴───┴───┴───┘COMMENT
Hallucination Indicators1 hit · 10 pts
SeverityFileLineSnippetContext
CRITICAL…es/DequeModule/RigidDeque/RigidDeque+Consumption.swift238 unsafe self._base._pointer.pointee._handle.closeGap(offsets: self._offsetRange)CODE
Deep Nesting4 hits · 4 pts
SeverityFileLineSnippetContext
LOWUtils/Debugger/formatter_bytecode.py380CODE
LOWUtils/Debugger/formatter_bytecode.py452CODE
LOWUtils/Debugger/formatter_bytecode.py526CODE
LOWUtils/Debugger/formatter_bytecode.py1131CODE
Unused Imports3 hits · 3 pts
SeverityFileLineSnippetContext
LOWUtils/Debugger/formatter_bytecode.py14CODE
LOWUtils/Debugger/formatter_bytecode.py27CODE
LOWUtils/Debugger/formatter_bytecode.py28CODE
TODO Padding2 hits · 3 pts
SeverityFileLineSnippetContext
LOW…urces/SortedCollections/BTree/_BTree+SubSequence.swift176 // TODO: implement optimized `var indices`COMMENT
LOW…urces/SortedCollections/BTree/_BTree+SubSequence.swift191// TODO: implement partial RangeReplaceableCollection methodsCOMMENT