Repository Analysis

riscv-software-src/riscv-isa-sim

Spike, a RISC-V ISA Simulator

4.1 Likely human-written View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of riscv-software-src/riscv-isa-sim, a C project with 3,171 GitHub stars. SynthScan v2.0 examined 66,434 lines of code across 1916 source files, recording 349 pattern matches distributed across 3 syntactic categories. The overall adjusted score of 4.1 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.1
Adjusted Score
4.1
Raw Score
100%
Time Factor
2026-07-12
Last Push
3.2K
Stars
C
Language
66.4K
Lines of Code
1.9K
Files
349
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

Longitudinal tracking requires multiple scan runs. Once this repository is re-scanned after new commits land, this chart will visualise how the synthetic code signal evolves over time — enabling you to detect whether AI authorship is growing, stabilising, or being actively corrected by human engineers.

No multi-scan history yet — run the scanner again to build trend data.

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 9LOW 340

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 349 distinct pattern matches across 3 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 Block340 hits · 239 pts
SeverityFileLineSnippetContext
LOWcustomext/dummy_rocc_test.c1// The following is a RISC-V program to test the functionality of theCOMMENT
LOWsoftfloat/specialize.h61#define i8_fromPosOverflow 0x7FCOMMENT
LOWsoftfloat/primitiveTypes.h61#ifdef LITTLEENDIANCOMMENT
LOWsoftfloat/primitiveTypes.h81#define indexMultiwordLoBut( total, n ) (n)COMMENT
LOWsoftfloat/softfloat.h41| header, "softfloat.h", be created that folds in "softfloat_types.h" and thatCOMMENT
LOWsoftfloat/platform.h41#define LITTLEENDIAN 1COMMENT
LOWfdt/libfdt_env.h1/* SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-2-Clause) */COMMENT
LOWfdt/fdt.h61#define FDT_V2_SIZE (FDT_V1_SIZE + sizeof(fdt32_t))COMMENT
LOWfesvr/htif.h1// See LICENSE for license details.COMMENT
LOWfesvr/context.h1#ifndef _HTIF_CONTEXT_HCOMMENT
LOWfesvr/elf.h1// See LICENSE for details.COMMENT
LOWfesvr/tsi.h1#ifndef __SAI_HCOMMENT
LOWfesvr/dtm.h1#ifndef _ROCKET_DTM_HCOMMENT
LOWscripts/vcs-version.sh1#!/usr/bin/env bashCOMMENT
LOWscripts/vcs-version.sh21# where X is the major release, Y is the minor release, Z is the numberCOMMENT
LOWarch_test_target/spike/model_test.h41//RVTEST_IO_WRITE_STRCOMMENT
LOWriscv/zvkned_ext_macros.h1// Helper macros to help implement instructions defined as part ofCOMMENT
LOWriscv/zvkned_ext_macros.h201 (STATE)[ 3] = (STATE)[ 7]; \COMMENT
LOWriscv/devices.h1#ifndef _RISCV_DEVICES_HCOMMENT
LOWriscv/vector_unit.h121 }COMMENT
LOWriscv/entropy_source.h21 static const uint32_t OPST_ES16 = 0x2 << 30;COMMENT
LOWriscv/decode_macros.h1// See LICENSE for license details.COMMENT
LOWriscv/decode_macros.h61 }COMMENT
LOWriscv/decode_macros.h81#define RVC_FRS2S READ_FREG(insn.rvc_rs2s())COMMENT
LOWriscv/decode_macros.h101// Zilsd macrosCOMMENT
LOWriscv/decode_macros.h121#define FRS1_D READ_FREG_D(insn.rs1())COMMENT
LOWriscv/decode_macros.h161 COMMENT
LOWriscv/decode_macros.h261#define serialize() set_pc_and_serialize(npc)COMMENT
LOWriscv/decode_macros.h341#define e128 128 // 128b elementsCOMMENT
LOWriscv/processor.h1// See LICENSE for license details.COMMENT
LOWriscv/zvksh_ext_macros.h1// Helper macros and functions to help implement instructions defined as part ofCOMMENT
LOWriscv/zvksh_ext_macros.h41#define T2 0x7A879D8ACOMMENT
LOWriscv/debug_rom_defines.h1// See LICENSE file for license details.COMMENT
LOWriscv/encoding.h21#define MSTATUS_UIE _RISCV_UL(0x00000001)COMMENT
LOWriscv/encoding.h41#define MSTATUS_SDT _RISCV_UL(0x01000000)COMMENT
LOWriscv/encoding.h61#define SSTATUS_UPIE _RISCV_UL(0x00000010)COMMENT
LOWriscv/encoding.h81#define HSTATUS_VGEIN _RISCV_UL(0x0003f000)COMMENT
LOWriscv/encoding.h101#define DCSR_EBREAKVS (1<<17)COMMENT
LOWriscv/encoding.h121#define DCSR_CAUSE_HALT 5COMMENT
LOWriscv/encoding.h141#define MCONTROL_STORE (1<<1)COMMENT
LOWriscv/encoding.h161#define MIP_SSIP (1 << IRQ_S_SOFT)COMMENT
LOWriscv/encoding.h181#define MIDELEG_FORCED_MASK MIP_HS_MASKCOMMENT
LOWriscv/encoding.h201#define MENVCFGH_ADUE _RISCV_UL(0x20000000)COMMENT
LOWriscv/encoding.h221#define MSTATEEN0H_HCONTEXT _RISCV_UL(0x02000000)COMMENT
LOWriscv/encoding.h241COMMENT
LOWriscv/encoding.h261#define HENVCFG_ADUE _RISCV_ULL(0x2000000000000000)COMMENT
LOWriscv/encoding.h281COMMENT
LOWriscv/encoding.h301#define HSTATEEN0_AIA _RISCV_ULL(0x0800000000000000)COMMENT
LOWriscv/encoding.h321#define SENVCFG_PMM _RISCV_ULL(0x0000000300000000)COMMENT
LOWriscv/encoding.h341#define HVICTL_DPR _RISCV_UL(0x00000200)COMMENT
LOWriscv/encoding.h361#define SATP_MODE_OFF 0COMMENT
LOWriscv/encoding.h381COMMENT
LOWriscv/encoding.h401#define MCTRCTL_M _RISCV_ULL(0x0000000000000004)COMMENT
LOWriscv/encoding.h421COMMENT
LOWriscv/encoding.h441COMMENT
LOWriscv/encoding.h461#define VSCTRCTL_CUSTOM _RISCV_ULL(0xF000000000000000)COMMENT
LOWriscv/encoding.h481#define IRQ_S_SOFT 1COMMENT
LOWriscv/encoding.h501#define PTE_W 0x004 /* Write */COMMENT
LOWriscv/encoding.h521COMMENT
LOWriscv/encoding.h561#define clear_csr(reg, bit) ({ unsigned long __tmp; \COMMENT
280 more matches not shown…
Decorative Section Separators8 hits · 27 pts
SeverityFileLineSnippetContext
MEDIUMscripts/vcs-version.sh2#=========================================================================COMMENT
MEDIUMscripts/vcs-version.sh4#=========================================================================COMMENT
MEDIUMscripts/vcs-version.sh48#-------------------------------------------------------------------------COMMENT
MEDIUMscripts/vcs-version.sh50#-------------------------------------------------------------------------COMMENT
MEDIUMscripts/vcs-version.sh66#-------------------------------------------------------------------------COMMENT
MEDIUMscripts/vcs-version.sh68#-------------------------------------------------------------------------COMMENT
MEDIUMscripts/vcs-version.sh84#-------------------------------------------------------------------------COMMENT
MEDIUMscripts/vcs-version.sh86#-------------------------------------------------------------------------COMMENT
Self-Referential Comments1 hit · 4 pts
SeverityFileLineSnippetContext
MEDIUMscripts/vcs-version.sh85# Create the version stringCOMMENT