Repository Analysis

lpereira/lwan

Experimental, scalable, high performance HTTP server

3.7 Likely human-written View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of lpereira/lwan, a C project with 6,035 GitHub stars. SynthScan v2.0 examined 50,976 lines of code across 246 source files, recording 169 pattern matches distributed across 6 syntactic categories. The overall adjusted score of 3.7 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).

3.7
Adjusted Score
3.7
Raw Score
100%
Time Factor
2026-08-01
Last Push
6.0K
Stars
C
Language
51.0K
Lines of Code
246
Files
169
Pattern Hits
2026-08-02
Scan Date
0.01
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

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.

No multi-scan history yet — run the scanner again to build trend data.

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 3MEDIUM 1LOW 165

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 169 distinct pattern matches across 6 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 Block140 hits · 140 pts
SeverityFileLineSnippetContext
LOWfuzz/mayhem/build.sh1#!/bin/bash -euvCOMMENT
LOWsrc/bin/tools/mimegen.c21#include <assert.h>COMMENT
LOWsrc/bin/tools/weighttp.c21#pragma GCC diagnostic ignored "-Wvla"COMMENT
LOWsrc/bin/tools/weighttp.c41#include <strings.h> /* strcasecmp() strncasecmp() */COMMENT
LOWsrc/bin/tools/weighttp.c61COMMENT
LOWsrc/bin/tools/weighttp.c81#ifndef __attribute_pure__COMMENT
LOWsrc/samples/smolsite/main.c21#define _GNU_SOURCECOMMENT
LOWsrc/samples/smolsite/junzip.h1/**COMMENT
LOWsrc/samples/smolsite/junzip.h21#define Z_ERRNO -1COMMENT
LOWsrc/samples/smolsite/qrcodegen.c21 * Software.COMMENT
LOWsrc/samples/smolsite/qrcodegen.c41// - They only read input scalar/array arguments, write to output pointer/arrayCOMMENT
LOWsrc/samples/techempower/json.c1/*COMMENT
LOWsrc/samples/techempower/techempower.c21#include <errno.h>COMMENT
LOWsrc/samples/forthsalon/forth.c21/*COMMENT
LOWsrc/samples/forthsalon/gif.h1//COMMENT
LOWsrc/samples/forthsalon/gif.h21// unchanged.COMMENT
LOWsrc/samples/forthsalon/gif.h41// Define these macros to hook into a custom memory allocator.COMMENT
LOWsrc/samples/clock/numbers.c21#include "font/fiveE.xbm"COMMENT
LOWsrc/scripts/gentables.py1#!/usr/bin/pythonCOMMENT
LOWsrc/scripts/gentables.py21# - Some tables can be reduced and be converted to pure code. ForCOMMENT
LOWsrc/lib/lwan-readahead.c21#define _GNU_SOURCECOMMENT
LOWsrc/lib/lwan-straitjacket.c21#define _GNU_SOURCECOMMENT
LOWsrc/lib/lwan-coro.h21#pragma onceCOMMENT
LOWsrc/lib/missing.c21#include <errno.h>COMMENT
LOWsrc/lib/lwan-pubsub.c21#define _GNU_SOURCECOMMENT
LOWsrc/lib/lwan-request.c21#include <arpa/inet.h>COMMENT
LOWsrc/lib/lwan.c21#define _GNU_SOURCECOMMENT
LOWsrc/lib/lwan-strbuf.c21#define _GNU_SOURCECOMMENT
LOWsrc/lib/timeout.c81 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */COMMENT
LOWsrc/lib/lwan-mod-fastcgi.c21 * https://fastcgi-archives.github.io/FastCGI_Specification.htmlCOMMENT
LOWsrc/lib/lwan-mod-fastcgi.c41COMMENT
LOWsrc/lib/lwan-mod-rewrite.c21#define _GNU_SOURCECOMMENT
LOWsrc/lib/lwan-job.c21#include <assert.h>COMMENT
LOWsrc/lib/lwan-mod-lua.c21#define _GNU_SOURCECOMMENT
LOWsrc/lib/realpathat.c21COMMENT
LOWsrc/lib/lwan-arena.c21#include "lwan-private.h"COMMENT
LOWsrc/lib/hash.c21#include <assert.h>COMMENT
LOWsrc/lib/lwan-template.c21 * Ideas from Mustache logic-less templates: http://mustache.github.com/COMMENT
LOWsrc/lib/lwan-config.c21COMMENT
LOWsrc/lib/lwan-h2-huffman.c21 * You should have received a copy of the GNU General Public LicenseCOMMENT
LOWsrc/lib/lwan-coro.c21#define _GNU_SOURCECOMMENT
LOWsrc/lib/lwan-coro.c41#endifCOMMENT
LOWsrc/lib/lwan-coro.c101COMMENT
LOWsrc/lib/sd-daemon.c21***/COMMENT
LOWsrc/lib/lwan-socket.c21#define _GNU_SOURCECOMMENT
LOWsrc/lib/lwan.h21#pragma onceCOMMENT
LOWsrc/lib/lwan.h141COMMENT
LOWsrc/lib/lwan.h161#define LWAN_ARRAY_PARAM(length) [length]COMMENT
LOWsrc/lib/lwan-response.c21#define _GNU_SOURCECOMMENT
LOWsrc/lib/lwan-mod-serve-files.c21#define _GNU_SOURCECOMMENT
LOWsrc/lib/lwan-mod-serve-files.c41COMMENT
LOWsrc/lib/lwan-log.c21#include <errno.h>COMMENT
LOWsrc/lib/lwan-tables.c21#include <assert.h>COMMENT
LOWsrc/lib/lwan-websocket.c21#define _GNU_SOURCECOMMENT
LOWsrc/lib/lwan-thread.c21#define _GNU_SOURCECOMMENT
LOWsrc/lib/lwan-config.h21COMMENT
LOWsrc/lib/lwan-lua.c21#define _GNU_SOURCECOMMENT
LOWsrc/lib/missing-epoll.c21#include <errno.h>COMMENT
LOWsrc/lib/missing/time.h21#include_next <time.h>COMMENT
LOWsrc/lib/missing/time.h41#endifCOMMENT
80 more matches not shown…
Hyper-Verbose Identifiers23 hits · 24 pts
SeverityFileLineSnippetContext
LOWsrc/scripts/testsuite.py895 def test_cache_munmaps_conn_close(self):CODE
LOWsrc/scripts/testsuite.py903 def test_cache_munmaps_conn_keep_alive(self):CODE
LOWsrc/scripts/testsuite.py912 def test_cache_does_not_mmap_large_files(self):CODE
LOWsrc/scripts/testsuite.py917 def test_cache_mmaps_once_conn_keep_alive(self):CODE
LOWsrc/scripts/testsuite.py924 def test_cache_mmaps_once_conn_close(self):CODE
LOWsrc/scripts/testsuite.py930 def test_cache_mmaps_once_even_after_timeout(self):CODE
LOWsrc/scripts/testsuite.py233 def test_mime_type_is_correct(self):CODE
LOWsrc/scripts/testsuite.py327 def test_head_request_small_file(self):CODE
LOWsrc/scripts/testsuite.py339 def test_head_request_larger_file(self):CODE
LOWsrc/scripts/testsuite.py351 def test_uncompressed_small_file(self):CODE
LOWsrc/scripts/testsuite.py371 def test_compressed_small_file(self):CODE
LOWsrc/scripts/testsuite.py434 def test_has_lwan_server_header(self):CODE
LOWsrc/scripts/testsuite.py440 def test_directory_without_trailing_slash_redirects(self):CODE
LOWsrc/scripts/testsuite.py463 def test_conditional_rewrite_with_cookie(self):CODE
LOWsrc/scripts/testsuite.py475 def test_conditional_rewrite_without_cookie(self):CODE
LOWsrc/scripts/testsuite.py481 def test_conditional_rewrite_backref(self):CODE
LOWsrc/scripts/testsuite.py583 def test_cat_sleeping_on_keyboard(self):CODE
LOWsrc/scripts/testsuite.py590 def test_no_http_version_fails(self):CODE
LOWsrc/scripts/testsuite.py767 def test_global_headers_are_present(self):CODE
LOWsrc/scripts/testsuite.py826 def test_with_param_and_fragment(self):CODE
LOWsrc/scripts/testsuite.py1027 def test_custom_header_exists(self):CODE
LOWsrc/scripts/testsuite.py1033 def test_custom_header_does_not_exist(self):CODE
LOWsrc/scripts/testsuite.py1060def only_request_fuzzer_regression():CODE
Cross-Language Confusion3 hits · 22 pts
SeverityFileLineSnippetContext
HIGHsrc/scripts/gentables.py349 if (n_decoded == 0 && expected_size == 0)CODE
HIGHsrc/scripts/gentables.py351 if (n_decoded == 0 && expected_size != 0)CODE
HIGHsrc/scripts/gentables.py353 while (n_decoded && expected_size) {CODE
AI Slop Vocabulary1 hit · 2 pts
SeverityFileLineSnippetContext
MEDIUMsrc/samples/smolsite/junzip.c255 return Z_ERRNO; // TODO: more robust read loopCODE
Unused Imports1 hit · 0 pts
SeverityFileLineSnippetContext
LOWsrc/scripts/testsuite.py12CODE
Deep Nesting1 hit · 0 pts
SeverityFileLineSnippetContext
LOWsrc/scripts/testsuite.py61CODE