Repository Analysis

libsdl-org/SDL

Simple DirectMedia Layer

2.3 Likely human-written View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of libsdl-org/SDL, a C project with 16,094 GitHub stars. SynthScan v2.0 examined 823,228 lines of code across 1791 source files, recording 2364 pattern matches distributed across 14 syntactic categories. The overall adjusted score of 2.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).

2.3
Adjusted Score
2.3
Raw Score
100%
Time Factor
2026-07-13
Last Push
16.1K
Stars
C
Language
823.2K
Lines of Code
1.8K
Files
2.4K
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 22LOW 2340

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 2364 distinct pattern matches across 14 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 Block2260 hits · 1743 pts
SeverityFileLineSnippetContext
LOW…src/main/java/org/libsdl/app/SDLControllerManager.java241 } else if (arg1Axis == MotionEvent.AXIS_BRAKE) {COMMENT
LOW…roid-project/app/src/main/java/org/libsdl/app/SDL.java101COMMENT
LOW…ject/app/src/main/java/org/libsdl/app/SDLActivity.java1101 // surfaceChanged() -- which may not even happen -- and should return immediately.COMMENT
LOW…ject/app/src/main/java/org/libsdl/app/SDLActivity.java1581 source = device.getSources();COMMENT
LOWtest/testoverlay.c21#include <SDL3/SDL_main.h>COMMENT
LOWtest/gamepadutils.c21#include "gamepad_face_sony.h"COMMENT
LOWtest/testvulkan.c21 SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "No Vulkan support on this system");COMMENT
LOWtest/testgpu_spinning_cube.c21 */COMMENT
LOWtest/testffmpeg.c21#include <libavcodec/avcodec.h>COMMENT
LOWtest/testffmpeg.c41#ifndef DRM_FORMAT_GR88COMMENT
LOWtest/testautomation_blit.c1/**COMMENT
LOWtest/testcontroller.c21#ifdef SDL_PLATFORM_EMSCRIPTENCOMMENT
LOWtest/testnative.c21COMMENT
LOWtest/testfile.c21#include <stdlib.h>COMMENT
LOWtest/testmouse.c21#include <stdlib.h> /* exit() */COMMENT
LOWtest/testautomation_render.c1/**COMMENT
LOWtest/gamepadutils.h61#define PRESSED_TEXTURE_MOD 175, 238, 238COMMENT
LOWtest/testevdev.c21#endifCOMMENT
LOWtest/testnative.h41#ifdef SDL_VIDEO_DRIVER_X11COMMENT
LOWtest/testime.c21#include <SDL3/SDL.h>COMMENT
LOWtest/testime.c101#define UNIFONT_REPLACEMENT 0xFFFDCOMMENT
LOWtest/win32/sdlprocdump.c1#ifndef WIN32_LEAN_AND_MEANCOMMENT
LOWtest/win32/sdlprocdump.c21#define EXCEPTION_STACK_INVALID 0x8COMMENT
LOWtest/win32/sdlprocdump.c41COMMENT
LOWinclude/SDL3/SDL_opengles2_gl2ext.h41#define GL_COLORDODGE_KHR 0x9299COMMENT
LOWinclude/SDL3/SDL_opengles2_gl2ext.h61COMMENT
LOWinclude/SDL3/SDL_opengles2_gl2ext.h81#define GL_DEBUG_SOURCE_OTHER_KHR 0x824BCOMMENT
LOWinclude/SDL3/SDL_opengles2_gl2ext.h101#define GL_MAX_LABEL_LENGTH_KHR 0x82E8COMMENT
LOWinclude/SDL3/SDL_opengles2_gl2ext.h141#endif /* GL_KHR_no_error */COMMENT
LOWinclude/SDL3/SDL_opengles2_gl2ext.h181#ifndef GL_KHR_shader_subgroupCOMMENT
LOWinclude/SDL3/SDL_opengles2_gl2ext.h201#define GL_COMPRESSED_RGBA_ASTC_5x5_KHR 0x93B2COMMENT
LOWinclude/SDL3/SDL_opengles2_gl2ext.h221#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR 0x93D8COMMENT
LOWinclude/SDL3/SDL_opengles2_gl2ext.h241typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image);COMMENT
LOWinclude/SDL3/SDL_opengles2_gl2ext.h261#define GL_OES_compressed_ETC1_RGB8_sub_texture 1COMMENT
LOWinclude/SDL3/SDL_opengles2_gl2ext.h281#endif /* GL_OES_compressed_paletted_texture */COMMENT
LOWinclude/SDL3/SDL_opengles2_gl2ext.h341#endif /* GL_OES_draw_elements_base_vertex */COMMENT
LOWinclude/SDL3/SDL_opengles2_gl2ext.h361#define GL_GEOMETRY_SHADER_OES 0x8DD9COMMENT
LOWinclude/SDL3/SDL_opengles2_gl2ext.h381#define GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS_OES 0x92CFCOMMENT
LOWinclude/SDL3/SDL_opengles2_gl2ext.h401#define GL_OES_get_program_binary 1COMMENT
LOWinclude/SDL3/SDL_opengles2_gl2ext.h421#define GL_BUFFER_MAPPED_OES 0x88BCCOMMENT
LOWinclude/SDL3/SDL_opengles2_gl2ext.h441#define GL_OES_primitive_bounding_box 1COMMENT
LOWinclude/SDL3/SDL_opengles2_gl2ext.h461#define GL_RGB10_EXT 0x8052COMMENT
LOWinclude/SDL3/SDL_opengles2_gl2ext.h481#endif /* GL_OES_sample_variables */COMMENT
LOWinclude/SDL3/SDL_opengles2_gl2ext.h501#endif /* GL_OES_standard_derivatives */COMMENT
LOWinclude/SDL3/SDL_opengles2_gl2ext.h521COMMENT
LOWinclude/SDL3/SDL_opengles2_gl2ext.h541#define GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS_OES 0x8E83COMMENT
LOWinclude/SDL3/SDL_opengles2_gl2ext.h561#define GL_REFERENCED_BY_TESS_CONTROL_SHADER_OES 0x9307COMMENT
LOWinclude/SDL3/SDL_opengles2_gl2ext.h621#ifndef GL_OES_texture_bufferCOMMENT
LOWinclude/SDL3/SDL_opengles2_gl2ext.h641GL_APICALL void GL_APIENTRY glTexBufferRangeOES (GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GCOMMENT
LOWinclude/SDL3/SDL_opengles2_gl2ext.h661#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4x4_OES 0x93E4COMMENT
LOWinclude/SDL3/SDL_opengles2_gl2ext.h681COMMENT
LOWinclude/SDL3/SDL_opengles2_gl2ext.h701#endif /* GL_OES_texture_npot */COMMENT
LOWinclude/SDL3/SDL_opengles2_gl2ext.h721COMMENT
LOWinclude/SDL3/SDL_opengles2_gl2ext.h741typedef GLboolean (GL_APIENTRYP PFNGLISVERTEXARRAYOESPROC) (GLuint array);COMMENT
LOWinclude/SDL3/SDL_opengles2_gl2ext.h781GL_APICALL void GL_APIENTRY glScissorIndexedvOES (GLuint index, const GLint *v);COMMENT
LOWinclude/SDL3/SDL_opengles2_gl2ext.h801#ifndef GL_AMD_framebuffer_multisample_advancedCOMMENT
LOWinclude/SDL3/SDL_opengles2_gl2ext.h861#ifndef GL_ANGLE_depth_textureCOMMENT
LOWinclude/SDL3/SDL_opengles2_gl2ext.h901#ifndef GL_ANGLE_pack_reverse_row_orderCOMMENT
LOWinclude/SDL3/SDL_opengles2_gl2ext.h921#ifndef GL_ANGLE_texture_usageCOMMENT
LOWinclude/SDL3/SDL_opengles2_gl2ext.h941#define GL_CLIP_DISTANCE2_APPLE 0x3002COMMENT
2200 more matches not shown…
Decorative Section Separators9 hits · 34 pts
SeverityFileLineSnippetContext
MEDIUM.github/workflows/build.yml12 # ┌────────────── minute (0 - 59)COMMENT
MEDIUM.github/workflows/build.yml13 # │ ┌───────────── hour (0 - 23)COMMENT
MEDIUM.github/workflows/build.yml14 # │ │ ┌───────────── day of the month (1 - 31)COMMENT
MEDIUM.github/workflows/build.yml15 # │ │ │ ┌───────────── month (1 - 12 or JAN-DEC)COMMENT
MEDIUM.github/workflows/build.yml16 # │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT)COMMENT
MEDIUMbuild-scripts/casefolding.txt31# ================================================================================COMMENT
MEDIUMbuild-scripts/casefolding.txt33# ================================================================================COMMENT
MEDIUMbuild-scripts/casefolding.txt55# =================================================================COMMENT
MEDIUMbuild-scripts/casefolding.txt62# =================================================================COMMENT
AI Slop Vocabulary13 hits · 33 pts
SeverityFileLineSnippetContext
MEDIUM…oject/app/src/main/java/org/libsdl/app/SDLSurface.java278 // if we are. We'll leverage our existing mouse motion listenerCOMMENT
LOWinclude/SDL3/SDL_main_impl.h134 #else /* platforms that use a standard main() and just call SDL_RunApp(), like iOS and 3DS */COMMENT
MEDIUMexamples/template.html266 // application robust, you may want to override this behavior before shipping!COMMENT
LOWbuild-scripts/wikiheaders.pl356 # So something like "just call `SDL_Whatever`" will becomeCOMMENT
LOWbuild-scripts/wikiheaders.pl357 # "just call [`SDL_Whatever`](SDL_Whatever)", butCOMMENT
LOWbuild-scripts/wikiheaders.pl358 # "just call `SDL_Whatever(7)`" will not. It's just the safestCOMMENT
MEDIUMsrc/video/SDL_blit_1.c540 case SDL_COPY_COLORKEY | SDL_COPY_BLEND: // this is not super-robust but handles a specific case we found sdl12-comCODE
MEDIUMsrc/video/windows/SDL_windowsvideo.h94// More-robust display information in Vista...COMMENT
MEDIUMsrc/core/windows/SDL_gameinput.cpp44 // This is recommended, as Microsoft's GameInputCreate() is robustCOMMENT
LOWsrc/hidapi/testgui/copy_to_bundle.sh84# necessary. If ../libtool not available, just use cp to do the copy, butCOMMENT
MEDIUMsrc/joystick/SDL_gamepad.c1483 // We'll pick up a robust mapping in VIRTUAL_JoystickGetGamepadMappingCOMMENT
MEDIUMsrc/joystick/hidapi/steam/controller_structs.h157// Triton and derivatives utilize output reports for haptic commands. This is aCOMMENT
MEDIUMsrc/events/SDL_pen_c.h62// Note that name and info are copied but currently unused; this is placeholder for a potentially more robust API later.COMMENT
Deep Nesting22 hits · 22 pts
SeverityFileLineSnippetContext
LOWVisualC/examples/generate.py44CODE
LOW.github/workflows/create-test-plan.py938CODE
LOWbuild-scripts/rename_types.py37CODE
LOWbuild-scripts/rename_macros.py62CODE
LOWbuild-scripts/create-android-project.py118CODE
LOWbuild-scripts/rename_headers.py31CODE
LOWbuild-scripts/build-release.py363CODE
LOWbuild-scripts/build-release.py447CODE
LOWbuild-scripts/build-release.py481CODE
LOWbuild-scripts/build-release.py718CODE
LOWbuild-scripts/build-release.py999CODE
LOWbuild-scripts/build-release.py1221CODE
LOWbuild-scripts/rename_symbols.py48CODE
LOWbuild-scripts/rename_symbols.py85CODE
LOWbuild-scripts/rename_api.py126CODE
LOWbuild-scripts/rename_api.py192CODE
LOWbuild-scripts/check_android_jni.py66CODE
LOWbuild-scripts/check_android_jni.py103CODE
LOWbuild-scripts/check_android_jni.py136CODE
LOWbuild-scripts/check_stdlib_usage.py159CODE
LOWsrc/dynapi/gendynapi.py77CODE
LOWsrc/dynapi/gendynapi.py371CODE
Excessive Try-Catch Wrapping13 hits · 17 pts
SeverityFileLineSnippetContext
LOWbuild-scripts/rename_types.py47 except Exception as err:CODE
LOWbuild-scripts/rename_types.py75 except Exception as e:CODE
MEDIUMbuild-scripts/rename_types.py37def replace_symbols_in_file(file, regex, replacements):CODE
LOWbuild-scripts/rename_macros.py74 except Exception as err:CODE
LOWbuild-scripts/rename_macros.py101 except Exception as e:CODE
MEDIUMbuild-scripts/rename_macros.py62def apply_checks_in_file(file, checks):CODE
LOWbuild-scripts/rename_headers.py43 except Exception as err:CODE
LOWbuild-scripts/rename_headers.py70 except Exception as e:CODE
MEDIUMbuild-scripts/rename_headers.py31def replace_headers_in_file(file, replacements):CODE
LOWbuild-scripts/rename_symbols.py95 except Exception as err:CODE
LOWbuild-scripts/rename_symbols.py125 except Exception as e:CODE
MEDIUMbuild-scripts/rename_symbols.py85def replace_symbols_in_file(file, regex, replacements):CODE
LOWbuild-scripts/rename_api.py249 except Exception as e:CODE
Hyper-Verbose Identifiers16 hits · 12 pts
SeverityFileLineSnippetContext
LOWtest/emscripten/server.py13class MyHTTPRequestHandler(SimpleHTTPRequestHandler):CODE
LOWbuild-scripts/rename_types.py34def create_regex_from_replacements(replacements):CODE
LOWbuild-scripts/create-android-project.py87def gradle_add_prefab_and_aar(path: Path, aar: str) -> None:STRING
LOWbuild-scripts/setup-gdk-desktop.py107 def copy_files_and_merge_into(srcdir: Path, dstdir: Path) -> None:CODE
LOWbuild-scripts/build-release.py607 def _external_repo_path_filter(cls, path: str) -> bool:STRING
LOWbuild-scripts/build-release.py945 def _get_prefab_module_json_text(self, library_name: typing.Optional[str], export_libraries: list[str]) -> str:STRING
LOWbuild-scripts/build-release.py978 def _get_prefab_abi_json_text(self, abi: str, cpp: bool, shared: bool) -> str:STRING
LOWbuild-scripts/build-release.py988 def _get_android_manifest_text(self) -> str:STRING
LOWbuild-scripts/build-release.py1309 def _arch_platform_to_build_path(self, arch_platform: VsArchPlatformConfig) -> Path:STRING
LOWbuild-scripts/build-release.py1312 def _arch_platform_to_install_path(self, arch_platform: VsArchPlatformConfig) -> Path:STRING
LOWbuild-scripts/rename_symbols.py77def create_regex_from_replacements(replacements):CODE
LOWbuild-scripts/rename_symbols.py81def create_substring_regex_from_replacements(replacements):CODE
LOWbuild-scripts/check_android_jni.py39def java_type_to_jni_spec_internal(type_str: str) -> tuple[int, str]:CODE
LOWbuild-scripts/check_android_jni.py66def collect_jni_bindings_from_c() -> dict[str, set[JniMethodBinding]]:CODE
LOWbuild-scripts/check_android_jni.py103def collect_jni_bindings_from_java() -> dict[str, set[JniMethodBinding]]:CODE
LOWsrc/dynapi/gendynapi.py365def print_check_comment_header():CODE
Unused Imports12 hits · 12 pts
SeverityFileLineSnippetContext
LOWtest/emscripten/driver.py8CODE
LOWcmake/xxd.py4CODE
LOW.github/workflows/create-test-plan.py9CODE
LOWbuild-scripts/rename_types.py6CODE
LOWbuild-scripts/create-release.py6CODE
LOWbuild-scripts/setup-gdk-desktop.py4CODE
LOWbuild-scripts/build-release.py10CODE
LOWbuild-scripts/rename_symbols.py6CODE
LOWbuild-scripts/rename_api.py7CODE
LOWbuild-scripts/rename_api.py9CODE
LOWbuild-scripts/check_stdlib_usage.py25CODE
LOWsrc/dynapi/gendynapi.py36CODE
AI Response Leakage2 hits · 10 pts
SeverityFileLineSnippetContext
HIGHsrc/io/SDL_sysasyncio.h85 LINKED_LIST_DECLARE_FIELDS(struct SDL_AsyncIOTask, queue); // the generic backend uses this, so I've added it hCODE
HIGHsrc/io/SDL_sysasyncio.h86 LINKED_LIST_DECLARE_FIELDS(struct SDL_AsyncIOTask, threadpool); // the generic backend uses this, so I've added it hCODE
Modern Structural Boilerplate6 hits · 6 pts
SeverityFileLineSnippetContext
LOWtest/emscripten/driver.py20logger = logging.getLogger(__name__)CODE
LOW.github/workflows/create-test-plan.py14logger = logging.getLogger(__name__)CODE
LOWbuild-scripts/setup-gdk-desktop.py20logger = logging.getLogger(__name__)CODE
LOWbuild-scripts/build-release.py36logger = logging.getLogger(__name__)CODE
LOWbuild-scripts/download-gameinput-sdk.py8logger = logging.getLogger(__name__)CODE
LOWsrc/dynapi/gendynapi.py60logger = logging.getLogger(__name__)CODE
Verbosity Indicators3 hits · 4 pts
SeverityFileLineSnippetContext
LOW…oject/app/src/main/java/org/libsdl/app/SDLSurface.java277 // We need to check if we're in relative mouse mode and get the axis offset rather than the x/y valuesCOMMENT
LOWsrc/video/dos/SDL_dosvideo.c198 // Step 1: query the required buffer size (subfunction 0x00).COMMENT
LOWsrc/video/dos/SDL_dosvideo.c210 // Step 2: save state (subfunction 0x01) into conventional memory buffer.COMMENT
Slop Phrases3 hits · 4 pts
SeverityFileLineSnippetContext
LOWinclude/SDL3/SDL_process.h39 * Don't forget to call SDL_DestroyProcess() to clean up, whether the processCOMMENT
LOWsrc/video/SDL_stb.c380 /* And don't forget to report the problem to the the sdl list too! */COMMENT
LOWsrc/render/direct3d11/SDL_render_d3d11.c515 * Don't forget to declare your application's minimum required feature level in itsCOMMENT
Self-Referential Comments1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUMbuild-scripts/androidbuildlibs.sh23# Create the build directoriesCOMMENT
Redundant / Tautological Comments2 hits · 3 pts
SeverityFileLineSnippetContext
LOWbuild-scripts/check_elf_alignment.sh105 # Check if this is a critical architecture (arm64-v8a or x86_64)COMMENT
LOWbuild-scripts/update-version.sh42# Set compat to major.minor.0 by default.COMMENT
Structural Annotation Overuse2 hits · 3 pts
SeverityFileLineSnippetContext
LOWsrc/video/dos/SDL_dosvideo.c198 // Step 1: query the required buffer size (subfunction 0x00).COMMENT
LOWsrc/video/dos/SDL_dosvideo.c210 // Step 2: save state (subfunction 0x01) into conventional memory buffer.COMMENT