Simple DirectMedia Layer
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).
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.
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.
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.
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.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | …src/main/java/org/libsdl/app/SDLControllerManager.java | 241 | } else if (arg1Axis == MotionEvent.AXIS_BRAKE) { | COMMENT |
| LOW | …roid-project/app/src/main/java/org/libsdl/app/SDL.java | 101 | COMMENT | |
| LOW | …ject/app/src/main/java/org/libsdl/app/SDLActivity.java | 1101 | // surfaceChanged() -- which may not even happen -- and should return immediately. | COMMENT |
| LOW | …ject/app/src/main/java/org/libsdl/app/SDLActivity.java | 1581 | source = device.getSources(); | COMMENT |
| LOW | test/testoverlay.c | 21 | #include <SDL3/SDL_main.h> | COMMENT |
| LOW | test/gamepadutils.c | 21 | #include "gamepad_face_sony.h" | COMMENT |
| LOW | test/testvulkan.c | 21 | SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "No Vulkan support on this system"); | COMMENT |
| LOW | test/testgpu_spinning_cube.c | 21 | */ | COMMENT |
| LOW | test/testffmpeg.c | 21 | #include <libavcodec/avcodec.h> | COMMENT |
| LOW | test/testffmpeg.c | 41 | #ifndef DRM_FORMAT_GR88 | COMMENT |
| LOW | test/testautomation_blit.c | 1 | /** | COMMENT |
| LOW | test/testcontroller.c | 21 | #ifdef SDL_PLATFORM_EMSCRIPTEN | COMMENT |
| LOW | test/testnative.c | 21 | COMMENT | |
| LOW | test/testfile.c | 21 | #include <stdlib.h> | COMMENT |
| LOW | test/testmouse.c | 21 | #include <stdlib.h> /* exit() */ | COMMENT |
| LOW | test/testautomation_render.c | 1 | /** | COMMENT |
| LOW | test/gamepadutils.h | 61 | #define PRESSED_TEXTURE_MOD 175, 238, 238 | COMMENT |
| LOW | test/testevdev.c | 21 | #endif | COMMENT |
| LOW | test/testnative.h | 41 | #ifdef SDL_VIDEO_DRIVER_X11 | COMMENT |
| LOW | test/testime.c | 21 | #include <SDL3/SDL.h> | COMMENT |
| LOW | test/testime.c | 101 | #define UNIFONT_REPLACEMENT 0xFFFD | COMMENT |
| LOW | test/win32/sdlprocdump.c | 1 | #ifndef WIN32_LEAN_AND_MEAN | COMMENT |
| LOW | test/win32/sdlprocdump.c | 21 | #define EXCEPTION_STACK_INVALID 0x8 | COMMENT |
| LOW | test/win32/sdlprocdump.c | 41 | COMMENT | |
| LOW | include/SDL3/SDL_opengles2_gl2ext.h | 41 | #define GL_COLORDODGE_KHR 0x9299 | COMMENT |
| LOW | include/SDL3/SDL_opengles2_gl2ext.h | 61 | COMMENT | |
| LOW | include/SDL3/SDL_opengles2_gl2ext.h | 81 | #define GL_DEBUG_SOURCE_OTHER_KHR 0x824B | COMMENT |
| LOW | include/SDL3/SDL_opengles2_gl2ext.h | 101 | #define GL_MAX_LABEL_LENGTH_KHR 0x82E8 | COMMENT |
| LOW | include/SDL3/SDL_opengles2_gl2ext.h | 141 | #endif /* GL_KHR_no_error */ | COMMENT |
| LOW | include/SDL3/SDL_opengles2_gl2ext.h | 181 | #ifndef GL_KHR_shader_subgroup | COMMENT |
| LOW | include/SDL3/SDL_opengles2_gl2ext.h | 201 | #define GL_COMPRESSED_RGBA_ASTC_5x5_KHR 0x93B2 | COMMENT |
| LOW | include/SDL3/SDL_opengles2_gl2ext.h | 221 | #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR 0x93D8 | COMMENT |
| LOW | include/SDL3/SDL_opengles2_gl2ext.h | 241 | typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image); | COMMENT |
| LOW | include/SDL3/SDL_opengles2_gl2ext.h | 261 | #define GL_OES_compressed_ETC1_RGB8_sub_texture 1 | COMMENT |
| LOW | include/SDL3/SDL_opengles2_gl2ext.h | 281 | #endif /* GL_OES_compressed_paletted_texture */ | COMMENT |
| LOW | include/SDL3/SDL_opengles2_gl2ext.h | 341 | #endif /* GL_OES_draw_elements_base_vertex */ | COMMENT |
| LOW | include/SDL3/SDL_opengles2_gl2ext.h | 361 | #define GL_GEOMETRY_SHADER_OES 0x8DD9 | COMMENT |
| LOW | include/SDL3/SDL_opengles2_gl2ext.h | 381 | #define GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS_OES 0x92CF | COMMENT |
| LOW | include/SDL3/SDL_opengles2_gl2ext.h | 401 | #define GL_OES_get_program_binary 1 | COMMENT |
| LOW | include/SDL3/SDL_opengles2_gl2ext.h | 421 | #define GL_BUFFER_MAPPED_OES 0x88BC | COMMENT |
| LOW | include/SDL3/SDL_opengles2_gl2ext.h | 441 | #define GL_OES_primitive_bounding_box 1 | COMMENT |
| LOW | include/SDL3/SDL_opengles2_gl2ext.h | 461 | #define GL_RGB10_EXT 0x8052 | COMMENT |
| LOW | include/SDL3/SDL_opengles2_gl2ext.h | 481 | #endif /* GL_OES_sample_variables */ | COMMENT |
| LOW | include/SDL3/SDL_opengles2_gl2ext.h | 501 | #endif /* GL_OES_standard_derivatives */ | COMMENT |
| LOW | include/SDL3/SDL_opengles2_gl2ext.h | 521 | COMMENT | |
| LOW | include/SDL3/SDL_opengles2_gl2ext.h | 541 | #define GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS_OES 0x8E83 | COMMENT |
| LOW | include/SDL3/SDL_opengles2_gl2ext.h | 561 | #define GL_REFERENCED_BY_TESS_CONTROL_SHADER_OES 0x9307 | COMMENT |
| LOW | include/SDL3/SDL_opengles2_gl2ext.h | 621 | #ifndef GL_OES_texture_buffer | COMMENT |
| LOW | include/SDL3/SDL_opengles2_gl2ext.h | 641 | GL_APICALL void GL_APIENTRY glTexBufferRangeOES (GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, G | COMMENT |
| LOW | include/SDL3/SDL_opengles2_gl2ext.h | 661 | #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4x4_OES 0x93E4 | COMMENT |
| LOW | include/SDL3/SDL_opengles2_gl2ext.h | 681 | COMMENT | |
| LOW | include/SDL3/SDL_opengles2_gl2ext.h | 701 | #endif /* GL_OES_texture_npot */ | COMMENT |
| LOW | include/SDL3/SDL_opengles2_gl2ext.h | 721 | COMMENT | |
| LOW | include/SDL3/SDL_opengles2_gl2ext.h | 741 | typedef GLboolean (GL_APIENTRYP PFNGLISVERTEXARRAYOESPROC) (GLuint array); | COMMENT |
| LOW | include/SDL3/SDL_opengles2_gl2ext.h | 781 | GL_APICALL void GL_APIENTRY glScissorIndexedvOES (GLuint index, const GLint *v); | COMMENT |
| LOW | include/SDL3/SDL_opengles2_gl2ext.h | 801 | #ifndef GL_AMD_framebuffer_multisample_advanced | COMMENT |
| LOW | include/SDL3/SDL_opengles2_gl2ext.h | 861 | #ifndef GL_ANGLE_depth_texture | COMMENT |
| LOW | include/SDL3/SDL_opengles2_gl2ext.h | 901 | #ifndef GL_ANGLE_pack_reverse_row_order | COMMENT |
| LOW | include/SDL3/SDL_opengles2_gl2ext.h | 921 | #ifndef GL_ANGLE_texture_usage | COMMENT |
| LOW | include/SDL3/SDL_opengles2_gl2ext.h | 941 | #define GL_CLIP_DISTANCE2_APPLE 0x3002 | COMMENT |
| 2200 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM⚡ | .github/workflows/build.yml | 12 | # ┌────────────── minute (0 - 59) | COMMENT |
| MEDIUM⚡ | .github/workflows/build.yml | 13 | # │ ┌───────────── hour (0 - 23) | COMMENT |
| MEDIUM⚡ | .github/workflows/build.yml | 14 | # │ │ ┌───────────── day of the month (1 - 31) | COMMENT |
| MEDIUM⚡ | .github/workflows/build.yml | 15 | # │ │ │ ┌───────────── month (1 - 12 or JAN-DEC) | COMMENT |
| MEDIUM⚡ | .github/workflows/build.yml | 16 | # │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT) | COMMENT |
| MEDIUM | build-scripts/casefolding.txt | 31 | # ================================================================================ | COMMENT |
| MEDIUM | build-scripts/casefolding.txt | 33 | # ================================================================================ | COMMENT |
| MEDIUM | build-scripts/casefolding.txt | 55 | # ================================================================= | COMMENT |
| MEDIUM | build-scripts/casefolding.txt | 62 | # ================================================================= | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | …oject/app/src/main/java/org/libsdl/app/SDLSurface.java | 278 | // if we are. We'll leverage our existing mouse motion listener | COMMENT |
| LOW | include/SDL3/SDL_main_impl.h | 134 | #else /* platforms that use a standard main() and just call SDL_RunApp(), like iOS and 3DS */ | COMMENT |
| MEDIUM | examples/template.html | 266 | // application robust, you may want to override this behavior before shipping! | COMMENT |
| LOW⚡ | build-scripts/wikiheaders.pl | 356 | # So something like "just call `SDL_Whatever`" will become | COMMENT |
| LOW⚡ | build-scripts/wikiheaders.pl | 357 | # "just call [`SDL_Whatever`](SDL_Whatever)", but | COMMENT |
| LOW⚡ | build-scripts/wikiheaders.pl | 358 | # "just call `SDL_Whatever(7)`" will not. It's just the safest | COMMENT |
| MEDIUM | src/video/SDL_blit_1.c | 540 | case SDL_COPY_COLORKEY | SDL_COPY_BLEND: // this is not super-robust but handles a specific case we found sdl12-com | CODE |
| MEDIUM | src/video/windows/SDL_windowsvideo.h | 94 | // More-robust display information in Vista... | COMMENT |
| MEDIUM | src/core/windows/SDL_gameinput.cpp | 44 | // This is recommended, as Microsoft's GameInputCreate() is robust | COMMENT |
| LOW | src/hidapi/testgui/copy_to_bundle.sh | 84 | # necessary. If ../libtool not available, just use cp to do the copy, but | COMMENT |
| MEDIUM | src/joystick/SDL_gamepad.c | 1483 | // We'll pick up a robust mapping in VIRTUAL_JoystickGetGamepadMapping | COMMENT |
| MEDIUM | src/joystick/hidapi/steam/controller_structs.h | 157 | // Triton and derivatives utilize output reports for haptic commands. This is a | COMMENT |
| MEDIUM | src/events/SDL_pen_c.h | 62 | // Note that name and info are copied but currently unused; this is placeholder for a potentially more robust API later. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | VisualC/examples/generate.py | 44 | CODE | |
| LOW | .github/workflows/create-test-plan.py | 938 | CODE | |
| LOW | build-scripts/rename_types.py | 37 | CODE | |
| LOW | build-scripts/rename_macros.py | 62 | CODE | |
| LOW | build-scripts/create-android-project.py | 118 | CODE | |
| LOW | build-scripts/rename_headers.py | 31 | CODE | |
| LOW | build-scripts/build-release.py | 363 | CODE | |
| LOW | build-scripts/build-release.py | 447 | CODE | |
| LOW | build-scripts/build-release.py | 481 | CODE | |
| LOW | build-scripts/build-release.py | 718 | CODE | |
| LOW | build-scripts/build-release.py | 999 | CODE | |
| LOW | build-scripts/build-release.py | 1221 | CODE | |
| LOW | build-scripts/rename_symbols.py | 48 | CODE | |
| LOW | build-scripts/rename_symbols.py | 85 | CODE | |
| LOW | build-scripts/rename_api.py | 126 | CODE | |
| LOW | build-scripts/rename_api.py | 192 | CODE | |
| LOW | build-scripts/check_android_jni.py | 66 | CODE | |
| LOW | build-scripts/check_android_jni.py | 103 | CODE | |
| LOW | build-scripts/check_android_jni.py | 136 | CODE | |
| LOW | build-scripts/check_stdlib_usage.py | 159 | CODE | |
| LOW | src/dynapi/gendynapi.py | 77 | CODE | |
| LOW | src/dynapi/gendynapi.py | 371 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | build-scripts/rename_types.py | 47 | except Exception as err: | CODE |
| LOW | build-scripts/rename_types.py | 75 | except Exception as e: | CODE |
| MEDIUM | build-scripts/rename_types.py | 37 | def replace_symbols_in_file(file, regex, replacements): | CODE |
| LOW | build-scripts/rename_macros.py | 74 | except Exception as err: | CODE |
| LOW | build-scripts/rename_macros.py | 101 | except Exception as e: | CODE |
| MEDIUM | build-scripts/rename_macros.py | 62 | def apply_checks_in_file(file, checks): | CODE |
| LOW | build-scripts/rename_headers.py | 43 | except Exception as err: | CODE |
| LOW | build-scripts/rename_headers.py | 70 | except Exception as e: | CODE |
| MEDIUM | build-scripts/rename_headers.py | 31 | def replace_headers_in_file(file, replacements): | CODE |
| LOW | build-scripts/rename_symbols.py | 95 | except Exception as err: | CODE |
| LOW | build-scripts/rename_symbols.py | 125 | except Exception as e: | CODE |
| MEDIUM | build-scripts/rename_symbols.py | 85 | def replace_symbols_in_file(file, regex, replacements): | CODE |
| LOW | build-scripts/rename_api.py | 249 | except Exception as e: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | test/emscripten/server.py | 13 | class MyHTTPRequestHandler(SimpleHTTPRequestHandler): | CODE |
| LOW | build-scripts/rename_types.py | 34 | def create_regex_from_replacements(replacements): | CODE |
| LOW | build-scripts/create-android-project.py | 87 | def gradle_add_prefab_and_aar(path: Path, aar: str) -> None: | STRING |
| LOW | build-scripts/setup-gdk-desktop.py | 107 | def copy_files_and_merge_into(srcdir: Path, dstdir: Path) -> None: | CODE |
| LOW | build-scripts/build-release.py | 607 | def _external_repo_path_filter(cls, path: str) -> bool: | STRING |
| LOW | build-scripts/build-release.py | 945 | def _get_prefab_module_json_text(self, library_name: typing.Optional[str], export_libraries: list[str]) -> str: | STRING |
| LOW | build-scripts/build-release.py | 978 | def _get_prefab_abi_json_text(self, abi: str, cpp: bool, shared: bool) -> str: | STRING |
| LOW | build-scripts/build-release.py | 988 | def _get_android_manifest_text(self) -> str: | STRING |
| LOW | build-scripts/build-release.py | 1309 | def _arch_platform_to_build_path(self, arch_platform: VsArchPlatformConfig) -> Path: | STRING |
| LOW | build-scripts/build-release.py | 1312 | def _arch_platform_to_install_path(self, arch_platform: VsArchPlatformConfig) -> Path: | STRING |
| LOW | build-scripts/rename_symbols.py | 77 | def create_regex_from_replacements(replacements): | CODE |
| LOW | build-scripts/rename_symbols.py | 81 | def create_substring_regex_from_replacements(replacements): | CODE |
| LOW | build-scripts/check_android_jni.py | 39 | def java_type_to_jni_spec_internal(type_str: str) -> tuple[int, str]: | CODE |
| LOW | build-scripts/check_android_jni.py | 66 | def collect_jni_bindings_from_c() -> dict[str, set[JniMethodBinding]]: | CODE |
| LOW | build-scripts/check_android_jni.py | 103 | def collect_jni_bindings_from_java() -> dict[str, set[JniMethodBinding]]: | CODE |
| LOW | src/dynapi/gendynapi.py | 365 | def print_check_comment_header(): | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | test/emscripten/driver.py | 8 | CODE | |
| LOW | cmake/xxd.py | 4 | CODE | |
| LOW | .github/workflows/create-test-plan.py | 9 | CODE | |
| LOW | build-scripts/rename_types.py | 6 | CODE | |
| LOW | build-scripts/create-release.py | 6 | CODE | |
| LOW | build-scripts/setup-gdk-desktop.py | 4 | CODE | |
| LOW | build-scripts/build-release.py | 10 | CODE | |
| LOW | build-scripts/rename_symbols.py | 6 | CODE | |
| LOW | build-scripts/rename_api.py | 7 | CODE | |
| LOW | build-scripts/rename_api.py | 9 | CODE | |
| LOW | build-scripts/check_stdlib_usage.py | 25 | CODE | |
| LOW | src/dynapi/gendynapi.py | 36 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | src/io/SDL_sysasyncio.h | 85 | LINKED_LIST_DECLARE_FIELDS(struct SDL_AsyncIOTask, queue); // the generic backend uses this, so I've added it h | CODE |
| HIGH | src/io/SDL_sysasyncio.h | 86 | LINKED_LIST_DECLARE_FIELDS(struct SDL_AsyncIOTask, threadpool); // the generic backend uses this, so I've added it h | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | test/emscripten/driver.py | 20 | logger = logging.getLogger(__name__) | CODE |
| LOW | .github/workflows/create-test-plan.py | 14 | logger = logging.getLogger(__name__) | CODE |
| LOW | build-scripts/setup-gdk-desktop.py | 20 | logger = logging.getLogger(__name__) | CODE |
| LOW | build-scripts/build-release.py | 36 | logger = logging.getLogger(__name__) | CODE |
| LOW | build-scripts/download-gameinput-sdk.py | 8 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/dynapi/gendynapi.py | 60 | logger = logging.getLogger(__name__) | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | …oject/app/src/main/java/org/libsdl/app/SDLSurface.java | 277 | // We need to check if we're in relative mouse mode and get the axis offset rather than the x/y values | COMMENT |
| LOW | src/video/dos/SDL_dosvideo.c | 198 | // Step 1: query the required buffer size (subfunction 0x00). | COMMENT |
| LOW | src/video/dos/SDL_dosvideo.c | 210 | // Step 2: save state (subfunction 0x01) into conventional memory buffer. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | include/SDL3/SDL_process.h | 39 | * Don't forget to call SDL_DestroyProcess() to clean up, whether the process | COMMENT |
| LOW | src/video/SDL_stb.c | 380 | /* And don't forget to report the problem to the the sdl list too! */ | COMMENT |
| LOW | src/render/direct3d11/SDL_render_d3d11.c | 515 | * Don't forget to declare your application's minimum required feature level in its | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | build-scripts/androidbuildlibs.sh | 23 | # Create the build directories | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | build-scripts/check_elf_alignment.sh | 105 | # Check if this is a critical architecture (arm64-v8a or x86_64) | COMMENT |
| LOW | build-scripts/update-version.sh | 42 | # Set compat to major.minor.0 by default. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | src/video/dos/SDL_dosvideo.c | 198 | // Step 1: query the required buffer size (subfunction 0x00). | COMMENT |
| LOW | src/video/dos/SDL_dosvideo.c | 210 | // Step 2: save state (subfunction 0x01) into conventional memory buffer. | COMMENT |