A modern approach to Container-Based Dependency Injection for Swift and SwiftUI.
This report presents the forensic synthetic code analysis of hmlongco/Factory, a Swift project with 2,875 GitHub stars. SynthScan v2.0 examined 16,319 lines of code across 704 source files, recording 105 pattern matches distributed across 7 syntactic categories. The overall adjusted score of 7.4 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).
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.
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.
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.
The scanner identified 105 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.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | FactoryDemo/FactoryDemoTests/ContainerTrait.swift | 1 | // | COMMENT |
| LOW | FactoryDemo/FactoryDemoTests/ContainerTrait.swift | 21 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | COMMENT |
| LOW | …toryDemo/FactoryDemo/FactoryDemoApp+AutoRegister.swift | 81 | // MockServiceN(0) | COMMENT |
| LOW | FactoryDemo/FactoryDemo/ContentView.swift | 121 | // ContentView(model: model1) | COMMENT |
| LOW | FactoryDemo/FactoryDemo/ContentView.swift | 141 | // } | COMMENT |
| LOW | …ctoryDemo/FactoryDemo/Concepts/FunctionInjection.swift | 1 | // | COMMENT |
| LOW | …ctoryDemo/FactoryDemo/Concepts/FunctionInjection.swift | 21 | // @Injected(\.openURL) var openURL | COMMENT |
| LOW | FactoryDemo/FactoryDemo/Concepts/Tags.swift | 1 | // | COMMENT |
| LOW | FactoryDemo/FactoryDemo/Concepts/Tags.swift | 61 | //struct PipelineProcessorTag : Tag { | COMMENT |
| LOW | FactoryDemo/FactoryDemo/Concepts/Tags.swift | 81 | // var priority: Int { get } | COMMENT |
| LOW | FactoryDemo/FactoryDemo/Concepts/Tags.swift | 101 | // } | COMMENT |
| LOW | FactoryDemo/FactoryDemo/Concepts/Tags.swift | 121 | // for anyTaggedFactory in taggedFactories.values { | COMMENT |
| LOW | FactoryDemo/FactoryDemo/Concepts/Tags.swift | 141 | ///// tagged registrations | COMMENT |
| LOW | …/FactoryDemo/Concepts/TestNonExtendableContainer.swift | 1 | // | COMMENT |
| LOW | FactoryDemo/Modules/Networking/Networking/Networking.h | 1 | // | COMMENT |
| LOW | FactoryDemo/Modules/Common/Common/Common.h | 1 | // | COMMENT |
| LOW | Tests/FactoryTests/SwiftTesting/ParallelTests.swift | 61 | func commonTests(_ value: String) { | COMMENT |
| LOW | Tests/FactoryTests/SwiftTesting/ParallelTests.swift | 121 | let sut1 = TaskLocalUseCase() | COMMENT |
| LOW | Tests/FactoryTests/SwiftTesting/ParallelTests.swift | 201 | await isolatedAsyncTests("baz") | COMMENT |
| LOW | Tests/FactoryTests/SwiftTesting/ParallelTests.swift | 221 | #expect(sut2.fooBarBazSingleton.value == value) | COMMENT |
| LOW | …sts/FactoryTests/XCTests/FactoryPerformanceTests.swift | 1 | // | COMMENT |
| LOW | Sources/FactoryTesting/ContainerTrait.swift | 1 | // | COMMENT |
| LOW | Sources/FactoryTesting/ContainerTrait.swift | 21 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | COMMENT |
| LOW | Sources/FactoryKit/FactoryKit/Containers.swift | 1 | // | COMMENT |
| LOW | Sources/FactoryKit/FactoryKit/Containers.swift | 21 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | COMMENT |
| LOW | Sources/FactoryKit/FactoryKit/Containers.swift | 41 | /// self { MyService() } | COMMENT |
| LOW | Sources/FactoryKit/FactoryKit/Containers.swift | 61 | COMMENT | |
| LOW | Sources/FactoryKit/FactoryKit/Containers.swift | 81 | /// Note this should be defined as a @TaskLocal variable to be able to use its isolation mechanism, which is especia | COMMENT |
| LOW | Sources/FactoryKit/FactoryKit/Containers.swift | 121 | } | COMMENT |
| LOW | Sources/FactoryKit/FactoryKit/Containers.swift | 181 | } | COMMENT |
| LOW | Sources/FactoryKit/FactoryKit/Containers.swift | 241 | /// Syntactic sugar allows container to create a parameter factory whose optional registration is promised before re | COMMENT |
| LOW | Sources/FactoryKit/FactoryKit/Containers.swift | 481 | COMMENT | |
| LOW | Sources/FactoryKit/FactoryKit/Scopes.swift | 1 | // | COMMENT |
| LOW | Sources/FactoryKit/FactoryKit/Scopes.swift | 21 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | COMMENT |
| LOW | Sources/FactoryKit/FactoryKit/Scopes.swift | 41 | /// var service: Factory<ServiceType> { | COMMENT |
| LOW | Sources/FactoryKit/FactoryKit/Contexts.swift | 1 | // | COMMENT |
| LOW | Sources/FactoryKit/FactoryKit/Contexts.swift | 21 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | COMMENT |
| LOW | Sources/FactoryKit/FactoryKit/Injections.swift | 1 | // | COMMENT |
| LOW | Sources/FactoryKit/FactoryKit/Injections.swift | 21 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | COMMENT |
| LOW | Sources/FactoryKit/FactoryKit/Injections.swift | 41 | /// @Injected(\.myService) var service1 | COMMENT |
| LOW | Sources/FactoryKit/FactoryKit/Injections.swift | 101 | /// ```swift | COMMENT |
| LOW | Sources/FactoryKit/FactoryKit/Injections.swift | 181 | /// ```swift | COMMENT |
| LOW | Sources/FactoryKit/FactoryKit/Injections.swift | 201 | /// ```swift | COMMENT |
| LOW | Sources/FactoryKit/FactoryKit/Injections.swift | 281 | /// ```swift | COMMENT |
| LOW | Sources/FactoryKit/FactoryKit/Injections.swift | 301 | /// } | COMMENT |
| LOW | Sources/FactoryKit/FactoryKit/Injections.swift | 361 | } | COMMENT |
| LOW | Sources/FactoryKit/FactoryKit/Injections.swift | 401 | /// Allows the user to force a Factory resolution at their discretion. | COMMENT |
| LOW | Sources/FactoryKit/FactoryKit/Injections.swift | 421 | /// } | COMMENT |
| LOW | Sources/FactoryKit/FactoryKit/Injections.swift | 461 | public init(_ wrappedValue: T) { | COMMENT |
| LOW | Sources/FactoryKit/FactoryKit/Injections.swift | 481 | @MainActor @propertyWrapper public struct InjectedObservable<T>: DynamicProperty where T: Observation.Observable { | COMMENT |
| LOW | Sources/FactoryKit/FactoryKit/Resolver.swift | 1 | // | COMMENT |
| LOW | Sources/FactoryKit/FactoryKit/Resolver.swift | 21 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | COMMENT |
| LOW | Sources/FactoryKit/FactoryKit/Modifiers.swift | 1 | // | COMMENT |
| LOW | Sources/FactoryKit/FactoryKit/Modifiers.swift | 61 | registration.register(scope: scope) | COMMENT |
| LOW | Sources/FactoryKit/FactoryKit/Modifiers.swift | 101 | /// Syntactic sugar defines this Factory's dependency scope to be singleton. See ``Scope/Singleton-swift.class``. | COMMENT |
| LOW | Sources/FactoryKit/FactoryKit/Modifiers.swift | 141 | COMMENT | |
| LOW | Sources/FactoryKit/FactoryKit/Modifiers.swift | 161 | /// Adds a factory specific decorator. The decorator will *always* be called with the resolved dependency | COMMENT |
| LOW | Sources/FactoryKit/FactoryKit/Modifiers.swift | 281 | COMMENT | |
| LOW | Sources/FactoryKit/FactoryKit/Modifiers.swift | 301 | } | COMMENT |
| LOW | Sources/FactoryKit/FactoryKit/Modifiers.swift | 321 | /// MainView() | COMMENT |
| 23 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | …t/managedcontainer/promised(key:file:line:)-1lq85.json | 1 | {"schemaVersion":{"patch":0,"minor":3,"major":0},"abstract":[{"type":"text","text":"Syntactic sugar allows container to | CODE |
| MEDIUM | …kit/managedcontainer/callasfunction(key:_:)-2xdpp.json | 1 | {"sections":[],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factorykit\/managedconta | CODE |
| MEDIUM | …actorykit/container/promised(key:file:line:)-f5q7.json | 1 | {"sections":[],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factorykit\/container\/p | CODE |
| MEDIUM | …factorykit/container/callasfunction(key:_:)-9dimj.json | 1 | {"schemaVersion":{"major":0,"minor":3,"patch":0},"abstract":[{"type":"text","text":"Syntactic sugar allows container to | CODE |
| MEDIUM | …ocumentation/factorykit/factory/preview(factory:).json | 1 | {"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens": | CODE |
| MEDIUM | …a/documentation/factorykit/factory/init(_:key:_:).json | 1 | {"schemaVersion":{"minor":3,"major":0,"patch":0},"abstract":[{"text":"Public initializer creates a Factory capable of ma | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | FactoryDemo/FactoryDemoTests/ContainerTrait.swift | 44 | /// That said, it's also possible to leverage this behavior in `XCTestCase` by using the `@TaskLocal` provided `withVal | COMMENT |
| LOW | docs/data/documentation/factorykit/testing.json | 1 | {"schemaVersion":{"major":0,"minor":3,"patch":0},"seeAlsoSections":[{"identifiers":["doc:\/\/FactoryKit\/documentation\/ | CODE |
| LOW | docs/data/documentation/factorykit/contexts.json | 1 | {"hierarchy":{"paths":[["doc:\/\/FactoryKit\/documentation\/FactoryKit"]]},"metadata":{"modules":[{"name":"FactoryKit"}] | CODE |
| LOW | docs/data/documentation/factorykit/modifiers.json | 1 | {"seeAlsoSections":[{"title":"Advanced Topics","generated":true,"anchor":"Advanced-Topics","identifiers":["doc:\/\/Facto | CODE |
| MEDIUM | Sources/FactoryTesting/ContainerTrait.swift | 44 | /// That said, it's also possible to leverage this behavior in `XCTestCase` by using the `@TaskLocal` provided `withVal | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | docs/data/documentation/factorykit/scopes.json | 1 | {"sections":[],"seeAlsoSections":[{"identifiers":["doc:\/\/FactoryKit\/documentation\/FactoryKit\/GettingStarted","doc:\ | CODE |
| MEDIUM | docs/data/documentation/factorykit/testing.json | 1 | {"schemaVersion":{"major":0,"minor":3,"patch":0},"seeAlsoSections":[{"identifiers":["doc:\/\/FactoryKit\/documentation\/ | CODE |
| MEDIUM | docs/data/documentation/factorykit/containers.json | 1 | {"hierarchy":{"paths":[["doc:\/\/FactoryKit\/documentation\/FactoryKit"]]},"kind":"article","metadata":{"role":"article" | CODE |
| LOW | docs/data/documentation/factorykit/contexts.json | 1 | {"hierarchy":{"paths":[["doc:\/\/FactoryKit\/documentation\/FactoryKit"]]},"metadata":{"modules":[{"name":"FactoryKit"}] | CODE |
| LOW | docs/data/documentation/factorykit/modifiers.json | 1 | {"seeAlsoSections":[{"title":"Advanced Topics","generated":true,"anchor":"Advanced-Topics","identifiers":["doc:\/\/Facto | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | docs/js/highlight-js-scss-js.6dc40f91.js | 10 | (self["webpackChunkswift_docc_render"]=self["webpackChunkswift_docc_render"]||[]).push([[672],{1611:function(e){const i= | CODE |
| LOW | docs/js/chunk-vendors.88e02fc3.js | 21 | var r=Object.freeze({}),o=Array.isArray;function i(t){return void 0===t||null===t}function a(t){return void 0!==t&&null! | CODE |
| LOW | docs/js/highlight-js-css-js.6a1f0b6c.js | 10 | (self["webpackChunkswift_docc_render"]=self["webpackChunkswift_docc_render"]||[]).push([[175],{8612:function(e){const i= | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | Sources/FactoryKit/FactoryKit/Factory.swift | 43 | /// ## Defining a Factory | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | docs/data/documentation/factorykit/actors.json | 1 | {"kind":"article","hierarchy":{"paths":[["doc:\/\/FactoryKit\/documentation\/FactoryKit"]]},"identifier":{"interfaceLang | CODE |
| LOW | Sources/FactoryKit/FactoryKit.docc/Advanced/Actors.md | 104 | final class DataManager { | CODE |