Repository Analysis

nanomsg/nng

nanomsg-next-generation -- light-weight brokerless messaging

4.0 Likely human-written View on GitHub

Analysis Overview

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).

4.0
Adjusted Score
4.0
Raw Score
100%
Time Factor
2026-07-13
Last Push
4.6K
Stars
C
Language
113.7K
Lines of Code
394
Files
459
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 0MEDIUM 1LOW 458

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 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.

Over-Commented Block456 hits · 444 pts
SeverityFileLineSnippetContext
LOWCMakeLists.txt1#COMMENT
LOWdemo/http_client/CMakeLists.txt1#COMMENT
LOWdemo/http_client/http_client.c1//COMMENT
LOWdemo/http_client/http_client.c21// since this program just exits. In longer running programs or libraries,COMMENT
LOWdemo/reqrep/reqrep.c1//COMMENT
LOWdemo/stream/stream.c1// Copyright 2020 Hugo Lindström <hugolm84@gmail.com>COMMENT
LOWdemo/stream/platform/posix/server.c1// Copyright 2020 Hugo Lindström <hugolm84@gmail.com>COMMENT
LOWdemo/async/CMakeLists.txt1#COMMENT
LOWdemo/async/server.c1// Copyright 2025 Staysail Systems, Inc. <info@staysail.tech>COMMENT
LOWdemo/async/server.c21// To run this program, start the server as async_demo <url> -sCOMMENT
LOWdemo/async/client.c1// Copyright 2025 Staysail Systems, Inc. <info@staysail.tech>COMMENT
LOWdemo/pubsub_forwarder/pubsub_forwarder.c1//COMMENT
LOWdemo/pubsub_forwarder/pubsub_forwarder.c21// - In a third terminal, runCOMMENT
LOWdemo/raw/raw.c1// Copyright 2025 Staysail Systems, Inc. <info@staysail.tech>COMMENT
LOWdemo/raw/raw.c21// For example:COMMENT
LOWdemo/rest/server.c1//COMMENT
LOWdemo/rest/server.c21// The reply is obtained from the server, and sent back to the client viaCOMMENT
LOWdemo/rest/server.c41#include <string.h>COMMENT
LOWinclude/nng/http.h1//COMMENT
LOWinclude/nng/http.h101COMMENT
LOWinclude/nng/http.h121// than the amount requested. (It completes as soon as at least oneCOMMENT
LOWinclude/nng/http.h161COMMENT
LOWinclude/nng/http.h201COMMENT
LOWinclude/nng/http.h221COMMENT
LOWinclude/nng/http.h241// is registered with the server, and that a handler can only be registeredCOMMENT
LOWinclude/nng/http.h281// nng_http_handler_alloc_file creates a "directory" based handler, thatCOMMENT
LOWinclude/nng/http.h301NNG_DECL void nng_http_handler_set_host(nng_http_handler *, const char *);COMMENT
LOWinclude/nng/http.h341// nng_http_server_start starts the server handling HTTP. Once this isCOMMENT
LOWinclude/nng/http.h361// (not registered), NNG_ENOENT is returned. In this case it is unsafeCOMMENT
LOWinclude/nng/http.h381COMMENT
LOWinclude/nng/http.h401// nng_http_hijack is intended to be called by a handler that wishes toCOMMENT
LOWinclude/nng/http.h421NNG_DECL nng_err nng_http_client_alloc(nng_http_client **, const nng_url *);COMMENT
LOWinclude/nng/http.h441// in the first (index 0) output for the aio.COMMENT
LOWinclude/nng/args.h1//COMMENT
LOWinclude/nng/args.h21// This is a header library, and it does not depend on anything else in NNG.COMMENT
LOWinclude/nng/args.h41 int a_val; // Value stored on a good parse (>0)COMMENT
LOWinclude/nng/nng.h1//COMMENT
LOWinclude/nng/nng.h21extern "C" {COMMENT
LOWinclude/nng/nng.h41#if defined(NNG_SHARED_LIB) && defined(NNG_HIDDEN_VISIBILITY)COMMENT
LOWinclude/nng/nng.h61#define NNG_MINOR_VERSION 0COMMENT
LOWinclude/nng/nng.h121// codes. We try hard to match things semantically to one of our standardCOMMENT
LOWinclude/nng/nng.h181// Internal details are opaque.COMMENT
LOWinclude/nng/nng.h321COMMENT
LOWinclude/nng/nng.h361// and starts it listening. It is functionally equivalent to the legacyCOMMENT
LOWinclude/nng/nng.h461// code supplied.COMMENT
LOWinclude/nng/nng.h481COMMENT
LOWinclude/nng/nng.h501COMMENT
LOWinclude/nng/nng.h521// a positive value for a valid context, or < 0 for an invalid context.COMMENT
LOWinclude/nng/nng.h561// application is required to keep track of the size of memory, this isCOMMENT
LOWinclude/nng/nng.h581// I/O functions being called.COMMENT
LOWinclude/nng/nng.h601NNG_DECL void nng_aio_reap(nng_aio *);COMMENT
LOWinclude/nng/nng.h621// nng_aio_cancel attempts to cancel any in-progress I/O operation.COMMENT
LOWinclude/nng/nng.h661NNG_DECL void *nng_aio_get_output(nng_aio *, unsigned);COMMENT
LOWinclude/nng/nng.h681COMMENT
LOWinclude/nng/nng.h701// final argument is passed to the cancelfn. The final argument of theCOMMENT
LOWinclude/nng/nng.h801#define NNG_OPT_RECVBUF "recv-buffer"COMMENT
LOWinclude/nng/nng.h821// only available for pipes. This option may return incorrect results ifCOMMENT
LOWinclude/nng/nng.h841// middle boxes thinking the session has gone idle (e.g. keeping NATCOMMENT
LOWinclude/nng/nng.h861// for its peer to accept the connection. The duration must be positive.COMMENT
LOWinclude/nng/nng.h881#define NNG_OPT_IPC_PERMISSIONS "ipc:permissions"COMMENT
396 more matches not shown…
Example Usage Blocks2 hits · 3 pts
SeverityFileLineSnippetContext
LOWdemo/http_client/http_client.c27// Example usage:COMMENT
LOWdemo/rest/server.c24// Example usage:COMMENT
Slop Phrases1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUMdemo/rest/server.c20// NNG REP server (builtin inproc_server, for demonstration purposes only).COMMENT