nanomsg-next-generation -- light-weight brokerless messaging
This report presents the forensic synthetic code analysis of nanomsg/nng, a C project with 4,623 GitHub stars. SynthScan v2.0 examined 113,727 lines of code across 394 source files, recording 459 pattern matches distributed across 3 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).
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 459 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.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | CMakeLists.txt | 1 | # | COMMENT |
| LOW | demo/http_client/CMakeLists.txt | 1 | # | COMMENT |
| LOW | demo/http_client/http_client.c | 1 | // | COMMENT |
| LOW | demo/http_client/http_client.c | 21 | // since this program just exits. In longer running programs or libraries, | COMMENT |
| LOW | demo/reqrep/reqrep.c | 1 | // | COMMENT |
| LOW | demo/stream/stream.c | 1 | // Copyright 2020 Hugo Lindström <hugolm84@gmail.com> | COMMENT |
| LOW | demo/stream/platform/posix/server.c | 1 | // Copyright 2020 Hugo Lindström <hugolm84@gmail.com> | COMMENT |
| LOW | demo/async/CMakeLists.txt | 1 | # | COMMENT |
| LOW | demo/async/server.c | 1 | // Copyright 2025 Staysail Systems, Inc. <info@staysail.tech> | COMMENT |
| LOW | demo/async/server.c | 21 | // To run this program, start the server as async_demo <url> -s | COMMENT |
| LOW | demo/async/client.c | 1 | // Copyright 2025 Staysail Systems, Inc. <info@staysail.tech> | COMMENT |
| LOW | demo/pubsub_forwarder/pubsub_forwarder.c | 1 | // | COMMENT |
| LOW | demo/pubsub_forwarder/pubsub_forwarder.c | 21 | // - In a third terminal, run | COMMENT |
| LOW | demo/raw/raw.c | 1 | // Copyright 2025 Staysail Systems, Inc. <info@staysail.tech> | COMMENT |
| LOW | demo/raw/raw.c | 21 | // For example: | COMMENT |
| LOW | demo/rest/server.c | 1 | // | COMMENT |
| LOW | demo/rest/server.c | 21 | // The reply is obtained from the server, and sent back to the client via | COMMENT |
| LOW | demo/rest/server.c | 41 | #include <string.h> | COMMENT |
| LOW | include/nng/http.h | 1 | // | COMMENT |
| LOW | include/nng/http.h | 101 | COMMENT | |
| LOW | include/nng/http.h | 121 | // than the amount requested. (It completes as soon as at least one | COMMENT |
| LOW | include/nng/http.h | 161 | COMMENT | |
| LOW | include/nng/http.h | 201 | COMMENT | |
| LOW | include/nng/http.h | 221 | COMMENT | |
| LOW | include/nng/http.h | 241 | // is registered with the server, and that a handler can only be registered | COMMENT |
| LOW | include/nng/http.h | 281 | // nng_http_handler_alloc_file creates a "directory" based handler, that | COMMENT |
| LOW | include/nng/http.h | 301 | NNG_DECL void nng_http_handler_set_host(nng_http_handler *, const char *); | COMMENT |
| LOW | include/nng/http.h | 341 | // nng_http_server_start starts the server handling HTTP. Once this is | COMMENT |
| LOW | include/nng/http.h | 361 | // (not registered), NNG_ENOENT is returned. In this case it is unsafe | COMMENT |
| LOW | include/nng/http.h | 381 | COMMENT | |
| LOW | include/nng/http.h | 401 | // nng_http_hijack is intended to be called by a handler that wishes to | COMMENT |
| LOW | include/nng/http.h | 421 | NNG_DECL nng_err nng_http_client_alloc(nng_http_client **, const nng_url *); | COMMENT |
| LOW | include/nng/http.h | 441 | // in the first (index 0) output for the aio. | COMMENT |
| LOW | include/nng/args.h | 1 | // | COMMENT |
| LOW | include/nng/args.h | 21 | // This is a header library, and it does not depend on anything else in NNG. | COMMENT |
| LOW | include/nng/args.h | 41 | int a_val; // Value stored on a good parse (>0) | COMMENT |
| LOW | include/nng/nng.h | 1 | // | COMMENT |
| LOW | include/nng/nng.h | 21 | extern "C" { | COMMENT |
| LOW | include/nng/nng.h | 41 | #if defined(NNG_SHARED_LIB) && defined(NNG_HIDDEN_VISIBILITY) | COMMENT |
| LOW | include/nng/nng.h | 61 | #define NNG_MINOR_VERSION 0 | COMMENT |
| LOW | include/nng/nng.h | 121 | // codes. We try hard to match things semantically to one of our standard | COMMENT |
| LOW | include/nng/nng.h | 181 | // Internal details are opaque. | COMMENT |
| LOW | include/nng/nng.h | 321 | COMMENT | |
| LOW | include/nng/nng.h | 361 | // and starts it listening. It is functionally equivalent to the legacy | COMMENT |
| LOW | include/nng/nng.h | 461 | // code supplied. | COMMENT |
| LOW | include/nng/nng.h | 481 | COMMENT | |
| LOW | include/nng/nng.h | 501 | COMMENT | |
| LOW | include/nng/nng.h | 521 | // a positive value for a valid context, or < 0 for an invalid context. | COMMENT |
| LOW | include/nng/nng.h | 561 | // application is required to keep track of the size of memory, this is | COMMENT |
| LOW | include/nng/nng.h | 581 | // I/O functions being called. | COMMENT |
| LOW | include/nng/nng.h | 601 | NNG_DECL void nng_aio_reap(nng_aio *); | COMMENT |
| LOW | include/nng/nng.h | 621 | // nng_aio_cancel attempts to cancel any in-progress I/O operation. | COMMENT |
| LOW | include/nng/nng.h | 661 | NNG_DECL void *nng_aio_get_output(nng_aio *, unsigned); | COMMENT |
| LOW | include/nng/nng.h | 681 | COMMENT | |
| LOW | include/nng/nng.h | 701 | // final argument is passed to the cancelfn. The final argument of the | COMMENT |
| LOW | include/nng/nng.h | 801 | #define NNG_OPT_RECVBUF "recv-buffer" | COMMENT |
| LOW | include/nng/nng.h | 821 | // only available for pipes. This option may return incorrect results if | COMMENT |
| LOW | include/nng/nng.h | 841 | // middle boxes thinking the session has gone idle (e.g. keeping NAT | COMMENT |
| LOW | include/nng/nng.h | 861 | // for its peer to accept the connection. The duration must be positive. | COMMENT |
| LOW | include/nng/nng.h | 881 | #define NNG_OPT_IPC_PERMISSIONS "ipc:permissions" | COMMENT |
| 396 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | demo/http_client/http_client.c | 27 | // Example usage: | COMMENT |
| LOW | demo/rest/server.c | 24 | // Example usage: | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | demo/rest/server.c | 20 | // NNG REP server (builtin inproc_server, for demonstration purposes only). | COMMENT |