Repository Analysis

typeorm/typeorm

TypeScript & JavaScript ORM for Node.js — supports PostgreSQL, MySQL, MariaDB, SQLite, SQL Server, Oracle, and more.

9.0 Low AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of typeorm/typeorm, a TypeScript project with 36,589 GitHub stars. SynthScan v2.0 examined 349,648 lines of code across 3471 source files, recording 359 pattern matches distributed across 8 syntactic categories. The overall adjusted score of 9.0 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).

9.0
Adjusted Score
9.0
Raw Score
100%
Time Factor
2026-07-13
Last Push
36.6K
Stars
TypeScript
Language
349.6K
Lines of Code
3.5K
Files
359
Pattern Hits
2026-07-14
Scan Date
0.08
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 270HIGH 4MEDIUM 1LOW 84

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 359 distinct pattern matches across 8 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.

Hallucination Indicators270 hits · 3050 pts
SeverityFileLineSnippetContext
CRITICALtest/github-issues/4719/issue-4719.test.ts42 loadedPost.hstoreObj.should.be.deep.equal({CODE
CRITICALtest/github-issues/4719/issue-4719.test.ts68 loadedPost.hstoreObj.should.be.deep.equal({CODE
CRITICALtest/github-issues/306/issue-306.test.ts45 loadedRace.duration.durationDays.should.be.equal(1)CODE
CRITICALtest/github-issues/306/issue-306.test.ts46 loadedRace.duration.durationHours.should.be.equal(10)CODE
CRITICALtest/github-issues/306/issue-306.test.ts47 loadedRace.duration.durationMinutes.should.be.equal(30)CODE
CRITICALtest/github-issues/620/issue-620.test.ts40 loadedCat.dog.DogID.should.be.equal("Simba")CODE
CRITICALtest/github-issues/2779/issue-2779.test.ts41 post.roles.should.be.deep.equal(targetValue)CODE
CRITICALtest/github-issues/2779/issue-2779.test.ts50 loadedPost.roles.should.be.deep.equal(targetValue)CODE
CRITICALtest/github-issues/1960/issue-1960.test.ts27 sqlInMemory.upQueries.length.should.be.equal(0)CODE
CRITICALtest/github-issues/3120/issue-3120.test.ts133 loadedLog.person.name.should.be.equal("Test Person #1")CODE
CRITICALtest/github-issues/3120/issue-3120.test.ts134 loadedLog.actionDetails.description.should.be.equal(CODE
CRITICALtest/github-issues/3120/issue-3120.test.ts137 loadedLog.addresses.length.should.be.equal(3)CODE
CRITICALtest/github-issues/9272/issue-9272.test.ts82 user.address.latLong.should.not.haveOwnProperty("longitude")CODE
CRITICALtest/github-issues/9272/issue-9272.test.ts84 user.address.latLong.latitude.should.equal(-23)CODE
CRITICALtest/github-issues/7521/issue-7521.test.ts27 sqlInMemory.upQueries.length.should.be.greaterThan(0)CODE
CRITICALtest/github-issues/7521/issue-7521.test.ts28 sqlInMemory.downQueries.length.should.be.greaterThan(0)CODE
CRITICALtest/github-issues/7521/issue-7521.test.ts39 sqlInMemory.upQueries.length.should.be.equal(0)CODE
CRITICALtest/github-issues/7521/issue-7521.test.ts40 sqlInMemory.downQueries.length.should.be.equal(0)CODE
CRITICALtest/github-issues/2044/issue-2044.test.ts45 resultPhoto.user.id.should.be.eql(userId)CODE
CRITICALtest/github-issues/7541/issue-7541.test.ts27 sqlInMemory.upQueries.length.should.be.greaterThan(0)CODE
CRITICALtest/github-issues/7541/issue-7541.test.ts28 sqlInMemory.downQueries.length.should.be.greaterThan(0)CODE
CRITICALtest/github-issues/7541/issue-7541.test.ts39 sqlInMemory.upQueries.length.should.be.equal(0)CODE
CRITICALtest/github-issues/7541/issue-7541.test.ts40 sqlInMemory.downQueries.length.should.be.equal(0)CODE
CRITICAL…onal/repository/increment/repository-increment.test.ts335 loadedUser.friend.sent.should.be.equal(5)CODE
CRITICAL…onal/repository/decrement/repository-decrement.test.ts335 loadedUser.friend.sent.should.be.equal(-15)CODE
CRITICAL…-relations/repository-set-add-remove-relations.test.ts159 loadedPost.manyCategories.length.should.be.equal(1)CODE
CRITICAL…-relations/repository-set-add-remove-relations.test.ts206 loadedCategory.manyPosts.length.should.be.equal(1)CODE
CRITICAL…tions/basic-lazy-relation/basic-lazy-relations.test.ts59 await savedPost.categories.should.eventually.be.eql([CODE
CRITICAL…tions/basic-lazy-relation/basic-lazy-relations.test.ts105 await savedPost.twoSideCategories.should.eventually.be.eql([CODE
CRITICAL…tions/basic-lazy-relation/basic-lazy-relations.test.ts152 await newUser.profile.should.eventually.be.eql(profile)CODE
CRITICAL…olumns/named-tables-and-columns-lazy-relations.test.ts50 await savedPost.categories.should.eventually.be.eql([CODE
CRITICAL…olumns/named-tables-and-columns-lazy-relations.test.ts98 await savedPost.twoSideCategories.should.eventually.be.eql([CODE
CRITICAL…tions/named-tables/named-tables-lazy-relations.test.ts50 await savedPost.categories.should.eventually.be.eql([CODE
CRITICAL…tions/named-tables/named-tables-lazy-relations.test.ts98 await savedPost.twoSideCategories.should.eventually.be.eql([CODE
CRITICAL…ons/named-columns/named-columns-lazy-relations.test.ts50 await savedPost.categories.should.eventually.be.eql([CODE
CRITICAL…ons/named-columns/named-columns-lazy-relations.test.ts96 await savedPost.twoSideCategories.should.eventually.be.eql([CODE
CRITICAL…nce/single-table/no-type-column/no-type-column.test.ts60 postIt.owner.should.be.an.instanceOf(Employee)CODE
CRITICAL…nce/single-table/no-type-column/no-type-column.test.ts61 postIt.owner.name.should.be.equal("alicefoo")CODE
CRITICAL…nce/single-table/no-type-column/no-type-column.test.ts62 postIt.owner.employeeName.should.be.equal("Alice Foo")CODE
CRITICAL…nce/single-table/no-type-column/no-type-column.test.ts68 sticky.owner.should.be.an.instanceOf(Author)CODE
CRITICAL…nce/single-table/no-type-column/no-type-column.test.ts69 sticky.owner.name.should.be.equal("bobbar")CODE
CRITICAL…nce/single-table/no-type-column/no-type-column.test.ts70 sticky.owner.authorName.should.be.equal("Bob Bar")CODE
CRITICAL…/repository-actions/mongodb-repository-actions.test.ts95 mergedPost.counters.likes.should.be.equal(2)CODE
CRITICAL…/repository-actions/mongodb-repository-actions.test.ts96 mergedPost.counters.viewer.name.should.be.equal("Hello World")CODE
CRITICAL…godb/basic/array-columns/mongodb-array-columns.test.ts52 loadedPost.other1.length.should.be.equal(0)CODE
CRITICAL…asic/embedded-columns/mongodb-embedded-columns.test.ts53 loadedPost.counters.likes.should.be.equal(5)CODE
CRITICAL…asic/embedded-columns/mongodb-embedded-columns.test.ts54 loadedPost.counters.comments.should.be.equal(1)CODE
CRITICAL…asic/embedded-columns/mongodb-embedded-columns.test.ts55 loadedPost.counters.favorites.should.be.equal(10)CODE
CRITICAL…asic/embedded-columns/mongodb-embedded-columns.test.ts56 loadedPost.counters.information.should.be.instanceOf(CODE
CRITICAL…asic/embedded-columns/mongodb-embedded-columns.test.ts59 loadedPost.counters.information.description.should.be.equal(CODE
CRITICAL…asic/embedded-columns/mongodb-embedded-columns.test.ts78 loadedUpdatedPost.counters.likes.should.be.equal(5)CODE
CRITICAL…asic/embedded-columns/mongodb-embedded-columns.test.ts79 loadedUpdatedPost.counters.comments.should.be.equal(2)CODE
CRITICAL…asic/embedded-columns/mongodb-embedded-columns.test.ts80 loadedUpdatedPost.counters.favorites.should.be.equal(10)CODE
CRITICAL…asic/embedded-columns/mongodb-embedded-columns.test.ts81 loadedUpdatedPost.counters.information.should.be.instanceOf(CODE
CRITICAL…asic/embedded-columns/mongodb-embedded-columns.test.ts84 loadedUpdatedPost.counters.information.description.should.be.equal(CODE
CRITICAL…asic/embedded-columns/mongodb-embedded-columns.test.ts123 loadedPost.counters.likes.should.be.eql(5)CODE
CRITICAL…asic/embedded-columns/mongodb-embedded-columns.test.ts124 loadedPost.counters.comments.should.be.eql(1)CODE
CRITICAL…asic/embedded-columns/mongodb-embedded-columns.test.ts125 loadedPost.counters.favorites.should.be.eql(10)CODE
CRITICAL…asic/embedded-columns/mongodb-embedded-columns.test.ts126 loadedPost.counters.information.description.should.be.eql(CODE
CRITICAL…asic/embedded-columns/mongodb-embedded-columns.test.ts155 loadedPosts[0]!.counters.information.visible.should.be.equal(CODE
210 more matches not shown…
Over-Commented Block39 hits · 39 pts
SeverityFileLineSnippetContext
LOWtest/github-issues/3118/issue-3118.test.ts81 relations: {COMMENT
LOWextra/typeorm-class-transformer-shim.js1// this "shim" can be used on the frontend to make class-transformer to work with typeorm models automaticallyCOMMENT
LOWextra/typeorm-model-shim.js1// this "shim" can be used on the frontend to prevent from errors on undefinedCOMMENT
LOWpackages/codemod/src/transforms/ast-helpers.ts501 )COMMENT
LOW…/codemod/src/transforms/v1/connection-to-datasource.ts661 // on parameters typed with those options.COMMENT
LOW.github/workflows/publish-package.yml1# Publishing strategy:COMMENT
LOW.github/workflows/pr-triage.yml1# SECURITY: This workflow uses pull_request_target for write access on fork PRs.COMMENT
LOWsrc/metadata-builder/EntityMetadataValidator.ts241 }COMMENT
LOWsrc/driver/react-native/ReactNativeDriver.ts861 tableColumn.isGenerated !== columnMetadata.isGenerated)COMMENT
LOWsrc/driver/react-native/ReactNativeDriver.ts881 // console.log(COMMENT
LOWsrc/driver/react-native/ReactNativeDriver.ts901 // )COMMENT
LOWsrc/driver/react-native/ReactNativeDriver.ts921 // !OrmUtils.isArraysEqual(COMMENT
LOWsrc/driver/oracle/OracleDriver.ts901 // tableColumn.name,COMMENT
LOWsrc/driver/oracle/OracleDriver.ts921 // "comment:",COMMENT
LOWsrc/driver/oracle/OracleDriver.ts941 // tableColumn.onUpdate,COMMENT
LOWsrc/driver/oracle/OracleDriver.ts961 // tableColumn.generatedType,COMMENT
LOWsrc/driver/postgres/PostgresDriver.ts1521 // if (isColumnChanged) {COMMENT
LOWsrc/driver/postgres/PostgresDriver.ts1541 // columnMetadata.isArray,COMMENT
LOWsrc/driver/postgres/PostgresDriver.ts1561 // tableColumn.enum &&COMMENT
LOWsrc/driver/postgres/PostgresDriver.ts1581 // this.normalizeIsUnique(columnMetadata),COMMENT
LOWsrc/driver/postgres/PostgresDriver.ts1601 // columnMetadata.collation,COMMENT
LOWsrc/driver/mysql/MysqlDriver.ts361 // if (!(this.options.host || (this.options.extra && this.options.extra.socketPath)) && !this.options.socketPathCOMMENT
LOWsrc/driver/mysql/MysqlQueryRunner.ts2601 // Short Version:COMMENT
LOWsrc/driver/sqlserver/SqlServerDriver.ts301 this.options.replicationCOMMENT
LOWsrc/driver/sqlserver/SqlServerDriver.ts921 // "type:",COMMENT
LOWsrc/driver/sqlserver/SqlServerDriver.ts941 // columnMetadata.isGenerated,COMMENT
LOWsrc/driver/sqlserver/SqlServerDriver.ts961 // columnMetadata.isNullable,COMMENT
LOWsrc/driver/spanner/SpannerDriver.ts721 // "name:",COMMENT
LOWsrc/driver/spanner/SpannerDriver.ts741 // "generatedType:",COMMENT
LOWsrc/driver/spanner/SpannerQueryRunner.ts1841 // const hasTable = await this.hasTable(this.getTypeormMetadataTableName())COMMENT
LOWsrc/driver/spanner/SpannerQueryRunner.ts1861 // ? ` AND \`T\`.\`NAME\` IN (${escapedViewNames})`COMMENT
LOWsrc/driver/cockroachdb/CockroachDriver.ts301 ).databaseCOMMENT
LOWsrc/persistence/SubjectExecutor.ts921 })COMMENT
LOW…ersistence/subject-builder/ManyToManySubjectBuilder.ts141 const relatedEntitySubject = this.subjects.find((subject) => {COMMENT
LOW…e/subject-builder/OneToOneInverseSideSubjectBuilder.ts121 operateSubject.entity === relatedEntityCOMMENT
LOWsrc/query-builder/InsertQueryBuilder.ts1541 // } else if (column.isNestedSetLeft) {COMMENT
LOWsrc/query-builder/SelectQueryBuilder.ts3321 // if (this.conditions.length) {COMMENT
LOWsrc/query-builder/SelectQueryBuilder.ts3981 // } else if (relation) {COMMENT
LOWsrc/query-builder/SelectQueryBuilder.ts4261 ? "NULLS LAST"COMMENT
Fake / Example Data31 hits · 34 pts
SeverityFileLineSnippetContext
LOWtest/benchmark/bulk-save-case2/bulk-save-case2.test.ts31 "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent vel faucibus nunc. Etiam voluCODE
LOWtest/benchmark/bulk-save-case2/bulk-save-case2.test.ts31 "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent vel faucibus nunc. Etiam voluCODE
LOW…/bulk-save-querybuilder/bulk-save-querybuilder.test.ts31 "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent vel faucibus nunc. Etiam voluCODE
LOW…/bulk-save-querybuilder/bulk-save-querybuilder.test.ts31 "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent vel faucibus nunc. Etiam voluCODE
LOWtest/github-issues/1123/issue-1123.test.ts29 author.name = "Jane Doe"CODE
LOWtest/github-issues/1123/issue-1123.test.ts55 name: "Jane Doe",CODE
LOWtest/github-issues/10569/issue-10569.test.ts31 name: "John Doe",CODE
LOWtest/github-issues/2128/issue-2128.test.ts38 author: "John Doe",CODE
LOWtest/github-issues/2128/issue-2128.test.ts60 author: "John Doe",CODE
LOWtest/github-issues/4106/issue-4106.test.ts28 human.name = "Jane Doe"CODE
LOWtest/github-issues/1416/issue-1416.test.ts44 photoAuthor.name = "John Doe"CODE
LOWtest/github-issues/215/issue-215.test.ts27 author.name = "John Doe"CODE
LOWtest/github-issues/4096/issue-4096.test.ts31 user1.email = "example@example.org"CODE
LOWtest/github-issues/4096/issue-4096.test.ts36 user2.email = "example@example.org"CODE
LOWtest/github-issues/3416/issue-3416.test.ts31 unknownProp: "John Doe",CODE
LOWtest/github-issues/1308/issue-1308.test.ts30 author.name = "Jane Doe"CODE
LOWtest/github-issues/1308/issue-1308.test.ts42 .set({ name: "John Doe" })CODE
LOWtest/github-issues/1308/issue-1308.test.ts51 .set({ name: "John Doe" })CODE
LOWtest/github-issues/1308/issue-1308.test.ts52 .where("name = :name", { name: "Jane Doe" })CODE
LOWtest/github-issues/4156/issue-4156.test.ts29 author.name = "Jane Doe"CODE
LOW…ns/repository-aggregate-methods-with-relations.test.ts220 name: "John Doe",CODE
LOW…ns/repository-aggregate-methods-with-relations.test.ts234 author: { id: author1.id, name: "John Doe" },CODE
LOWtest/functional/data-source/data-source.test.ts436 address: "123 Main St",CODE
LOWtest/functional/query-runner/async-dispose.test.ts49 await queryRunner.sql`INSERT INTO "employee"("name", "companyId") VALUES ('John Doe', 100)`CODE
LOW…onal/query-builder/update/query-builder-update.test.ts306 .set({ name: "John Doe" } as any)CODE
LOW…onal/query-builder/delete/query-builder-delete.test.ts124 user1.name = "John Doe"CODE
LOW…onal/query-builder/delete/query-builder-delete.test.ts126 user2.name = "Jane Doe"CODE
LOWdocs/docs/guides/6-sequelize-migration.md239 name: "John Doe",CODE
LOWdocs/docs/guides/6-sequelize-migration.md248employee.name = "John Doe"CODE
LOWdocs/docs/guides/6-sequelize-migration.md256const employee = Employee.create({ name: "John Doe", title: "senior engineer" })CODE
LOWdocs/docs/guides/6-sequelize-migration.md263const employee = await Employee.preload({ id: 1, name: "John Doe" })CODE
Cross-Language Confusion (JS/TS)4 hits · 20 pts
SeverityFileLineSnippetContext
HIGH…epository/find-methods/repostiory-find-methods.test.ts344 it("should return True when matches the given criteria", () =>CODE
HIGH…epository/find-methods/repostiory-find-methods.test.ts365 it("should return True when matches the given multiple criteria", () =>CODE
HIGH…epository/find-methods/repostiory-find-methods.test.ts387 it("should return True when matches the given find options", () =>CODE
HIGH…epository/find-methods/repostiory-find-methods.test.ts408 it("should return True when matches both criteria and find options", () =>CODE
Hyper-Verbose Identifiers7 hits · 7 pts
SeverityFileLineSnippetContext
LOWtest/utils/test-utils.ts171export function setupSingleTestingConnection(CODE
LOWtest/utils/test-utils.ts530export async function createTypeormMetadataTable(CODE
LOWtest/github-issues/8444/issue-8444.test.ts13 async function bootstrapWithoutEntitySkipConstructor(): Promise<CODE
LOWtest/functional/driver/MongoDriver.test.ts8 async function getConnectionUrlFromFakedMongoClient(CODE
LOW…mod/src/transforms/v1/find-options-string-relations.ts46function convertRelationsArrayToObject(values: string[]): NestedObject {CODE
LOWsrc/util/DirectoryExportedClassesLoader.ts15export async function importClassesFromDirectories(CODE
LOWsrc/driver/mongodb/bson.typings.ts1590export declare function serializeWithBufferAndIndex(object: Document, finalBuffer: Uint8Array, options?: SerializeOptionCODE
Verbosity Indicators4 hits · 6 pts
SeverityFileLineSnippetContext
LOWsrc/driver/sqlite-abstract/AbstractSqliteQueryRunner.ts2320 // Step 1: clear data for removed generated columnsCOMMENT
LOWsrc/driver/sqlite-abstract/AbstractSqliteQueryRunner.ts2354 // Step 2: add data for new generated columnsCOMMENT
LOWsrc/driver/sqlite-abstract/AbstractSqliteQueryRunner.ts2380 // Step 3: update changed expressionsCOMMENT
LOW…e/subject-builder/OneToOneInverseSideSubjectBuilder.ts84 // if related entity is null then we need to check if there a bind in the database and unset itCOMMENT
Structural Annotation Overuse3 hits · 4 pts
SeverityFileLineSnippetContext
LOWsrc/driver/sqlite-abstract/AbstractSqliteQueryRunner.ts2320 // Step 1: clear data for removed generated columnsCOMMENT
LOWsrc/driver/sqlite-abstract/AbstractSqliteQueryRunner.ts2354 // Step 2: add data for new generated columnsCOMMENT
LOWsrc/driver/sqlite-abstract/AbstractSqliteQueryRunner.ts2380 // Step 3: update changed expressionsCOMMENT
Modern AI Meta-Vocabulary1 hit · 2 pts
SeverityFileLineSnippetContext
MEDIUMdocs/docs/releases/1.0/01-release-notes.md187- **CLI `init` command** — no longer crashes when `package.json` does not exist ([#11947](https://github.com/typeorm/typCODE