Repository Analysis

launchbadge/sqlx

🧰 The Rust SQL Toolkit. An async, pure Rust SQL crate featuring compile-time checked queries without a DSL. Supports PostgreSQL, MySQL, and SQLite.

3.8 Likely human-written View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of launchbadge/sqlx, a Rust project with 17,307 GitHub stars. SynthScan v2.0 examined 123,821 lines of code across 605 source files, recording 477 pattern matches distributed across 7 syntactic categories. The overall adjusted score of 3.8 places this repository in the Likely human-written 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).

3.8
Adjusted Score
3.8
Raw Score
100%
Time Factor
2026-07-10
Last Push
17.3K
Stars
Rust
Language
123.8K
Lines of Code
605
Files
477
Pattern Hits
2026-07-14
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

This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.

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 2LOW 475

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 477 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 Block452 hits · 442 pts
SeverityFileLineSnippetContext
LOWsqlx-postgres/src/copy.rs21 /// Issue a `COPY FROM STDIN` statement and transition the connection to streaming dataCOMMENT
LOWsqlx-postgres/src/copy.rs41 ///COMMENT
LOWsqlx-postgres/src/copy.rs61 ) -> Result<BoxStream<'c, Result<Bytes>>> {COMMENT
LOWsqlx-postgres/src/copy.rs81 /// <https://www.postgresql.org/docs/current/sql-copy.html>COMMENT
LOWsqlx-postgres/src/copy.rs201 .innerCOMMENT
LOWsqlx-postgres/src/arguments.rs21// backtrack and update the prefixed-len, then write until the next patch offsetCOMMENT
LOWsqlx-postgres/src/statement.rs61// impl<'q> From<PgStatement<'q>> for crate::any::AnyStatement<'q> {COMMENT
LOWsqlx-postgres/src/statement.rs81// }COMMENT
LOWsqlx-postgres/src/type_info.rs21/// if one was constructed with [`Self::with_oid()`] and the other with [`Self::with_name()`] orCOMMENT
LOWsqlx-postgres/src/type_info.rs201 /// Returns the _kind_ (simple, array, enum, etc.) for this type.COMMENT
LOWsqlx-postgres/src/type_info.rs261 Some("mac_address")COMMENT
LOWsqlx-postgres/src/type_info.rs281 ///COMMENT
LOWsqlx-postgres/src/type_info.rs301 /// // Will prevent SQLx from inferring `_foo` as an array type.COMMENT
LOWsqlx-postgres/src/type_info.rs321 elem_name: elem_name.into(),COMMENT
LOWsqlx-postgres/src/advisory_lock.rs21///COMMENT
LOWsqlx-postgres/src/advisory_lock.rs41 key: PgAdvisoryLockKey,COMMENT
LOWsqlx-postgres/src/advisory_lock.rs61 /// The keyspace designated by a single 64-bit integer.COMMENT
LOWsqlx-postgres/src/advisory_lock.rs81/// This means the lock is not actually released as soon as the guard is dropped. To ensure theCOMMENT
LOWsqlx-postgres/src/advisory_lock.rs101 /// [hkdf]: https://datatracker.ietf.org/doc/html/rfc5869COMMENT
LOWsqlx-postgres/src/advisory_lock.rs121 //COMMENT
LOWsqlx-postgres/src/advisory_lock.rs141 // This is specified by RFC 5869 but not elaborated upon:COMMENT
LOWsqlx-postgres/src/advisory_lock.rs181 // It has something to do with how lifetimes work on the `Acquire` trait, I couldn'tCOMMENT
LOWsqlx-postgres/src/advisory_lock.rs241 /// A connection-like type is required to execute the call. Allowed types include `PgConnection`,COMMENT
LOWsqlx-postgres/src/advisory_lock.rs281COMMENT
LOWsqlx-postgres/src/bind_iter.rs21/// iterating over them again to encode.COMMENT
LOWsqlx-postgres/src/bind_iter.rs41/// birthdate: DateTime<Utc>,COMMENT
LOWsqlx-postgres/src/listener.rs81 /// By default, when [`Pool::close()`] is called on the pool this listener is usingCOMMENT
LOWsqlx-postgres/src/listener.rs101COMMENT
LOWsqlx-postgres/src/listener.rs201 ///COMMENT
LOWsqlx-postgres/src/listener.rs221 /// // handle notification, do something interestingCOMMENT
LOWsqlx-postgres/src/listener.rs241 ///COMMENT
LOWsqlx-postgres/src/column.rs21}COMMENT
LOWsqlx-postgres/src/options/mod.rs121 ///COMMENT
LOWsqlx-postgres/src/options/mod.rs141 /// # ExampleCOMMENT
LOWsqlx-postgres/src/options/mod.rs161COMMENT
LOWsqlx-postgres/src/options/mod.rs181 /// # ExampleCOMMENT
LOWsqlx-postgres/src/options/mod.rs201 /// .database("postgres");COMMENT
LOWsqlx-postgres/src/options/mod.rs221 /// .ssl_mode(PgSslMode::Require);COMMENT
LOWsqlx-postgres/src/options/mod.rs241 pub fn ssl_root_cert(mut self, cert: impl AsRef<Path>) -> Self {COMMENT
LOWsqlx-postgres/src/options/mod.rs261COMMENT
LOWsqlx-postgres/src/options/mod.rs281 /// .ssl_client_cert_from_pem(CERT);COMMENT
LOWsqlx-postgres/src/options/mod.rs301 selfCOMMENT
LOWsqlx-postgres/src/options/mod.rs321 /// // Providing a CA certificate with less than VerifyCa is pointlessCOMMENT
LOWsqlx-postgres/src/options/mod.rs361 /// ```rustCOMMENT
LOWsqlx-postgres/src/options/mod.rs381 /// cause floating-points to be rounded to that many fewer digits than normal (`-1` causesCOMMENT
LOWsqlx-postgres/src/options/mod.rs401 /// * [Postgres manual, 8.1.3: Numeric Types; Floating-point Types][8.1.3]COMMENT
LOWsqlx-postgres/src/options/mod.rs421 selfCOMMENT
LOWsqlx-postgres/src/options/mod.rs481 /// assert_eq!(options.get_host(), "127.0.0.1");COMMENT
LOWsqlx-postgres/src/options/mod.rs501 /// Get the socket path.COMMENT
LOWsqlx-postgres/src/options/mod.rs521 /// let options = PgConnectOptions::new()COMMENT
LOWsqlx-postgres/src/options/mod.rs541 }COMMENT
LOWsqlx-postgres/src/options/mod.rs561 /// # use sqlx_postgres::PgConnectOptions;COMMENT
LOWsqlx-postgres/src/types/money.rs21/// Reading `MONEY` value in text format is not supported and will cause an error.COMMENT
LOWsqlx-postgres/src/types/money.rs41/// ```COMMENT
LOWsqlx-postgres/src/types/money.rs81 /// See the type-level docs for an explanation of `locale_frac_digits`.COMMENT
LOWsqlx-postgres/src/types/ltree.rs61impl Display for PgLTreeLabel {COMMENT
LOWsqlx-postgres/src/types/lquery.rs21 UnexpectedCharacter,COMMENT
LOWsqlx-postgres/src/types/lquery.rs41/// Ideally, SQLx's Postgres driver should support falling back to text format for typesCOMMENT
LOWsqlx-postgres/src/types/mod.rs1//! Conversions between Rust and **Postgres** types.COMMENT
LOWsqlx-postgres/src/types/mod.rs21//! | [`PgLQuery`] | LQUERY |COMMENT
392 more matches not shown…
Fake / Example Data17 hits · 17 pts
SeverityFileLineSnippetContext
LOWREADME.md337 .bind("user@example.com")CODE
LOWREADME.md361 .bind("user@example.com")CODE
LOWtests/sqlite/sqlite.rs1237 sqlx::query("insert into foo(bar, baz) values (1234, 'Lorem ipsum'), (5678, 'dolor sit amet')")CODE
LOWtests/sqlite/sqlite.rs1237 sqlx::query("insert into foo(bar, baz) values (1234, 'Lorem ipsum'), (5678, 'dolor sit amet')")CODE
LOWtests/sqlite/sqlite.rs1256 assert_eq!(rows[0].1, "Lorem ipsum");CODE
LOWtests/sqlite/sqlite.rs1259 assert_eq!(rows[1].1, "dolor sit amet");CODE
LOWtests/sqlite/sqlite.rs1274 "insert into foo.foo(bar, baz) values (1234, 'Lorem ipsum'), (5678, 'dolor sit amet')",CODE
LOWtests/sqlite/sqlite.rs1274 "insert into foo.foo(bar, baz) values (1234, 'Lorem ipsum'), (5678, 'dolor sit amet')",CODE
LOWtests/sqlite/sqlite.rs1299 assert_eq!(rows[0].1, "Lorem ipsum");CODE
LOWtests/sqlite/sqlite.rs1302 assert_eq!(rows[1].1, "dolor sit amet");CODE
LOWtests/mysql/mysql.rs629 SET @myvar := 'test@test.com';CODE
LOWtests/mysql/mysql.rs692 VALUES (1, 'Hello, world!', 'Lorem ipsum dolor sit amet', X'01020304DEADBEEF');CODE
LOWtests/mysql/mysql.rs692 VALUES (1, 'Hello, world!', 'Lorem ipsum dolor sit amet', X'01020304DEADBEEF');CODE
LOWtests/mysql/mysql.rs719 "Lorem ipsum dolor sit amet"CODE
LOWtests/mysql/mysql.rs719 "Lorem ipsum dolor sit amet"CODE
LOWexamples/postgres/json/README.md28echo '{ "name": "John Doe", "age": 30 }' | cargo run -- addCODE
LOWexamples/postgres/json/README.md34echo '{ "name": "Jane Doe", "age": 25, "array": ["string", true, 0] }' | cargo run -- addCODE
AI Slop Vocabulary2 hits · 6 pts
SeverityFileLineSnippetContext
MEDIUMsqlx-core/src/from_row.rs216/// If your database supports a JSON type, you can leverage `#[sqlx(json)]`COMMENT
MEDIUMsqlx-core/src/pool/options.rs15/// Essentially, because it's impossible to write generic bounds that describe a closureCOMMENT
Hyper-Verbose Identifiers2 hits · 2 pts
SeverityFileLineSnippetContext
LOWtests/x.py38def maybe_fetch_sqlite_extension():CODE
LOWtests/x.py68def required_feature_for_test(test_name):CODE
Unused Imports2 hits · 2 pts
SeverityFileLineSnippetContext
LOWtests/x.py6CODE
LOWexamples/x.py18CODE
Redundant / Tautological Comments1 hit · 2 pts
SeverityFileLineSnippetContext
LOWgen-changelog.sh86 # Check if the entry already exists in the changelog or in our list of new authors.COMMENT
Deep Nesting1 hit · 1 pts
SeverityFileLineSnippetContext
LOWtests/x.py93CODE