The core OCaml system: compilers, runtime system, base libraries
This report presents the forensic synthetic code analysis of ocaml/ocaml, a OCaml project with 6,600 GitHub stars. SynthScan v2.0 examined 102,819 lines of code across 507 source files, recording 353 pattern matches distributed across 11 syntactic categories. The overall adjusted score of 4.0 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).
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.
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 353 distinct pattern matches across 11 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 | appveyor.yml | 1 | #************************************************************************** | COMMENT |
| LOW | build-aux/ltmain.sh | 1 | #! /usr/bin/env sh | COMMENT |
| LOW | build-aux/ltmain.sh | 21 | # same distribution terms that you use for the rest of that program. | COMMENT |
| LOW | build-aux/ltmain.sh | 41 | COMMENT | |
| LOW | build-aux/ltmain.sh | 61 | ## -------------------------- ## | COMMENT |
| LOW | build-aux/ltmain.sh | 81 | # the files within it. See the URLs above, or the file `LICENSE` | COMMENT |
| LOW | build-aux/ltmain.sh | 181 | COMMENT | |
| LOW | build-aux/ltmain.sh | 401 | done | COMMENT |
| LOW | build-aux/ltmain.sh | 421 | # overwrite any of the functions or variables defined here before | COMMENT |
| LOW | build-aux/ltmain.sh | 501 | # warnings, or a space delimited list of some subset of | COMMENT |
| LOW | build-aux/ltmain.sh | 561 | ## ----------------- ## | COMMENT |
| LOW | build-aux/ltmain.sh | 721 | # func_dirname FILE APPEND NONDIR_REPLACEMENT | COMMENT |
| LOW | build-aux/ltmain.sh | 1261 | # quotes backslashified. Available only if 'unquoted' is specified. | COMMENT |
| LOW | build-aux/ltmain.sh | 1281 | # " | \" | \" | COMMENT |
| LOW | build-aux/ltmain.sh | 1521 | } | COMMENT |
| LOW | build-aux/ltmain.sh | 1541 | # This file is dual licensed under the terms of the MIT license | COMMENT |
| LOW | build-aux/ltmain.sh | 1561 | # of too. | COMMENT |
| LOW | build-aux/ltmain.sh | 1581 | # The default options also support '--debug', which will turn on shell | COMMENT |
| LOW | build-aux/ltmain.sh | 1721 | eval set dummy "$func_run_hooks_result"; shift | COMMENT |
| LOW | build-aux/ltmain.sh | 1741 | # function unnecessarily because it can be an expensive operation on some | COMMENT |
| LOW | build-aux/ltmain.sh | 1761 | # { | COMMENT |
| LOW | build-aux/ltmain.sh | 1781 | # ;; | COMMENT |
| LOW | build-aux/ltmain.sh | 1801 | # | COMMENT |
| LOW | build-aux/ltmain.sh | 2161 | COMMENT | |
| LOW | build-aux/ltmain.sh | 3081 | func_convert_core_file_wine_to_w32_result= | COMMENT |
| LOW | build-aux/ltmain.sh | 3121 | } | COMMENT |
| LOW | build-aux/ltmain.sh | 3241 | } | COMMENT |
| LOW | build-aux/ltmain.sh | 3381 | fi | COMMENT |
| LOW | build-aux/ltmain.sh | 5381 | COMMENT | |
| LOW | build-aux/ltmain.sh | 5441 | s/^====MARK====// | COMMENT |
| LOW | build-aux/ltmain.sh | 5461 | # Platform-specific function to extract the | COMMENT |
| LOW | build-aux/ltmain.sh | 5601 | # func_emit_wrapper [arg=no] | COMMENT |
| LOW | build-aux/ltmain.sh | 5621 | COMMENT | |
| LOW | build-aux/ltmain.sh | 5941 | # include <io.h> | COMMENT |
| LOW | build-aux/ltmain.sh | 5961 | #if defined __MINGW32__ | COMMENT |
| LOW | build-aux/ltmain.sh | 5981 | # define S_IXUSR _S_IEXEC | COMMENT |
| LOW | build-aux/ltmain.sh | 6001 | COMMENT | |
| LOW | build-aux/ltmain.sh | 6021 | # endif | COMMENT |
| LOW | build-aux/ltmain.sh | 7701 | # -F/path path to uninstalled frameworks, gcc on darwin | COMMENT |
| LOW | build-aux/ltmain.sh | 9061 | case $deplib in | COMMENT |
| LOW | build-aux/ltmain.sh | 11501 | # The TAGs below are defined such that we never get into a situation | COMMENT |
| LOW | build-aux/ltmain.sh | 11521 | # Local Variables: | COMMENT |
| LOW | tools/ocaml.py | 1 | #************************************************************************** | COMMENT |
| LOW | tools/ocaml.py | 21 | # | COMMENT |
| LOW | tools/ocaml.py | 41 | # | COMMENT |
| LOW | tools/ocaml.py | 61 | # value(): the value cast to the "value" Caml runtime type. | COMMENT |
| LOW | tools/ocaml.py | 81 | # number which can have any value, including negative. | COMMENT |
| LOW | tools/gdb_ocamlrun.py | 1 | #************************************************************************** | COMMENT |
| LOW | tools/git-dev-options.sh | 1 | #! /bin/sh | COMMENT |
| LOW | tools/gdb.py | 1 | #************************************************************************** | COMMENT |
| LOW | tools/check-parser-uptodate-or-warn.sh | 1 | #!/bin/sh | COMMENT |
| LOW | tools/lldb.py | 1 | #************************************************************************** | COMMENT |
| LOW | tools/opam/process.sh | 1 | #!/bin/sh | COMMENT |
| LOW | tools/opam/process.sh | 21 | if (set -o pipefail 2> /dev/null); then | COMMENT |
| LOW | tools/ci/actions/check-manual-modified.sh | 1 | #!/usr/bin/env bash | COMMENT |
| LOW | tools/ci/actions/deepen-fetch.sh | 1 | #!/usr/bin/env bash | COMMENT |
| LOW | tools/ci/actions/deepen-fetch.sh | 21 | # - FETCH_HEAD - the merge commit for a PR or the tip of the branch of a push | COMMENT |
| LOW | tools/ci/actions/check-configure.sh | 1 | #!/usr/bin/env bash | COMMENT |
| LOW | tools/ci/actions/check-no-ignored-files.sh | 1 | #!/usr/bin/env bash | COMMENT |
| LOW | tools/ci/actions/check-typo.sh | 1 | #!/usr/bin/env bash | COMMENT |
| 189 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | build-aux/ltmain.sh | 157 | # -------------- | COMMENT |
| MEDIUM | build-aux/ltmain.sh | 183 | # ---------------------- | COMMENT |
| MEDIUM | build-aux/ltmain.sh | 192 | # -------------------------------------------- | COMMENT |
| MEDIUM | build-aux/ltmain.sh | 378 | # --------------------------- | COMMENT |
| MEDIUM | build-aux/ltmain.sh | 523 | # ------------------- | COMMENT |
| MEDIUM | build-aux/ltmain.sh | 572 | # --------------------- | COMMENT |
| MEDIUM | build-aux/ltmain.sh | 618 | # ---------------------------- | COMMENT |
| MEDIUM | build-aux/ltmain.sh | 641 | # -------------------------- | COMMENT |
| MEDIUM | build-aux/ltmain.sh | 665 | # ------------------ | COMMENT |
| MEDIUM | build-aux/ltmain.sh | 689 | # ------------------ | COMMENT |
| MEDIUM | build-aux/ltmain.sh | 722 | # ------------------------------------------- | COMMENT |
| MEDIUM | build-aux/ltmain.sh | 734 | # -------------------------------------------------------- | COMMENT |
| MEDIUM | build-aux/ltmain.sh | 755 | # ---------------- | COMMENT |
| MEDIUM | build-aux/ltmain.sh | 774 | # -------------------- | COMMENT |
| MEDIUM | build-aux/ltmain.sh | 783 | # ------------------------------ | COMMENT |
| MEDIUM | build-aux/ltmain.sh | 819 | # ----------------- | COMMENT |
| MEDIUM | build-aux/ltmain.sh | 832 | # ----------------------- | COMMENT |
| MEDIUM | build-aux/ltmain.sh | 844 | # ----------------------------- | COMMENT |
| MEDIUM | build-aux/ltmain.sh | 855 | # --------------- | COMMENT |
| MEDIUM | build-aux/ltmain.sh | 881 | # --------------------------- | COMMENT |
| MEDIUM | build-aux/ltmain.sh | 929 | # ------------------------- | COMMENT |
| MEDIUM | build-aux/ltmain.sh | 967 | # ------------------------ | COMMENT |
| MEDIUM | build-aux/ltmain.sh | 1057 | # -------------------- | COMMENT |
| MEDIUM | build-aux/ltmain.sh | 1073 | # -------------------------------- | COMMENT |
| MEDIUM | build-aux/ltmain.sh | 1138 | # ---------------------------- | COMMENT |
| MEDIUM | build-aux/ltmain.sh | 1218 | # ----------------------- | COMMENT |
| MEDIUM | build-aux/ltmain.sh | 1253 | # ------------------------ | COMMENT |
| MEDIUM | build-aux/ltmain.sh | 1264 | # ---------------- | COMMENT |
| MEDIUM | build-aux/ltmain.sh | 1317 | # ------------------------ | COMMENT |
| MEDIUM | build-aux/ltmain.sh | 1338 | # --------------------------------- | COMMENT |
| MEDIUM | build-aux/ltmain.sh | 1368 | # ----------------------------- | COMMENT |
| MEDIUM | build-aux/ltmain.sh | 1393 | # ------------------------------------ | COMMENT |
| MEDIUM | build-aux/ltmain.sh | 1422 | # ---------- | COMMENT |
| MEDIUM | build-aux/ltmain.sh | 1443 | # ------------------- | COMMENT |
| MEDIUM | build-aux/ltmain.sh | 1456 | # ----------------------------- | COMMENT |
| MEDIUM | build-aux/ltmain.sh | 1469 | # ---------------------------- | COMMENT |
| MEDIUM | build-aux/ltmain.sh | 1494 | # ----------------------- | COMMENT |
| MEDIUM | build-aux/ltmain.sh | 1511 | # --------------------- | COMMENT |
| MEDIUM | build-aux/ltmain.sh | 1640 | # ----------------------- | COMMENT |
| MEDIUM | build-aux/ltmain.sh | 1652 | # --------------------------------- | COMMENT |
| MEDIUM | build-aux/ltmain.sh | 1669 | # ------------------------------------ | COMMENT |
| MEDIUM | build-aux/ltmain.sh | 1681 | # --------------------------------------------- | COMMENT |
| MEDIUM | build-aux/ltmain.sh | 1699 | # --------------------------------- | COMMENT |
| MEDIUM | build-aux/ltmain.sh | 1813 | # ---------------------------- | COMMENT |
| MEDIUM | build-aux/ltmain.sh | 1825 | # --------------------- | COMMENT |
| MEDIUM | build-aux/ltmain.sh | 1858 | # -------------------------- | COMMENT |
| MEDIUM | build-aux/ltmain.sh | 1879 | # --------------------------- | COMMENT |
| MEDIUM | build-aux/ltmain.sh | 1999 | # ------------------------------ | COMMENT |
| MEDIUM | build-aux/ltmain.sh | 2028 | # ---------------------- | COMMENT |
| MEDIUM | build-aux/ltmain.sh | 2056 | # ------------------------ | COMMENT |
| MEDIUM | build-aux/ltmain.sh | 2069 | # ------------------------ | COMMENT |
| MEDIUM | build-aux/ltmain.sh | 2105 | # ----------------------------- | COMMENT |
| MEDIUM | build-aux/ltmain.sh | 2131 | # ---------- | COMMENT |
| MEDIUM | build-aux/ltmain.sh | 2144 | # ------------------ | COMMENT |
| MEDIUM | build-aux/ltmain.sh | 2164 | # ------------ | COMMENT |
| MEDIUM | build-aux/ltmain.sh | 2221 | # ------------ | COMMENT |
| MEDIUM | build-aux/ltmain.sh | 2245 | # ---------------- | COMMENT |
| MEDIUM | build-aux/ltmain.sh | 2336 | # --------------------- | COMMENT |
| MEDIUM | build-aux/ltmain.sh | 2353 | # --------------------------- | COMMENT |
| MEDIUM | build-aux/ltmain.sh | 2375 | # ------------------------------- | COMMENT |
| 8 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | build-aux/ltmain.sh | 77 | # This file is dual licensed under the terms of the MIT license | COMMENT |
| MEDIUM | build-aux/ltmain.sh | 1541 | # This file is dual licensed under the terms of the MIT license | COMMENT |
| MEDIUM | build-aux/ltmain.sh | 1559 | # This file is a library for parsing options in your shell scripts along | COMMENT |
| MEDIUM | build-aux/ltmain.sh | 2807 | # This function is only a basic sanity check; it will hardly flush out | COMMENT |
| MEDIUM | build-aux/ltmain.sh | 2817 | # This function implements the same check as func_lalib_p without | COMMENT |
| MEDIUM | build-aux/ltmain.sh | 2840 | # This function is only a basic sanity check; it will hardly flush out | COMMENT |
| MEDIUM | build-aux/ltmain.sh | 2850 | # This function is only a basic sanity check; it will hardly flush out | COMMENT |
| MEDIUM | build-aux/ltmain.sh | 2875 | # This function is only a basic sanity check; it will hardly flush out | COMMENT |
| MEDIUM | build-aux/ltmain.sh | 3015 | # Create a libtool object file (analogous to a ".la" file), | COMMENT |
| MEDIUM | build-aux/ltmain.sh | 7938 | # Create the object directory. | COMMENT |
| MEDIUM | build-aux/ltmain.sh | 10519 | # Create the old-style object. | COMMENT |
| MEDIUM | build-aux/ltmain.sh | 10539 | # Create an invalid libtool object if no PIC, so that we don't | COMMENT |
| MEDIUM | tools/ocaml.py | 15 | # This file contains any debugger-agnostic code for debugger plugins. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | build-aux/ltmain.sh | 345 | # Sed substitution that helps us do robust quoting. It backslashifies | COMMENT |
| MEDIUM | build-aux/ltmain.sh | 5631 | # Sed substitution that helps us do robust quoting. It backslashifies | COMMENT |
| MEDIUM | tools/check-parser-uptodate-or-warn.sh | 22 | # is not robust to clone/checkout refreshing the files in an arbitrary | COMMENT |
| MEDIUM | testsuite/tests/backtrace/filter-locations.sh | 3 | # to be robust to different inlining choices made by different compiler settings. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | build-aux/ltmain.sh | 379 | # Check if we can use backslash as IFS='\' separator, and set | COMMENT |
| LOW | build-aux/ltmain.sh | 666 | # Set func_arith_result to the result of evaluating TERMs. | COMMENT |
| LOW | build-aux/ltmain.sh | 690 | # Set func_basename_result to FILE with everything up to and including | COMMENT |
| LOW | build-aux/ltmain.sh | 856 | # Set func_len_result to the length of STRING. STRING may not | COMMENT |
| LOW | build-aux/ltmain.sh | 1074 | # Set func_relative_path_result to the relative path from SRCDIR to DSTDIR. | COMMENT |
| LOW | build-aux/ltmain.sh | 4294 | # Check if any of the arguments is a wrapper script. | COMMENT |
| LOW | build-aux/ltmain.sh | 10242 | # Loop over the list of objects to be linked. | COMMENT |
| LOW | tools/ci/actions/check-changes-modified.sh | 35 | # Check if Changes has been updated in the PR | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tools/ocaml.py | 220 | CODE | |
| LOW | tools/ocaml.py | 355 | CODE | |
| LOW | tools/ocaml.py | 407 | CODE | |
| LOW | tools/gdb_ocamlrun.py | 91 | CODE | |
| LOW | testsuite/tests/native-debugger/lldb_test.py | 13 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | testsuite/tests/native-debugger/gdb_test.py | 48 | # Usage: | COMMENT |
| LOW | testsuite/tests/native-debugger/lldb_test.py | 30 | # Usage: | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | runtime/weak.c | 125 | /* If we are in Phase_sweep_ephe we need to check if the key | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | runtime/intern.c | 728 | /* Use the code pointer from the "placeholder" function */ | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | testsuite/tests/native-debugger/lldb_test.py | 3 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | runtime/caml/weak.h | 65 | If fields are added, don't forget to update weak.ml, [additional_values], | CODE |