Repository Analysis

DayuanJiang/next-ai-draw-io

A next.js web application that integrates AI capabilities with draw.io diagrams. This app allows you to create, modify, and enhance diagrams through natural language commands and AI-assisted visualization.

6.6 Low AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of DayuanJiang/next-ai-draw-io, a TypeScript project with 33,544 GitHub stars. SynthScan v2.0 examined 55,752 lines of code across 262 source files, recording 100 pattern matches distributed across 7 syntactic categories. The overall adjusted score of 6.6 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).

6.6
Adjusted Score
6.6
Raw Score
100%
Time Factor
2026-07-13
Last Push
33.5K
Stars
TypeScript
Language
55.8K
Lines of Code
262
Files
100
Pattern Hits
2026-07-14
Scan Date
0.23
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 60MEDIUM 13LOW 27

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 100 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.

Magic Placeholder Names60 hits · 300 pts
SeverityFileLineSnippetContext
HIGHdocs/cn/ai-providers.md19DOUBAO_API_KEY=your_api_keyCODE
HIGHdocs/cn/ai-providers.md26GOOGLE_GENERATIVE_AI_API_KEY=your_api_keyCODE
HIGHdocs/cn/ai-providers.md39OPENAI_API_KEY=your_api_keyCODE
HIGHdocs/cn/ai-providers.md54AIHUBMIX_API_KEY=your_api_keyCODE
HIGHdocs/cn/ai-providers.md67ANTHROPIC_API_KEY=your_api_keyCODE
HIGHdocs/cn/ai-providers.md87DEEPSEEK_API_KEY=your_api_keyCODE
HIGHdocs/cn/ai-providers.md100SILICONFLOW_API_KEY=your_api_keyCODE
HIGHdocs/cn/ai-providers.md113SGLANG_API_KEY=your_api_keyCODE
HIGHdocs/cn/ai-providers.md126AZURE_API_KEY=your_api_keyCODE
HIGHdocs/cn/ai-providers.md134AZURE_API_KEY=your_api_keyCODE
HIGHdocs/cn/ai-providers.md160OPENROUTER_API_KEY=your_api_keyCODE
HIGHdocs/cn/ai-providers.md180MODELSCOPE_API_KEY=your_api_keyCODE
HIGHdocs/cn/ai-providers.md239MINIMAX_API_KEY=your_api_keyCODE
HIGHdocs/cn/ai-providers.md262GLM_API_KEY=your_api_keyCODE
HIGHdocs/cn/ai-providers.md275QWEN_API_KEY=your_api_keyCODE
HIGHdocs/cn/ai-providers.md288KIMI_API_KEY=your_api_keyCODE
HIGHdocs/cn/ai-providers.md301QINIU_API_KEY=your_api_keyCODE
HIGHdocs/cn/ai-providers.md314MIMO_API_KEY=your_api_keyCODE
HIGHdocs/cn/docker.md13 -e OPENAI_API_KEY=your_api_key \CODE
HIGHdocs/ja/ai-providers.md19DOUBAO_API_KEY=your_api_keyCODE
HIGHdocs/ja/ai-providers.md26GOOGLE_GENERATIVE_AI_API_KEY=your_api_keyCODE
HIGHdocs/ja/ai-providers.md39OPENAI_API_KEY=your_api_keyCODE
HIGHdocs/ja/ai-providers.md54AIHUBMIX_API_KEY=your_api_keyCODE
HIGHdocs/ja/ai-providers.md67ANTHROPIC_API_KEY=your_api_keyCODE
HIGHdocs/ja/ai-providers.md87DEEPSEEK_API_KEY=your_api_keyCODE
HIGHdocs/ja/ai-providers.md100SILICONFLOW_API_KEY=your_api_keyCODE
HIGHdocs/ja/ai-providers.md113SGLANG_API_KEY=your_api_keyCODE
HIGHdocs/ja/ai-providers.md126AZURE_API_KEY=your_api_keyCODE
HIGHdocs/ja/ai-providers.md134AZURE_API_KEY=your_api_keyCODE
HIGHdocs/ja/ai-providers.md160OPENROUTER_API_KEY=your_api_keyCODE
HIGHdocs/ja/ai-providers.md186MODELSCOPE_API_KEY=your_api_keyCODE
HIGHdocs/ja/ai-providers.md239MINIMAX_API_KEY=your_api_keyCODE
HIGHdocs/ja/ai-providers.md262GLM_API_KEY=your_api_keyCODE
HIGHdocs/ja/ai-providers.md275QWEN_API_KEY=your_api_keyCODE
HIGHdocs/ja/ai-providers.md288KIMI_API_KEY=your_api_keyCODE
HIGHdocs/ja/ai-providers.md301QINIU_API_KEY=your_api_keyCODE
HIGHdocs/ja/ai-providers.md314MIMO_API_KEY=your_api_keyCODE
HIGHdocs/ja/docker.md13 -e OPENAI_API_KEY=your_api_key \CODE
HIGHdocs/en/ai-providers.md19DOUBAO_API_KEY=your_api_keyCODE
HIGHdocs/en/ai-providers.md26GOOGLE_GENERATIVE_AI_API_KEY=your_api_keyCODE
HIGHdocs/en/ai-providers.md41GOOGLE_VERTEX_API_KEY=your_api_keyCODE
HIGHdocs/en/ai-providers.md54OPENAI_API_KEY=your_api_keyCODE
HIGHdocs/en/ai-providers.md69AIHUBMIX_API_KEY=your_api_keyCODE
HIGHdocs/en/ai-providers.md82ANTHROPIC_API_KEY=your_api_keyCODE
HIGHdocs/en/ai-providers.md102DEEPSEEK_API_KEY=your_api_keyCODE
HIGHdocs/en/ai-providers.md115SILICONFLOW_API_KEY=your_api_keyCODE
HIGHdocs/en/ai-providers.md128SGLANG_API_KEY=your_api_keyCODE
HIGHdocs/en/ai-providers.md141AZURE_API_KEY=your_api_keyCODE
HIGHdocs/en/ai-providers.md149AZURE_API_KEY=your_api_keyCODE
HIGHdocs/en/ai-providers.md175OPENROUTER_API_KEY=your_api_keyCODE
HIGHdocs/en/ai-providers.md201MODELSCOPE_API_KEY=your_api_keyCODE
HIGHdocs/en/ai-providers.md254MINIMAX_API_KEY=your_api_keyCODE
HIGHdocs/en/ai-providers.md277GLM_API_KEY=your_api_keyCODE
HIGHdocs/en/ai-providers.md290QWEN_API_KEY=your_api_keyCODE
HIGHdocs/en/ai-providers.md303KIMI_API_KEY=your_api_keyCODE
HIGHdocs/en/ai-providers.md316QINIU_API_KEY=your_api_keyCODE
HIGHdocs/en/ai-providers.md329MIMO_API_KEY=your_api_keyCODE
HIGHdocs/en/docker.md13 -e OPENAI_API_KEY=your_api_key \CODE
HIGHdocs/en/docker.md31 -e OPENAI_API_KEY=your_api_key \CODE
HIGHdocs/en/docker.md40 -e OPENAI_API_KEY=your_api_key \CODE
Decorative Section Separators12 hits · 36 pts
SeverityFileLineSnippetContext
MEDIUMapp/[lang]/admin/setting-field.tsx25// ── Small shared UI bits ─────────────────────────────────────────────COMMENT
MEDIUMapp/[lang]/admin/setting-field.tsx134// ── General settings field (registry-driven) ─────────────────────────COMMENT
MEDIUMapp/[lang]/admin/admin-shared.ts6// ── Shared types ─────────────────────────────────────────────────────COMMENT
MEDIUMapp/[lang]/admin/models-section.tsx50// ── Models section (mirrors the user ModelConfigDialog) ──────────────COMMENT
MEDIUMapp/[lang]/admin/page.tsx36// ── Page ─────────────────────────────────────────────────────────────COMMENT
MEDIUMapp/[lang]/admin/page.tsx305 // ── Login screen ─────────────────────────────────────────────────COMMENT
MEDIUMapp/[lang]/admin/page.tsx373 // ── Settings screen ──────────────────────────────────────────────COMMENT
MEDIUMlib/admin/settings-registry.ts73 // ── Generation ───────────────────────────────────────────────────COMMENT
MEDIUMlib/admin/settings-registry.ts92 // ── Access Control ───────────────────────────────────────────────COMMENT
MEDIUMlib/admin/settings-registry.ts103 // ── Features ─────────────────────────────────────────────────────COMMENT
MEDIUMlib/admin/settings-registry.ts144 // ── Observability ────────────────────────────────────────────────COMMENT
MEDIUMlib/admin/settings-registry.ts169 // ── Quota ────────────────────────────────────────────────────────COMMENT
Hyper-Verbose Identifiers16 hits · 16 pts
SeverityFileLineSnippetContext
LOWapp/api/chat/route.ts44function createCachedStreamResponse(xml: string): Response {CODE
LOWtests/e2e/lib/fixtures.ts194export async function expectBeforeAndAfterReload(CODE
LOWcomponents/provider-credentials-fields.tsx65export function ProviderCredentialsFields({CODE
LOWcomponents/chat-message-display.tsx74function splitTextIntoFileSections(text: string): TextSection[] {CODE
LOWcomponents/settings-dialog.tsx83function getStoredAccessCodeRequired(): boolean | null {CODE
LOWpackages/mcp-server/src/http-server.ts81function ensureSessionStateInitialized(sessionId: string): void {CODE
LOWpackages/mcp-server/src/xml-validation.ts950export function validateAndFixXml(xml: string): {CODE
LOWlib/chat-helpers.ts53export function replaceHistoricalToolInputs(messages: any[]): any[] {CODE
LOWlib/utils.ts1639export function validateAndFixXml(xml: string): {CODE
LOWlib/ai-providers.ts64export function isAihubmixStandardBaseURL(CODE
LOWlib/ai-providers.ts632function validateProviderCredentials(CODE
LOWlib/server-model-config.ts70function configFromCommaSeparatedAiModel(): ServerModelsConfig | null {CODE
LOWlib/server-model-config.ts112export async function loadEnvServerModelsConfig(): Promise<ServerModelsConfig | null> {CODE
LOWlib/server-model-config.ts148export async function loadRawServerModelsConfig(): Promise<ServerModelsConfig | null> {CODE
LOWlib/server-model-config.ts182export async function loadFlattenedServerModels(): Promise<CODE
LOWelectron/main/settings-window.ts74export function registerSettingsWindowHandlers(): void {CODE
Fake / Example Data8 hits · 8 pts
SeverityFileLineSnippetContext
LOWlib/i18n/dictionaries/zh.json41 "placeholder": "描述您的图表或上传文件...",CODE
LOWlib/i18n/dictionaries/zh.json243 "placeholder": "在此粘贴 mxCell XML 或选择预设...",CODE
LOWlib/i18n/dictionaries/ja.json41 "placeholder": "ダイアグラムを説明するか、ファイルをアップロード...",CODE
LOWlib/i18n/dictionaries/ja.json243 "placeholder": "ここに mxCell XML を貼り付けるか、プリセットを選択...",CODE
LOWlib/i18n/dictionaries/en.json41 "placeholder": "Describe your diagram or upload a file...",CODE
LOWlib/i18n/dictionaries/en.json243 "placeholder": "Paste mxCell XML here or select a preset...",CODE
LOWlib/i18n/dictionaries/zh-Hant.json41 "placeholder": "描述您的圖表或上傳檔案...",CODE
LOWlib/i18n/dictionaries/zh-Hant.json243 "placeholder": "在此貼上 mxCell XML 或選擇預設...",CODE
Self-Referential Comments1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUMpackages/mcp-server/src/index.ts172## Creating a New DiagramCOMMENT
Over-Commented Block2 hits · 2 pts
SeverityFileLineSnippetContext
LOWpackages/mcp-server/src/http-server.ts841 }COMMENT
LOWlib/admin/settings-registry.ts1// Declarative registry of the general env vars editable in the admin panel.COMMENT
Overly Generic Function Names1 hit · 1 pts
SeverityFileLineSnippetContext
LOWpackages/mcp-server/src/http-server.ts244function handleRequest(CODE