Repository Analysis

raysan5/raylib

A simple and easy-to-use library to enjoy videogames programming

3.4 Likely human-written View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of raysan5/raylib, a C project with 33,841 GitHub stars. SynthScan v2.0 examined 395,510 lines of code across 468 source files, recording 1523 pattern matches distributed across 9 syntactic categories. The overall adjusted score of 3.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).

3.4
Adjusted Score
3.4
Raw Score
100%
Time Factor
2026-07-13
Last Push
33.8K
Stars
C
Language
395.5K
Lines of Code
468
Files
1.5K
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 2MEDIUM 18LOW 1503

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 1523 distinct pattern matches across 9 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 Block1458 hits · 1203 pts
SeverityFileLineSnippetContext
LOWCMakeLists.txt1cmake_minimum_required(VERSION 3.22)COMMENT
LOWtools/rlparser/rlparser.c61#include <stdlib.h> // Required for: malloc(), calloc(), realloc(), free(), atoi(), strtol()COMMENT
LOWtools/rlparser/rlparser.c1041 free(funcLines);COMMENT
LOWtools/rexm/rexm.c61#elseCOMMENT
LOWtools/rexm/rexm.c261 //--------------------------------------------------------------------------------------COMMENT
LOWtools/rexm/rexm.c661 LOG("INFO: [%s] Adding project to raylib solution (.sln)\n",COMMENT
LOWtools/rexm/rexm.c1481 } break;COMMENT
LOWtools/rexm/rexm.c1521 // STEP 1: Load example.c and replace required code to inject basic testing code: frames to runCOMMENT
LOWtools/rexm/rexm.c1761 }COMMENT
LOWprojects/Zig/src/core_basic_window.c21COMMENT
LOWprojects/CMake/core_basic_window.c21COMMENT
LOW…aylib_android.NativeActivity/android_native_app_glue.h121 // возврате. Верните 1, если событие обработано, 0 — для любой диспетчеризацииCOMMENT
LOW…aylib_android.NativeActivity/android_native_app_glue.c21#include <stdlib.h>COMMENT
LOWprojects/scripts/build-osx.sh1#!/bin/shCOMMENT
LOWprojects/scripts/build-rpi.sh1#!/bin/shCOMMENT
LOWprojects/scripts/build-linux.sh1#!/bin/shCOMMENT
LOWprojects/VSCode/main.c21COMMENT
LOWexamples/examples_list.txt1#COMMENT
LOWexamples/core/core_undo_redo.c21#include <string.h> // Required for: memcpy(), strcmp()COMMENT
LOWexamples/core/msf_gif.h161//These functions are equivalent to the ones above, but they write results to a file incrementally,COMMENT
LOWexamples/core/msf_gif.h181COMMENT
LOWexamples/core/msf_gif.h201#include <stdlib.h> //malloc, etc.COMMENT
LOWexamples/core/core_3d_camera_fps.c21COMMENT
LOWexamples/core/core_window_web.c21#if defined(PLATFORM_WEB)COMMENT
LOWexamples/core/raygui.h341#define RAYGUI_HCOMMENT
LOWexamples/core/raygui.h361#endifCOMMENT
LOWexamples/core/raygui.h381// TODO: Define additionally required macros for missing inputs COMMENT
LOWexamples/core/raygui.h401 #define GUI_SCROLL_DELTA ((float)IsGamepadButtonDown(0, GAMEPAD_BUTTON_RIGHT_TRIGGER_2) - (float)IsGamepadButCOMMENT
LOWexamples/core/raygui.h621 //TEXT_DECORATION // Text decoration: 0-None, 1-Underline, 2-Line-through, 3-OverlineCOMMENT
LOWexamples/core/raygui.h1101#include <math.h> // Required for: roundf() [GuiColorPicker()]COMMENT
LOWexamples/core/raygui.h1121COMMENT
LOWexamples/core/raygui.h1141//----------------------------------------------------------------------------------COMMENT
LOWexamples/core/raygui.h1421// if changed, previous saved styles could become incompatibleCOMMENT
LOWexamples/core/raygui.h1461// but default gui style could always be recovered with GuiLoadStyleDefault()COMMENT
LOWexamples/core/raygui.h4621// Get full icons data pointerCOMMENT
LOWexamples/core/raygui.h4641 // Icons name id (32 bytes per name id)COMMENT
LOWexamples/core/core_input_gamepad.c21COMMENT
LOWexamples/others/rlgl_standalone.c61//#define RL_MAX_SHADER_LOCATIONS 32 // Maximum number of shader locations supportedCOMMENT
LOWexamples/others/raylib_opengl_interop.c21* rlgl batched draw operations internally so we have to flush the current batch beforeCOMMENT
LOWexamples/others/raylib_opengl_interop.c41 #include <OpenGL/gl3.h> // OpenGL 3 library for OSXCOMMENT
LOWexamples/others/resources/audio_data.h1COMMENT
LOWexamples/others/external/include/glad.h21#define __glad_h_COMMENT
LOWexamples/others/external/include/glad.h61# define GLAPI __declspec(dllexport) externCOMMENT
LOWexamples/others/external/include/glad.h81GLAPI int gladLoadGLLoader(GLADloadproc);COMMENT
LOWexamples/others/external/include/glad.h101#endif /* __arch64__ */COMMENT
LOWexamples/others/external/include/glad.h161typedef void (APIENTRY *GLDEBUGPROCARB)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar COMMENT
LOWexamples/others/external/include/glad.h181#define GL_LEQUAL 0x0203COMMENT
LOWexamples/others/external/include/glad.h201#define GL_BACK_RIGHT 0x0403COMMENT
LOWexamples/others/external/include/glad.h221#define GL_POLYGON_MODE 0x0B40COMMENT
LOWexamples/others/external/include/glad.h241#define GL_DITHER 0x0BD0COMMENT
LOWexamples/others/external/include/glad.h261#define GL_UNPACK_SKIP_PIXELS 0x0CF4COMMENT
LOWexamples/others/external/include/glad.h281#define GL_TEXTURE_WIDTH 0x1000COMMENT
LOWexamples/others/external/include/glad.h301#define GL_AND 0x1501COMMENT
LOWexamples/others/external/include/glad.h321#define GL_DEPTH_COMPONENT 0x1902COMMENT
LOWexamples/others/external/include/glad.h341#define GL_NEAREST_MIPMAP_NEAREST 0x2700COMMENT
LOWexamples/others/external/include/glad.h361#define GL_RGB5_A1 0x8057COMMENT
LOWexamples/others/external/include/glad.h381#define GL_UNSIGNED_BYTE_2_3_3_REV 0x8362COMMENT
LOWexamples/others/external/include/glad.h401#define GL_ALIASED_LINE_WIDTH_RANGE 0x846ECOMMENT
LOWexamples/others/external/include/glad.h421#define GL_TEXTURE19 0x84D3COMMENT
LOWexamples/others/external/include/glad.h441#define GL_SAMPLE_COVERAGE_VALUE 0x80AACOMMENT
1398 more matches not shown…
Structural Annotation Overuse29 hits · 44 pts
SeverityFileLineSnippetContext
LOWexamples/core/raygui.h5866// NOTE: This function is only used by GuiColorPicker()COMMENT
LOWexamples/core/raygui.h5921// NOTE: This function replaces atoi() [stdlib.h]COMMENT
LOWexamples/core/raygui.h5939// NOTE: This function replaces atof() [stdlib.h]COMMENT
LOWexamples/shapes/raygui.h5868// NOTE: This function is only used by GuiColorPicker()COMMENT
LOWexamples/shapes/raygui.h5923// NOTE: This function replaces atoi() [stdlib.h]COMMENT
LOWexamples/shapes/raygui.h5941// NOTE: This function replaces atof() [stdlib.h]COMMENT
LOWexamples/models/models_waving_cubes.c94 // NOTE: This function is quite costly to be done per cube and frame,COMMENT
LOWexamples/models/raygui.h5868// NOTE: This function is only used by GuiColorPicker()COMMENT
LOWexamples/models/raygui.h5923// NOTE: This function replaces atoi() [stdlib.h]COMMENT
LOWexamples/models/raygui.h5941// NOTE: This function replaces atof() [stdlib.h]COMMENT
LOWexamples/audio/raygui.h5866// NOTE: This function is only used by GuiColorPicker()COMMENT
LOWexamples/audio/raygui.h5921// NOTE: This function replaces atoi() [stdlib.h]COMMENT
LOWexamples/audio/raygui.h5939// NOTE: This function replaces atof() [stdlib.h]COMMENT
LOWexamples/shaders/raygui.h5866// NOTE: This function is only used by GuiColorPicker()COMMENT
LOWexamples/shaders/raygui.h5921// NOTE: This function replaces atoi() [stdlib.h]COMMENT
LOWexamples/shaders/raygui.h5939// NOTE: This function replaces atof() [stdlib.h]COMMENT
LOWsrc/rmodels.c1204// NOTE: This function takes care of all model elements, for a detailed controlCOMMENT
LOWsrc/rlgl.h637// NOTE: This functions are used to completely abstract raylib code from OpenGL layer,COMMENT
LOWsrc/rtext.c1606// NOTE: This function replaces atoi() [stdlib.h]COMMENT
LOWsrc/rtext.c1627// NOTE: This function replaces atof() [stdlib.h]COMMENT
LOWsrc/rcore.c1835// NOTE: This function is expected to be called before window creation,COMMENT
LOWsrc/platforms/rcore_web.c993// NOTE: This function is only safe to use if the provided URL is safeCOMMENT
LOWsrc/platforms/rcore_memory.c384// NOTE: This function is only safe to use if you control the URL given.COMMENT
LOWsrc/platforms/rcore_drm.c1535 // NOTE: This function use and modify global module variables:COMMENT
LOWsrc/platforms/rcore_drm.c1567 // NOTE: This function use and modify global module variables:COMMENT
LOWsrc/platforms/rcore_android.c1002 // NOTE: This function use and modify global module variables:COMMENT
LOWsrc/external/rlsw.h5659// NOTE: This function should only render affine axis-aligned quadsCOMMENT
LOWsrc/external/glfw/src/init.c179// NOTE: This function destroys the provided stringCOMMENT
LOWsrc/external/glfw/src/glx_context.c433 // NOTE: This function must not call any X11 functions, as it is calledCOMMENT
Decorative Section Separators10 hits · 30 pts
SeverityFileLineSnippetContext
MEDIUMsrc/external/glfw/CMakeLists.txt62#--------------------------------------------------------------------COMMENT
MEDIUMsrc/external/glfw/CMakeLists.txt64#--------------------------------------------------------------------COMMENT
MEDIUMsrc/external/glfw/CMakeLists.txt78#--------------------------------------------------------------------COMMENT
MEDIUMsrc/external/glfw/CMakeLists.txt81#--------------------------------------------------------------------COMMENT
MEDIUMsrc/external/glfw/CMakeLists.txt103#--------------------------------------------------------------------COMMENT
MEDIUMsrc/external/glfw/CMakeLists.txt105#--------------------------------------------------------------------COMMENT
MEDIUMsrc/external/glfw/CMakeLists.txt119#--------------------------------------------------------------------COMMENT
MEDIUMsrc/external/glfw/CMakeLists.txt121#--------------------------------------------------------------------COMMENT
MEDIUMsrc/external/glfw/CMakeLists.txt136#--------------------------------------------------------------------COMMENT
MEDIUMsrc/external/glfw/CMakeLists.txt139#--------------------------------------------------------------------COMMENT
Fake / Example Data12 hits · 17 pts
SeverityFileLineSnippetContext
LOWexamples/core/resources/text_file.txt1Starting of the Lorem ipsum dolor sit amet fileCODE
LOWexamples/core/resources/text_file.txt1Starting of the Lorem ipsum dolor sit amet fileCODE
LOWexamples/core/resources/text_file.txt2Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque at interdum ex, et iaculis quam. Mauris consectetuCODE
LOWexamples/core/resources/text_file.txt2Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque at interdum ex, et iaculis quam. Mauris consectetuCODE
LOWexamples/core/resources/text_file.txt7Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque at interdum ex, et iaculis quam. Mauris consectetuCODE
LOWexamples/core/resources/text_file.txt7Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque at interdum ex, et iaculis quam. Mauris consectetuCODE
LOWexamples/core/resources/text_file.txt13Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque at interdum ex, et iaculis quam. Mauris consectetuCODE
LOWexamples/core/resources/text_file.txt13Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque at interdum ex, et iaculis quam. Mauris consectetuCODE
LOWexamples/core/resources/text_file.txt18Ending of the Lorem ipsum dolor sit amet fileCODE
LOWexamples/core/resources/text_file.txt18Ending of the Lorem ipsum dolor sit amet fileCODE
LOWexamples/text/text_rectangle_bounds.c41a long text for testing.\n\nLorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod \CODE
LOWexamples/text/text_rectangle_bounds.c41a long text for testing.\n\nLorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod \CODE
AI Slop Vocabulary6 hits · 16 pts
SeverityFileLineSnippetContext
LOWexamples/core/core_custom_frame_control.c82 #ifdef PLATFORM_WEB // NOTE: On web platform for some reason the PollInputEvents only works after thCOMMENT
MEDIUMsrc/shell.html252 // To make your application robust, you may want to override this behavior before shipping!COMMENT
MEDIUMsrc/rlgl.h2340 // Init state: Cubemap seamlessCOMMENT
MEDIUMsrc/external/stb_vorbis.c51// 1.10 - 2017-03-03 - more robust seeking; fix negative ilog(); clear error in open_memoryCOMMENT
MEDIUMsrc/external/rlsw.h3422 // This test is robust for points with w > 0 or w < 0, correctlyCOMMENT
MEDIUMsrc/external/rlsw.h3534 // This test is robust for points with w > 0 or w < 0 within the triangle,COMMENT
Synthetic Comment Markers2 hits · 15 pts
SeverityFileLineSnippetContext
HIGHsrc/external/rlsw.h1491 // TODO: WARNING: Sample code generated by AI, needs testing and reviewCOMMENT
HIGHsrc/external/rlsw.h1537 // TODO: WARNING: Sample code generated by AI, needs testing and reviewCOMMENT
Self-Referential Comments3 hits · 9 pts
SeverityFileLineSnippetContext
MEDIUMprojects/scripts/build-osx.sh108# Create the raylib cache directoryCOMMENT
MEDIUMprojects/scripts/build-rpi.sh108# Create the raylib cache directoryCOMMENT
MEDIUMprojects/scripts/build-linux.sh108# Create the raylib cache directoryCOMMENT
Example Usage Blocks2 hits · 3 pts
SeverityFileLineSnippetContext
LOWsrc/external/sdefl.h17## Usage:COMMENT
LOWsrc/external/sinfl.h18## Usage:COMMENT
Verbosity Indicators1 hit · 2 pts
SeverityFileLineSnippetContext
LOWsrc/external/dr_flac.h5956 /* We found a FLAC frame. We need to check if it contains the sample we're looking for. */COMMENT