Repository Analysis

surrealdb/surrealdb

A scalable, distributed, collaborative, document-graph database, for the realtime web

4.4 Likely human-written View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of surrealdb/surrealdb, a Rust project with 32,674 GitHub stars. SynthScan v2.0 examined 572,428 lines of code across 1914 source files, recording 1971 pattern matches distributed across 17 syntactic categories. The overall adjusted score of 4.4 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).

4.4
Adjusted Score
4.4
Raw Score
100%
Time Factor
2026-07-06
Last Push
32.7K
Stars
Rust
Language
572.4K
Lines of Code
1.9K
Files
2.0K
Pattern Hits
2026-07-14
Scan Date
0.01
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 16HIGH 6MEDIUM 181LOW 1768

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 1971 distinct pattern matches across 17 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 Block1658 hits · 1626 pts
SeverityFileLineSnippetContext
LOWCargo.toml361COMMENT
LOWCargo.toml381bool_assert_comparison = "allow"COMMENT
LOWCargo.toml401# https://rust-lang.github.io/rust-clippy/master/#disallowed_methodsCOMMENT
LOWCargo.toml421implicit_clone = "warn"COMMENT
LOWCargo.toml441# https://rust-lang.github.io/rust-clippy/master/#mutex_atomicCOMMENT
LOWCargo.toml461redundant_clone = "warn"COMMENT
LOWCargo.toml481# SurrealDB relies on async functions in the AST parser and executor to avoid stack overflows.COMMENT
LOWdeny.toml1# See all available configuration options at:COMMENT
LOWdeny.toml21# The lint level for when a crate version requirement is set to `*`.COMMENT
LOWdeny.toml41allow-registry = ["https://github.com/rust-lang/crates.io-index"]COMMENT
LOWdeny.toml61# - for RUSTSEC-2024-0436, paste is now unmaintained and archived, but we only use paste in testsCOMMENT
LOWMakefile.ci.toml21# Adjacent-pair upgrade chain for language upgrade tests. Each consecutiveCOMMENT
LOWMakefile.ci.toml641COMMENT
LOWlanguage-tests/src/cmd/bench/run.rs61}COMMENT
LOWlanguage-tests/src/cmd/bench/run.rs901}COMMENT
LOWlanguage-tests/src/cmd/bench/run.rs961 }COMMENT
LOWlanguage-tests/src/cmd/bench/stats/univariate/sample.rs1use std::{mem, ops};COMMENT
LOWlanguage-tests/src/cmd/bench/stats/univariate/sample.rs161 /// Returns the variance of the sampleCOMMENT
LOW…tests/src/cmd/bench/stats/univariate/outliers/tukey.rs1//! Tukey's methodCOMMENT
LOW…tests/src/cmd/bench/stats/univariate/outliers/tukey.rs21//!COMMENT
LOW…e-tests/src/cmd/bench/stats/univariate/outliers/mod.rs1//! Classification of outliersCOMMENT
LOWlanguage-tests/src/cmd/upgrade/mod.rs21/// only when the requirement itself has no prerelease.COMMENT
LOWlanguage-tests/src/cmd/run/provisioner.rs61 // Enable a temporary directory so TEMPFILES queries route to theCOMMENT
LOWlanguage-tests/src/cmd/run/provisioner.rs141 ds.bootstrap().await?;COMMENT
LOWlanguage-tests/src/cmd/run/provisioner.rs161 /// the `delr` key cap and the tombstone build-up of wiping on every test.COMMENT
LOWlanguage-tests/src/tests/schema/mod.rs81#[serde(rename_all = "kebab-case")]COMMENT
LOWlanguage-tests/src/tests/schema/mod.rs121 pub timeout: BoolOr<TestDuration>,COMMENT
LOWlanguage-tests/src/tests/schema/mod.rs381 {COMMENT
LOWlanguage-tests/src/tests/schema/mod.rs881#[serde(rename_all = "kebab-case")]COMMENT
LOWlanguage-tests/src/tests/schema/mod.rs901 /// single file. The key is a short variant name (shown in the run label andCOMMENT
LOWlanguage-tests/src/tests/schema/mod.rs921 #[serde(default = "default_duration::<100000>")]COMMENT
LOWsurrealdb/token/src/lib.rs1//! SurrealQL token lexer definitionsCOMMENT
LOWsurrealdb/token/src/base.rs21pub enum BaseTokenKind {COMMENT
LOWsurrealdb/token/src/base.rs161 #[regex(r#"r'([^'\\]|\\.)*'"#)]COMMENT
LOWsurrealdb/token/src/base.rs181 #[regex(r"(?&bracket_ident)")]COMMENT
LOWsurrealdb/token/src/base.rs201 Decimal,COMMENT
LOWsurrealdb/token/src/base.rs301 #[regex(r"(?i)CREATE")]COMMENT
LOWsurrealdb/token/src/base.rs321 #[regex(r"(?i)DIMENSION")]COMMENT
LOWsurrealdb/token/src/base.rs361 KwExpunge,COMMENT
LOWsurrealdb/token/src/base.rs461 #[regex(r"(?i)ML")]COMMENT
LOWsurrealdb/token/src/base.rs541 KwRefresh,COMMENT
LOWsurrealdb/token/src/base.rs601 #[regex(r"(?i)TABLE")]COMMENT
LOWsurrealdb/token/src/datetime.rs1use logos::Logos;COMMENT
LOWsurrealdb/token/src/record_id_key.rs21 OpenBracket,COMMENT
LOWsurrealdb/token/src/js_function.rs21 TemplateOpen,COMMENT
LOWsurrealdb/types/tests/error_types.rs921 // Round-tripCOMMENT
LOWsurrealdb/types/tests/error_types.rs1081fn test_error_wire_not_allowed_auth_not_allowed_iam() {COMMENT
LOWsurrealdb/types/tests/error_types.rs1621 // "message": "Already connected",COMMENT
LOWsurrealdb/types/derive/src/lib.rs21mod kind;COMMENT
LOWsurrealdb/types/derive/src/lib.rs41/// - `#[surreal(crate = "path")]` - Specify a custom path to the types crate (e.g.,COMMENT
LOWsurrealdb/types/derive/src/lib.rs61///COMMENT
LOWsurrealdb/types/derive/src/lib.rs81/// #[derive(SurrealValue)]COMMENT
LOWsurrealdb/types/derive/src/lib.rs101///COMMENT
LOWsurrealdb/types/derive/src/lib.rs121/// types. For example, if type `A` contains `B` and `B` contains `A`, eachCOMMENT
LOWsurrealdb/types/derive/src/lib.rs161/// - Escape hatches: `(expr)` for arbitrary Rust expressionsCOMMENT
LOWsurrealdb/types/derive/src/lib.rs181/// });COMMENT
LOWsurrealdb/types/derive/src/lib.rs201/// write_sql!(f, fmt, "format string", arg1, arg2, ...)COMMENT
LOWsurrealdb/types/derive/src/lib.rs221/// let fmt = SqlFormat::SingleLine;COMMENT
LOWsurrealdb/types/derive/src/kind.rs281/// - Literals: `true`, `false`, `42`, `"hello"`COMMENT
LOWsurrealdb/types/src/error.rs41// -----------------------------------------------------------------------------COMMENT
1598 more matches not shown…
Decorative Section Separators142 hits · 412 pts
SeverityFileLineSnippetContext
MEDIUMdeny.toml4# --------------------------------------------------COMMENT
MEDIUMdeny.toml6# --------------------------------------------------COMMENT
MEDIUMdeny.toml14# --------------------------------------------------COMMENT
MEDIUMdeny.toml16# --------------------------------------------------COMMENT
MEDIUMdeny.toml30# --------------------------------------------------COMMENT
MEDIUMdeny.toml32# --------------------------------------------------COMMENT
MEDIUMdeny.toml43# --------------------------------------------------COMMENT
MEDIUMdeny.toml45# --------------------------------------------------COMMENT
MEDIUMdeny.toml82# --------------------------------------------------COMMENT
MEDIUMdeny.toml84# --------------------------------------------------COMMENT
MEDIUMMakefile.ci.toml33# --------------------------------------------------COMMENT
MEDIUMMakefile.ci.toml35# --------------------------------------------------COMMENT
MEDIUMMakefile.ci.toml817# --------------------------------------------------STRING
MEDIUMMakefile.ci.toml819# --------------------------------------------------STRING
MEDIUMMakefile.ci.toml267# --------------------------------------------------STRING
MEDIUMMakefile.ci.toml269# --------------------------------------------------STRING
MEDIUMMakefile.ci.toml415# --------------------------------------------------STRING
MEDIUMMakefile.ci.toml417# --------------------------------------------------STRING
MEDIUMMakefile.ci.toml519# --------------------------------------------------STRING
MEDIUMMakefile.ci.toml521# --------------------------------------------------STRING
MEDIUMMakefile.ci.toml575# --------------------------------------------------STRING
MEDIUMMakefile.ci.toml577# --------------------------------------------------STRING
MEDIUMMakefile.ci.toml642# --------------------------------------------------STRING
MEDIUMMakefile.ci.toml644# --------------------------------------------------STRING
MEDIUMMakefile.ci.toml696# --------------------------------------------------STRING
MEDIUMMakefile.ci.toml698# --------------------------------------------------STRING
MEDIUMMakefile.ci.toml725# --------------------------------------------------STRING
MEDIUMMakefile.ci.toml727# --------------------------------------------------STRING
MEDIUMMakefile.ci.toml753# --------------------------------------------------STRING
MEDIUMMakefile.ci.toml755# --------------------------------------------------STRING
MEDIUMMakefile.ci.toml932# --------------------------------------------------STRING
MEDIUMMakefile.ci.toml934# --------------------------------------------------STRING
MEDIUMMakefile.ci.toml1009# --------------------------------------------------STRING
MEDIUMMakefile.ci.toml1011# --------------------------------------------------STRING
MEDIUM.rustfmt.toml9# -----------------------------------COMMENT
MEDIUM.rustfmt.toml11# -----------------------------------COMMENT
MEDIUMsurrealdb/types/tests/surreal_value/collections.rs5// ──────────────────────────────────────────────────────────────COMMENT
MEDIUMsurrealdb/types/tests/surreal_value/collections.rs7// ──────────────────────────────────────────────────────────────COMMENT
MEDIUMsurrealdb/types/tests/surreal_value/collections.rs111// ──────────────────────────────────────────────────────────────COMMENT
MEDIUMsurrealdb/types/tests/surreal_value/collections.rs113// ──────────────────────────────────────────────────────────────COMMENT
MEDIUMsurrealdb/types/tests/surreal_value/collections.rs221// ──────────────────────────────────────────────────────────────COMMENT
MEDIUMsurrealdb/types/tests/surreal_value/collections.rs223// ──────────────────────────────────────────────────────────────COMMENT
MEDIUMsurrealdb/types/tests/surreal_value/collections.rs317// ──────────────────────────────────────────────────────────────COMMENT
MEDIUMsurrealdb/types/tests/surreal_value/collections.rs319// ──────────────────────────────────────────────────────────────COMMENT
MEDIUMsurrealdb/types/tests/surreal_value/collections.rs449// ──────────────────────────────────────────────────────────────COMMENT
MEDIUMsurrealdb/types/tests/surreal_value/collections.rs453// ──────────────────────────────────────────────────────────────COMMENT
MEDIUMsurrealdb/types/tests/surreal_value/collections.rs548// ──────────────────────────────────────────────────────────────COMMENT
MEDIUMsurrealdb/types/tests/surreal_value/collections.rs552// ──────────────────────────────────────────────────────────────COMMENT
MEDIUMsurrealdb/types/tests/surreal_value/collections.rs658// ──────────────────────────────────────────────────────────────COMMENT
MEDIUMsurrealdb/types/tests/surreal_value/collections.rs661// ──────────────────────────────────────────────────────────────COMMENT
MEDIUMsurrealdb/core/src/catalog/record.rs306 // ─────────COMMENT
MEDIUMsurrealdb/core/src/key/graph/mod.rs9//! ┌─────────────────────┬─ ─ ─ ─ ─ ─ ─ ─ ─ ┐COMMENT
MEDIUMsurrealdb/core/src/key/graph/mod.rs11//! ┌────┴─────┐ etl ┌────────────┐ etr ┌──────────┐COMMENT
MEDIUMsurrealdb/core/src/key/graph/mod.rs12//! │ left │───────▶│ rid (edge) │───────▶│ right │COMMENT
MEDIUMsurrealdb/core/src/key/graph/mod.rs13//! └──────────┘ in └────────────┘ out └────┬─────┘COMMENT
MEDIUMsurrealdb/core/src/key/graph/mod.rs15//! └ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─┴───────────────────┘COMMENT
MEDIUMsurrealdb/core/src/exec/index.rs14//! ┌─────────────────────────────────────────────────────────────────┐COMMENT
MEDIUMsurrealdb/core/src/exec/index.rs16//! ├─────────────────────────────────────────────────────────────────┤COMMENT
MEDIUMsurrealdb/core/src/exec/index.rs19//! └─────────────────────────────────────────────────────────────────┘COMMENT
MEDIUMsurrealdb/core/src/exec/index.rs22//! ┌─────────────────────────────────────────────────────────────────┐COMMENT
82 more matches not shown…
Hallucination Indicators16 hits · 175 pts
SeverityFileLineSnippetContext
CRITICALlanguage-tests/src/cmd/graphql.rs50 let Some(variables) = case.config.parsed.graphql.variables.as_ref() else {CODE
CRITICALlanguage-tests/src/cmd/graphql.rs72 if let Some(operation) = case.config.parsed.graphql.operation.as_ref() {CODE
CRITICALlanguage-tests/src/cmd/bench/run.rs338 let datasets = run.case.test.config.parsed.bench.datasets.clone();CODE
CRITICALlanguage-tests/src/cmd/bench/run.rs842 operation: run.case.test.config.parsed.graphql.operation.clone(),CODE
CRITICALlanguage-tests/src/cmd/upgrade/mod.rs180 .with_filter(|x| no_results || x.test.config.parsed.test.results.is_some())CODE
CRITICALlanguage-tests/src/cmd/upgrade/mod.rs189 if let Some(ver_req) = x.test.config.parsed.test.version.as_ref()CODE
CRITICALlanguage-tests/src/cmd/upgrade/mod.rs195 if let Some(ver_req) = x.test.config.parsed.test.importing_version.as_ref()CODE
CRITICALlanguage-tests/src/cmd/run/mod.rs109 set_builder.with_filter(|x| x.test.config.parsed.test.results.is_none())CODE
CRITICALlanguage-tests/src/tests/report/update.rs21 let mut doc = self.case.test.config.toml.clone().unwrap_or_default();CODE
CRITICALlanguage-tests/src/tests/report/update.rs33 if let Some(slice) = self.case.test.config.range.clone() {CODE
CRITICALsurrealdb/src/lib.rs186 self.surreal.inner.waiter.0.send(Some(WaitFor::Connection)).ok();CODE
CRITICALsurrealdb/src/method/use_db.rs53 self.client.inner.waiter.0.send(Some(WaitFor::Database)).ok();CODE
CRITICALsurrealml/core/src/execution/compute.rs100 let mut buffer = Vec::with_capacity(self.surml_file.header.keys.store.len());CODE
CRITICALsurrealml/core/src/execution/compute.rs211 if self.surml_file.header.output.normaliser.is_none() {CODE
CRITICALsurrealml/core/src/execution/compute.rs216 let output_normaliser = match self.surml_file.header.output.normaliser.as_ref() {CODE
CRITICAL.github/workflows/community-pr-label.yml52 const author = context.payload.pull_request.user.login.toLowerCase();CODE
AI Slop Vocabulary22 hits · 68 pts
SeverityFileLineSnippetContext
MEDIUMMakefile.ci.toml810 # Generate coverage report, excluding the harness codeSTRING
MEDIUMsurrealdb/core/src/kvs/rocksdb/tests.rs604 // divisible by 64), but pairing them keeps the test robustCOMMENT
MEDIUMsurrealdb/core/src/iam/jwks.rs209 // default, we could allow users to leverage this. This will most likelyCOMMENT
MEDIUMsurrealdb/core/src/iam/verify.rs76 // Now that the audience claim is validated by default, we could allow users to leverage this.COMMENT
MEDIUMsurrealdb/core/src/graphql/cache.rs211 // today, but pinning it here keeps the fingerprint robust against futureCOMMENT
MEDIUM…realdb/core/src/exec/pre_decode_filter/wire_literal.rs174 // `full_wire.len() - utf8.len()` is robust against futureCOMMENT
MEDIUMsurrealdb/core/src/doc/alter.rs175 // Rebuild the record id from the coerced value using the robustCOMMENT
MEDIUMsurrealdb/mcp/src/tools/mod.rs394 /// formatted SQL so the test stays robust against display tweaks.COMMENT
MEDIUMsurrealdb/parser/src/parse/special.rs783 // The last is the least robust and relies on the fact the `()` `{}` and `[]` are also partCOMMENT
MEDIUMsurrealdb/ast/examples/working_with_ast.rs47 // Essentially creating a linked list of nodes.COMMENT
MEDIUMsurrealdb/src/opt/auth.rs209 /// seamless long-term sessions while maintaining security.COMMENT
MEDIUMsurrealdb/src/opt/auth.rs282/// tokens when the current access token expires. This enables seamless userCOMMENT
MEDIUMscripts/bench/measure.sh4# and print a machine-readable summary of the harness's statistics (time, median,COMMENT
MEDIUMscripts/bench/measure.sh21# The comparison block is produced by the harness itselfCOMMENT
MEDIUMscripts/bench/measure.sh71# Pull the verdict + the time/median/change lines straight from the harness output.COMMENT
MEDIUMscripts/bench/measure.sh85# since the harness prints Rust Duration debug formatting, e.g. "1.2ms"/"850µs").COMMENT
MEDIUMscripts/bench/profile.sh6# How: the bench harness prints `__BENCH_MEASURE_START__` on stderr (whenCOMMENT
MEDIUMscripts/bench/profile.sh83# BENCH_MARKERS makes the harness emit the measured-region sentinels on stderr.COMMENT
MEDIUM.github/workflows/release.yml4# For comprehensive documentation, see doc/RELEASING.mdCOMMENT
MEDIUM.github/workflows/language-bench-quick.yml10# job runs read-only against that store: the harness `fetch_latest`es the `main`COMMENT
MEDIUM.github/workflows/language-bench-quick.yml108 # Read-only against the shared store (NO --save): the harness fetches theCOMMENT
MEDIUM.github/workflows/ci.yml545 # Both workspaces are cached: `language-tests` for the test harness,COMMENT
Fake / Example Data47 hits · 59 pts
SeverityFileLineSnippetContext
LOWsurrealdb/core/tests/function.rs1082 "Lehem ipsum dolor sit amet, dicta latine an eam."CODE
LOWsurrealdb/core/tests/function.rs1185 "Lorem ipsum dolor sit amet, dicta latine an eam."CODE
LOWsurrealdb/core/tests/function.rs1185 "Lorem ipsum dolor sit amet, dicta latine an eam."CODE
LOWsurrealdb/core/tests/function.rs1271 "Lehem ipsum dolor sit amet, dicta latine an eam."CODE
LOWsurrealdb/core/benches/statements.rs56 "CREATE person SET name = 'Test', age = 30, email = 'test@example.com', scores = [90, 80, 70], address = {{ street: '1CODE
LOWsurrealdb/core/benches/statements.rs65 "Lorem ipsum dolor sit amet, consectetur adipiscing elit.".repeat(10_000)CODE
LOWsurrealdb/core/benches/statements.rs65 "Lorem ipsum dolor sit amet, consectetur adipiscing elit.".repeat(10_000)CODE
LOWsurrealdb/core/src/idx/ft/fulltext.rs1292 "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus CODE
LOWsurrealdb/core/src/idx/ft/fulltext.rs1292 "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus CODE
LOWsurrealdb/core/src/expr/statements/insert.rs275 // INSERT INTO person (id, name) VALUES (1, 'John Doe')COMMENT
LOWsurrealdb/core/src/expr/statements/insert.rs278 // v: { name: 'John Doe' }COMMENT
LOWsurrealdb/core/src/iam/signup.rs64/// ("email".to_string(), "user@example.com".into()),COMMENT
LOWsurrealdb/core/src/iam/signup.rs145/// ("email".to_string(), "user@example.com".into()),COMMENT
LOWsurrealdb/core/src/iam/signin.rs223/// ("email".to_string(), "user@example.com".into()),COMMENT
LOWsurrealdb/core/src/graphql/auth.rs35/// authentication variables (e.g., `{ email: "user@example.com", pass: "secret" }`).COMMENT
LOWsurrealdb/tests/api_integration/basic.rs370 SET name = 'John Doe'CODE
LOWsurrealdb/tests/api_integration/basic.rs381 assert_eq!(name, "John Doe");CODE
LOWsurrealdb/tests/api_integration/basic.rs389 let _ = db.query("CREATE user:john SET name = 'John Doe'").await.unwrap().check().unwrap();CODE
LOWsurrealdb/tests/api_integration/basic.rs394 assert_eq!(name, "John Doe");CODE
LOWsurrealdb/tests/api_integration/basic.rs417 .bind(("name", "John Doe".to_string()))CODE
LOWsurrealdb/tests/api_integration/basic.rs423 assert_eq!(record.name, "John Doe");CODE
LOWsurrealdb/tests/api_integration/basic.rs432 assert_eq!(record.name, "John Doe");CODE
LOWsurrealdb/tests/api_integration/basic.rs436 name: "John Doe".to_owned(),CODE
LOWsurrealdb/tests/api_integration/basic.rs443 assert_eq!(record.name, "John Doe");CODE
LOWsurrealdb/tests/api_integration/basic.rs522 name: "John Doe".to_owned(),CODE
LOWsurrealdb/tests/api_integration/basic.rs529 name: "John Doe".to_owned(),CODE
LOWsurrealdb/tests/api_integration/basic.rs543 name: "John Doe".to_owned(),CODE
LOWsurrealdb/tests/api_integration/basic.rs551 name: "Jane Doe".to_owned(),CODE
LOWsurrealdb/tests/api_integration/basic.rs581 name: "John Doe".to_owned(),CODE
LOWsurrealdb/tests/api_integration/basic.rs591 name: "John Doe".to_owned(),CODE
LOWsurrealdb/tests/api_integration/basic.rs1112 name: "Jane Doe".to_owned(),CODE
LOWsurrealdb/tests/api_integration/basic.rs1116 assert_eq!(user.unwrap().name, "Jane Doe");CODE
LOWsurrealdb/tests/api_integration/basic.rs1120 name: "John Doe".to_owned(),CODE
LOWsurrealdb/tests/api_integration/basic.rs1124 assert_eq!(user.unwrap().name, "John Doe");CODE
LOWsurrealdb/tests/api_integration/basic.rs1126 assert_eq!(user.unwrap().name, "John Doe");CODE
LOWsurrealdb/src/method/query.rs231 /// .bind(("name", "John Doe"))COMMENT
LOWsurrealdb/src/method/query.rs252 /// name: "John Doe",COMMENT
LOWsurrealdb/src/method/query.rs854 title: "Lorem Ipsum".to_owned(),CODE
LOWsurrealdb/src/method/query.rs882 title: "Lorem Ipsum".to_owned(),CODE
LOWsurrealdb/src/method/query.rs883 body: "Lorem Ipsum Lorem Ipsum".to_owned(),CODE
LOWsurrealdb/src/method/query.rs918 title: "Lorem Ipsum".to_owned(),CODE
LOWsurrealdb/src/method/query.rs919 body: "Lorem Ipsum Lorem Ipsum".to_owned(),CODE
LOWsurrealdb/src/method/tests/mod.rs88 DB.query("CREATE user:john SET name = $name").bind(("name", "John Doe")).await.unwrap();CODE
LOWsurrealdb/src/method/tests/mod.rs93 name: "John Doe".to_owned(),CODE
LOWtests/graphql_integration.rs2311 CREATE author:a1 SET name = "Jane Doe";CODE
LOWtests/graphql_integration.rs2348 assert_eq!(author["name"], "Jane Doe");CODE
LOWtests/graphql_integration.rs2387 assert_eq!(wrote_in[0]["in"]["name"], "Jane Doe");CODE
Structural Annotation Overuse23 hits · 45 pts
SeverityFileLineSnippetContext
LOWsurrealdb/core/tests/index.rs494 // Step 1: Create a shared datastore and set up 3 namespaces × 3 databases = 9 isolatedCOMMENT
LOWsurrealdb/core/tests/index.rs506 // Step 2: Start a background index compaction loop that continuously triggers compactionCOMMENT
LOWsurrealdb/core/tests/index.rs511 // Step 3: For each session (namespace/database pair), define multiple indexes of differentCOMMENT
LOWsurrealdb/core/tests/index.rs543 // Step 4: For each of the 9 sessions, spawn 6 concurrent write tasks (3 for `user` recordsCOMMENT
LOWsurrealdb/core/tests/index.rs590 // Step 5: Let the concurrent writes and index compaction run together for 10 seconds,COMMENT
LOWsurrealdb/core/tests/index.rs595 // Step 6: Await all write tasks and the compaction loop, propagating any errors.COMMENT
LOWsurrealdb/core/tests/index.rs601 // Step 7: Verify that the background compaction loop exited cleanly. This stress testCOMMENT
LOWsurrealdb/core/src/kvs/tests/tx_cache_test.rs85 // Step 1: Populate the cache with an empty index listCOMMENT
LOWsurrealdb/core/src/kvs/tests/tx_cache_test.rs89 // Step 2: Add an index via put_tb_indexCOMMENT
LOWsurrealdb/core/src/kvs/tests/tx_cache_test.rs101 // Step 3: Query all indexes again — this must see the new indexCOMMENT
LOWsurrealdb/core/src/kvs/tests/tx_cache_test.rs168 // Step 1: Populate the cache with an empty field listCOMMENT
LOWsurrealdb/core/src/kvs/tests/tx_cache_test.rs172 // Step 2: Add a field via put_tb_fieldCOMMENT
LOWsurrealdb/core/src/kvs/tests/tx_cache_test.rs180 // Step 3: Query all fields again — this must see the new fieldCOMMENT
LOWsurrealdb/core/src/catalog/compat/README.md69### Step 1: Run the generatorCOMMENT
LOWsurrealdb/core/src/catalog/compat/README.md77### Step 2: Copy the outputCOMMENT
LOWsurrealdb/core/src/catalog/compat/README.md91### Step 3: Update the hash checkCOMMENT
LOWsurrealdb/core/src/catalog/compat/README.md102### Step 4: Verify tests passCOMMENT
LOWsurrealdb/core/src/catalog/compat/README.md114### Step 1: Update the fixtures used in the generator (if needed)COMMENT
LOWsurrealdb/core/src/catalog/compat/README.md128### Step 2: Generate and save the bytesCOMMENT
LOWsurrealdb/core/src/catalog/compat/README.md136### Step 3: Add the moduleCOMMENT
LOWsurrealdb/core/src/catalog/compat/README.md143### Step 4: Add testsCOMMENT
LOWsurrealdb/core/src/catalog/compat/README.md152### Step 5: Add hash protectionCOMMENT
LOWsurrealdb/core/src/val/record_id.rs237 // NOTE: This method dictates how coversion between values and record id keysCOMMENT
Verbosity Indicators15 hits · 30 pts
SeverityFileLineSnippetContext
LOWsurrealdb/core/tests/index.rs494 // Step 1: Create a shared datastore and set up 3 namespaces × 3 databases = 9 isolatedCOMMENT
LOWsurrealdb/core/tests/index.rs506 // Step 2: Start a background index compaction loop that continuously triggers compactionCOMMENT
LOWsurrealdb/core/tests/index.rs511 // Step 3: For each session (namespace/database pair), define multiple indexes of differentCOMMENT
LOWsurrealdb/core/tests/index.rs543 // Step 4: For each of the 9 sessions, spawn 6 concurrent write tasks (3 for `user` recordsCOMMENT
LOWsurrealdb/core/tests/index.rs590 // Step 5: Let the concurrent writes and index compaction run together for 10 seconds,COMMENT
LOWsurrealdb/core/tests/index.rs595 // Step 6: Await all write tasks and the compaction loop, propagating any errors.COMMENT
LOWsurrealdb/core/tests/index.rs601 // Step 7: Verify that the background compaction loop exited cleanly. This stress testCOMMENT
LOWsurrealdb/core/src/idx/trees/hnsw/index.rs729 // If there is a filter, we need to check if the record is truthyCOMMENT
LOWsurrealdb/core/src/kvs/tests/tx_cache_test.rs85 // Step 1: Populate the cache with an empty index listCOMMENT
LOWsurrealdb/core/src/kvs/tests/tx_cache_test.rs89 // Step 2: Add an index via put_tb_indexCOMMENT
LOWsurrealdb/core/src/kvs/tests/tx_cache_test.rs101 // Step 3: Query all indexes again — this must see the new indexCOMMENT
LOWsurrealdb/core/src/kvs/tests/tx_cache_test.rs168 // Step 1: Populate the cache with an empty field listCOMMENT
LOWsurrealdb/core/src/kvs/tests/tx_cache_test.rs172 // Step 2: Add a field via put_tb_fieldCOMMENT
LOWsurrealdb/core/src/kvs/tests/tx_cache_test.rs180 // Step 3: Query all fields again — this must see the new fieldCOMMENT
LOWsurrealdb/core/src/syn/parser/stmt/mod.rs306 // ANALYZE is not a reserved keyword, so we need to check if it's an identifierCOMMENT
Cross-File Repetition6 hits · 30 pts
SeverityFileLineSnippetContext
HIGHsurrealml/tests/scripts/build_assets.py0checks to see if a directory exists and deletes it if it does. :param dir_path: the path to the directory.STRING
HIGHsurrealml/tests/scripts/local_build.py0checks to see if a directory exists and deletes it if it does. :param dir_path: the path to the directory.STRING
HIGHsurrealml/tests/model_builder/utils.py0checks to see if a directory exists and deletes it if it does. :param dir_path: the path to the directory.STRING
HIGHsurrealml/tests/scripts/build_assets.py0checks to see if a file exists and deletes it if it does. :param file_path: the path to the file.STRING
HIGHsurrealml/tests/scripts/local_build.py0checks to see if a file exists and deletes it if it does. :param file_path: the path to the file.STRING
HIGHsurrealml/tests/model_builder/utils.py0checks to see if a file exists and deletes it if it does. :param file_path: the path to the file.STRING
Self-Referential Comments7 hits · 21 pts
SeverityFileLineSnippetContext
MEDIUM.github/workflows/crud-bench.yml388 # Create a fallback report if analysis failedCOMMENT
MEDIUM.github/workflows/bench.yml77 # # Create a summary of the comparisonCOMMENT
MEDIUM.github/workflows/bench.yml201 # Create a summary of the comparisonCOMMENT
MEDIUM.github/scripts/bump-nightly-version.sh73# Create a branch for the PRCOMMENT
MEDIUM.github/scripts/bump-release-version.sh94# Create a branch for the PRCOMMENT
MEDIUM.github/actions/publish-crate/action.yml53 # Create a temporary branch in case the git ref is not a branchCOMMENT
MEDIUM.github/actions/publish-crate/action.yml71 # Create a temporary branch in case the git ref is not a branchCOMMENT
Excessive Try-Catch Wrapping11 hits · 16 pts
SeverityFileLineSnippetContext
MEDIUMsurrealml/tests/unit_tests/test_surml_file.py25 print(f"Error: surmlcache : {e.strerror}")CODE
MEDIUMsurrealml/tests/unit_tests/engine/test_torch.py24 print(f"Error: surmlcache : {e.strerror}")CODE
MEDIUMsurrealml/tests/unit_tests/engine/test_sklearn.py25 print(f"Error: surmlcache : {e.strerror}")CODE
LOW.github/scripts/quiet_system.py34 except Exception as e:CODE
LOW.github/scripts/quiet_system.py53 except Exception as e:CODE
LOW.github/scripts/quiet_system.py76 except Exception as e:CODE
MEDIUM.github/scripts/analyze_benchmark.py20 print("Error: Python 3.9 or higher is required for secure path validation", file=sys.stderr)CODE
LOW.github/scripts/analyze_benchmark.py114 except Exception:CODE
LOW.github/scripts/analyze_benchmark.py135 except Exception as e:CODE
LOW.github/scripts/analyze_benchmark.py569 except Exception as e:CODE
MEDIUM.github/scripts/analyze_benchmark.py570 print(f"Error during analysis: {e}", file=sys.stderr)CODE
Modern AI Meta-Vocabulary5 hits · 12 pts
SeverityFileLineSnippetContext
MEDIUMdocker/DOCKER.md135The same behavior can be acomplished without Docker Compose by providing the `-u` or `--user` argument to [`docker run`]CODE
MEDIUMsurrealdb/server/src/cli/module/init_cmd.rs157// Rust scaffoldCOMMENT
MEDIUM.github/workflows/release.yml141 # This orchestration job runs against a different branch than the code itCOMMENT
MEDIUM.github/workflows/release.yml636 # This orchestration job runs against a different branch than the code itCOMMENT
MEDIUMsurrealism/runtime/src/config.rs10/// which scaffold to generate) and `build` (to choose which toolchain toCOMMENT
Redundant / Tautological Comments6 hits · 8 pts
SeverityFileLineSnippetContext
LOWsurrealml/tests/model_builder/utils.py19 # Check if the package is installedCOMMENT
LOW.github/workflows/ci.yml674 # Check if any job failed (skipped is ok for conditional jobs)COMMENT
LOW.github/scripts/bump-nightly-version.sh102 # Check if PR already existsCOMMENT
LOW.github/scripts/bump-release-version.sh123 # Check if PR already existsCOMMENT
LOW.github/scripts/analyze_benchmark.py472 # Check if this key_type has any operationsCOMMENT
LOW.github/actions/publish-crate/action.yml78 # Check if the failure was because everything is already publishedCOMMENT
Example Usage Blocks3 hits · 5 pts
SeverityFileLineSnippetContext
LOWsurrealdb/types/src/sql.rs21/// Example usage:COMMENT
LOWscripts/bench/measure.sh11# Usage:COMMENT
LOWscripts/bench/profile.sh15# Usage:COMMENT
Deep Nesting4 hits · 4 pts
SeverityFileLineSnippetContext
LOW.github/scripts/quiet_system.py80CODE
LOW.github/scripts/analyze_benchmark.py92CODE
LOW.github/scripts/analyze_benchmark.py143CODE
LOW.github/scripts/analyze_benchmark.py304CODE
Slop Phrases2 hits · 3 pts
SeverityFileLineSnippetContext
LOWsurrealdb/parser/src/parse/stmt/define.rs755 // Don't forget to update the expectation strings inside the macro if you everCOMMENT
LOWsurrealdb/parser/src/parse/stmt/alter.rs1354 // Don't forget to update the expectation strings inside the macro ifCOMMENT
Hyper-Verbose Identifiers3 hits · 3 pts
SeverityFileLineSnippetContext
LOWsurrealml/tests/scripts/local_build.py36def find_and_move_rust_surrealml_file(start_path: os.path, destination_path: os.path, new_name: str) -> None:CODE
LOWsurrealml/tests/scripts/ci_local_build.py11def find_and_move_rust_surrealml_file(start_path: os.path, destination_path: os.path, new_name: str) -> None:CODE
LOW.github/scripts/analyze_benchmark.py62 def _validate_and_resolve_input_path(file_path: Path, base_dir: Path) -> Optional[Path]:CODE
Unused Imports1 hit · 1 pts
SeverityFileLineSnippetContext
LOWsurrealml/tests/unit_tests/test_rust_adapter.py3CODE