Repository Analysis

mruby/mruby

Lightweight Ruby

3.3 Likely human-written View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of mruby/mruby, a C project with 5,590 GitHub stars. SynthScan v2.0 examined 174,609 lines of code across 630 source files, recording 508 pattern matches distributed across 10 syntactic categories. The overall adjusted score of 3.3 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.3
Adjusted Score
3.3
Raw Score
100%
Time Factor
2026-07-14
Last Push
5.6K
Stars
C
Language
174.6K
Lines of Code
630
Files
508
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 28LOW 480

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 508 distinct pattern matches across 10 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 Block440 hits · 430 pts
SeverityFileLineSnippetContext
LOWbuild_config.rb1# The default build configuration file was moved to `build_config/default.rb`.COMMENT
LOWbenchmark/vm_optimization_bench.rb1# VM Optimization Benchmarks for mrubyCOMMENT
LOWmrblib/compar.rb1##COMMENT
LOWmrblib/compar.rb41 ##COMMENT
LOWmrblib/compar.rb61 # false.COMMENT
LOWmrblib/string.rb81 # Replace all matches of `pattern` with `replacement`.COMMENT
LOWmrblib/string.rb161 # those two methods requires Regexp that is optional in mrubyCOMMENT
LOWmrblib/enum.rb1##COMMENT
LOWmrblib/enum.rb21 # if one block value is false. OtherwiseCOMMENT
LOWmrblib/enum.rb161 # Return true if at least one element whichCOMMENT
LOWmrblib/enum.rb321 # ISO 15.3.2.2.18COMMENT
LOWmrblib/array.rb1##COMMENT
LOWmrblib/array.rb61 while idx < lenCOMMENT
LOWmrblib/array.rb81 # array.sort {|a, b| ... } -> new_arrayCOMMENT
LOWmrblib/numeric.rb1##COMMENT
LOWmrblib/hash.rb1##COMMENT
LOWmrblib/hash.rb21 # was found. Return nil if nothing wasCOMMENT
LOWmrblib/hash.rb41 # and pass the key and value of each element.COMMENT
LOWmrblib/hash.rb61 while i < lenCOMMENT
LOWmrblib/hash.rb81 # <em>produces:</em>COMMENT
LOWmrblib/hash.rb101 # If no block is given, an enumerator is returned instead.COMMENT
LOWmrblib/hash.rb121 # hsh.merge(other_hash..) -> hshCOMMENT
LOWmrblib/hash.rb181 endCOMMENT
LOWmrblib/hash.rb261 endCOMMENT
LOWmrblib/range.rb1##COMMENT
LOWmrblib/kernel.rb1##COMMENT
LOWtest/assert.rb241 unless ret = obj1.__send__(op, obj2) == affirmedCOMMENT
LOWtest/t/localjumperror.rb1##COMMENT
LOWtest/t/module.rb581 # assert_separately [], %{COMMENT
LOWtest/t/module.rb601 # a = c.newCOMMENT
LOWtest/t/module.rb621COMMENT
LOWtest/t/regexperror.rb1##COMMENT
LOWtest/t/lang.rb1# The aim of these tests is to detect pitfall for optimized VM.COMMENT
LOWinclude/mruby.h41#endifCOMMENT
LOWinclude/mruby.h61#define SIZE_MAX __SIZE_MAX__COMMENT
LOWinclude/mruby.h81#if (defined __cplusplus && __cplusplus >= 201703L)COMMENT
LOWinclude/mruby.h121#define mrb_static_assert_powerof2(num) mrb_static_assert((num) > 0 && (num) == ((num) & -(num)), "need power of 2 for "COMMENT
LOWinclude/mruby.h1501MRB_API mrb_value mrb_obj_clone(mrb_state *mrb, mrb_value self);COMMENT
LOWinclude/mruby.h1541#define E_STANDARD_ERROR mrb->eStandardError_classCOMMENT
LOWinclude/mrbconf.h41#if defined(MRB_USE_FLOAT32) && defined(MRB_NO_FLOAT)COMMENT
LOWinclude/mrbconf.h81 Default for 64-bit CPU mode (unless using MRB_NAN_BOXING). */COMMENT
LOWinclude/mrbconf.h181COMMENT
LOWinclude/mrbconf.h221COMMENT
LOWinclude/mrbconf.h241# ifndef MRB_METHOD_CACHE_SIZECOMMENT
LOWinclude/mruby/dump.h41#define MRB_DUMP_WRITE_FAULT (-2)COMMENT
LOWinclude/mruby/version.h101 MRUBY_RELEASE_DAY_STRCOMMENT
LOWinclude/mruby/presym.h41#define MRB_SYM_E(name) MRB_SYM_E__##nameCOMMENT
LOWinclude/mruby/proc.h81#define MRB_PROC_CFUNC_FL 128COMMENT
LOWinclude/mruby/proc.h181COMMENT
LOWinclude/mruby/boxing_no.h21 mrb_sym sym;COMMENT
LOWinclude/mruby/boxing_no.h41 (o).tt = ttt;\COMMENT
LOWinclude/mruby/numeric.h21#define TYPED_FIXABLE(f,t) (TYPED_POSFIXABLE(f,t) && TYPED_NEGFIXABLE(f,t))COMMENT
LOWinclude/mruby/numeric.h141# define MRB_FLT_MANT_DIG FLT_MANT_DIGCOMMENT
LOWinclude/mruby/endian.h21# define LITTLE_ENDIAN __ORDER_LITTLE_ENDIAN__COMMENT
LOWinclude/mruby/value.h41# define TRUE trueCOMMENT
LOWinclude/mruby/value.h61# define PRIu64 "llu"COMMENT
LOWinclude/mruby/value.h81# define MRB_PRIo PRIo64COMMENT
LOWinclude/mruby/value.h121# define vsnprintf(s, n, format, arg) mrb_msvc_vsnprintf(s, n, format, arg)COMMENT
LOWinclude/mruby/value.h201COMMENT
LOWinclude/mruby/value.h221# define MRB_SSIZE_MAX INTPTR_MAXCOMMENT
380 more matches not shown…
Decorative Section Separators18 hits · 54 pts
SeverityFileLineSnippetContext
MEDIUMbenchmark/vm_optimization_bench.rb35#=============================================================================COMMENT
MEDIUMbenchmark/vm_optimization_bench.rb38#=============================================================================COMMENT
MEDIUMbenchmark/vm_optimization_bench.rb61#=============================================================================COMMENT
MEDIUMbenchmark/vm_optimization_bench.rb64#=============================================================================COMMENT
MEDIUMbenchmark/vm_optimization_bench.rb125#=============================================================================COMMENT
MEDIUMbenchmark/vm_optimization_bench.rb128#=============================================================================COMMENT
MEDIUMbenchmark/vm_optimization_bench.rb207#=============================================================================COMMENT
MEDIUMbenchmark/vm_optimization_bench.rb210#=============================================================================COMMENT
MEDIUMbenchmark/vm_optimization_bench.rb264#=============================================================================COMMENT
MEDIUMbenchmark/vm_optimization_bench.rb267#=============================================================================COMMENT
MEDIUMbenchmark/vm_optimization_bench.rb314#=============================================================================COMMENT
MEDIUMbenchmark/vm_optimization_bench.rb317#=============================================================================COMMENT
MEDIUMbenchmark/vm_optimization_bench.rb373#=============================================================================COMMENT
MEDIUMbenchmark/vm_optimization_bench.rb376#=============================================================================COMMENT
MEDIUMbenchmark/vm_optimization_bench.rb424#=============================================================================COMMENT
MEDIUMbenchmark/vm_optimization_bench.rb427#=============================================================================COMMENT
MEDIUMbenchmark/vm_optimization_bench.rb457#=============================================================================COMMENT
MEDIUMbenchmark/vm_optimization_bench.rb459#=============================================================================COMMENT
Self-Referential Comments10 hits · 34 pts
SeverityFileLineSnippetContext
MEDIUMtest/assert.rb54# Create the assertion in a readable wayCOMMENT
MEDIUMmrbgems/mruby-struct/src/struct.c252 * # Create a structure with a name in StructCOMMENT
MEDIUMmrbgems/mruby-struct/src/struct.c256 * # Create a structure named by its constantCOMMENT
MEDIUMmrbgems/mruby-struct/src/struct.c260 * # Create a structure with keyword initializationCOMMENT
MEDIUMmrbgems/mruby-task/examples/statistics.rb29# Create a monitor taskCOMMENT
MEDIUMmrbgems/mruby-task/examples/simple.rb7# Create a simple taskCOMMENT
MEDIUMmrbgems/mruby-task/examples/suspend_resume.rb9# Create a worker taskCOMMENT
MEDIUMmrbgems/mruby-task/examples/suspend_resume.rb19# Create a controller taskCOMMENT
MEDIUMmrbgems/mruby-task/examples/inspection.rb29# Create an observer taskCOMMENT
MEDIUMmrbgems/mruby-data/src/data.c315 * # Create a structure named by its constantCOMMENT
Fake / Example Data18 hits · 28 pts
SeverityFileLineSnippetContext
LOWmrbgems/mruby-struct/src/struct.c262 * User.new(id: 1, email: "user@example.com")COMMENT
LOWmrbgems/mruby-struct/src/struct.c263 * #=> #<struct User id=1, email="user@example.com">COMMENT
LOWmrbgems/mruby-struct/src/struct.c586 * jane = Customer.new("Jane Doe", "456 Elm, Anytown NC", 12345)COMMENT
LOWmrbgems/mruby-data/README.md32customer1 = Customer.new("John Doe", "123 Main St", 12345)CODE
LOWmrbgems/mruby-data/README.md32customer1 = Customer.new("John Doe", "123 Main St", 12345)CODE
LOWmrbgems/mruby-data/README.md38customer2 = Customer.new(name: "Jane Doe", address: "456 Oak Ave", zip: 67890)CODE
LOWmrbgems/mruby-data/README.md49puts customer1.name # Output: "John Doe"CODE
LOWmrbgems/mruby-data/README.md78 # Output: {:name=>"John Doe", :address=>"123 Main St", :zip=>12345}COMMENT
LOWmrbgems/mruby-data/README.md78 # Output: {:name=>"John Doe", :address=>"123 Main St", :zip=>12345}COMMENT
LOWmrbgems/mruby-data/README.md92 puts customer1 # Output: #<data Customer name="John Doe", address="123 Main St", zip=12345>CODE
LOWmrbgems/mruby-data/README.md92 puts customer1 # Output: #<data Customer name="John Doe", address="123 Main St", zip=12345>CODE
LOWmrbgems/mruby-data/README.md93 p customer1 # Output: #<data Customer name="John Doe", address="123 Main St", zip=12345>CODE
LOWmrbgems/mruby-data/README.md93 p customer1 # Output: #<data Customer name="John Doe", address="123 Main St", zip=12345>CODE
LOWmrbgems/mruby-data/src/data.c220 * Customer.new("Joe", "123 Main St", 12345)COMMENT
LOWmrbgems/mruby-data/src/data.c221 * Customer.new(name: "Joe", address: "123 Main St", zip: 12345)COMMENT
LOWmrbgems/mruby-data/src/data.c394 * customer = Customer.new("Joe", "123 Main St", 12345)COMMENT
LOWmrbgems/mruby-data/src/data.c426 * jane = Customer.new("Jane Doe", "456 Elm, Anytown NC", 12345)COMMENT
LOWdoc/guides/mrbgems.md278 spec.author = 'John Doe'CODE
Hyper-Verbose Identifiers12 hits · 14 pts
SeverityFileLineSnippetContext
LOWtest/assert.rb332def assert_raise_with_message(*args, &block)CODE
LOWtest/assert.rb335def assert_raise_with_message_pattern(*args, &block)CODE
LOWtest/assert.rb338def _assert_raise_with_message(type, exc, exp_msg, msg = nil, &block)CODE
LOWtest/t/module.rb24def assert_uninitialized_const(&block)CODE
LOWmrbgems/mruby-io/test/file.rb6def assert_dirname_with_level(path, results)CODE
LOWmrbgems/mruby-array-ext/test/array.rb4def assert_permutation_combination(exp, receiver, meth, *args)CODE
LOWmrbgems/mruby-array-ext/test/array.rb21def assert_repeated_permutation(exp, receiver, *args)CODE
LOWmrbgems/mruby-array-ext/test/array.rb25def assert_repeated_combination(exp, receiver, *args)CODE
LOWlib/mruby/amalgam.rb644 def write_static_rename_cleanup(f, collisions)CODE
LOWlib/mruby/amalgam.rb780 def opcode_macro_reconciliation(header)CODE
LOWlib/mruby/amalgam.rb794 def transform_source_includes(content, source_dir = nil)CODE
LOWlib/mruby/build.rb430 def define_installer_if_needed(bin)CODE
Redundant / Tautological Comments4 hits · 6 pts
SeverityFileLineSnippetContext
LOWmrbgems/mruby-pack/test/pack.rb66 # Check if last two characters are backtick and newlineCOMMENT
LOWscripts/check_makefiles_for_tabs.sh5 # Check if the file exists and is a regular fileCOMMENT
LOWlib/mruby/amalgam.rb901 # Check if header was already processedCOMMENT
LOWlib/mruby/amalgam.rb912 # Check if this is an mruby header that should be inlined/transformedCOMMENT
Structural Annotation Overuse3 hits · 4 pts
SeverityFileLineSnippetContext
LOWdoc/guides/rom-method-table.md75### Step 1: Define the Static DataCOMMENT
LOWdoc/guides/rom-method-table.md90### Step 2: Register in the Init FunctionCOMMENT
LOWdoc/guides/rom-method-table.md107### Step 3: VerifyCOMMENT
AI Slop Vocabulary1 hit · 2 pts
SeverityFileLineSnippetContext
LOWmrbgems/mruby-proc-ext/mrblib/proc.rb46 # Instances of class Proc simply return themselves.COMMENT
Example Usage Blocks1 hit · 2 pts
SeverityFileLineSnippetContext
LOWbuild_config/cosmopolitan.rb15# Usage:COMMENT
Slop Phrases1 hit · 1 pts
SeverityFileLineSnippetContext
LOWsrc/gc.c628 arguments. Don't forget to remove the object usingCODE