Repository Analysis

cesanta/mongoose

Embedded web server, with TCP/IP network stack, MQTT and Websocket

6.3 Low AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of cesanta/mongoose, a C project with 12,930 GitHub stars. SynthScan v2.0 examined 1,666,699 lines of code across 2475 source files, recording 16028 pattern matches distributed across 8 syntactic categories. The overall adjusted score of 6.3 places this repository in the Low AI signal 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).

6.3
Adjusted Score
6.3
Raw Score
100%
Time Factor
2026-07-14
Last Push
12.9K
Stars
C
Language
1.7M
Lines of Code
2.5K
Files
16.0K
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 6LOW 16022

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 16028 distinct pattern matches across 8 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 Block15938 hits · 10358 pts
SeverityFileLineSnippetContext
LOWmongoose.h1// Copyright (c) 2004-2013 Sergey LyubkaCOMMENT
LOWmongoose.h21#define MONGOOSE_HCOMMENT
LOWmongoose.h41#define MG_ARCH_CMSIS_RTOS1 9 // CMSIS-RTOS API v1 (Keil RTX)COMMENT
LOWmongoose.h61#include "mongoose_config.h" // keep this includeCOMMENT
LOWmongoose.h101#include <string.h>COMMENT
LOWmongoose.h121#include <stdlib.h>COMMENT
LOWmongoose.h141#include <stdarg.h>COMMENT
LOWmongoose.h161#define MG_ENABLE_DIRLIST 0COMMENT
LOWmongoose.h181#endifCOMMENT
LOWmongoose.h201// STM32H7 names the peripheral IWDG1; all others use IWDG.COMMENT
LOWmongoose.h221#endifCOMMENT
LOWmongoose.h241COMMENT
LOWmongoose.h261// use HAL-defined execute-in-ram sectionCOMMENT
LOWmongoose.h301#include <fcntl.h>COMMENT
LOWmongoose.h321#define MG_ENABLE_POSIX_FS 1COMMENT
LOWmongoose.h341#include <stddef.h>COMMENT
LOWmongoose.h361#include <stdarg.h>COMMENT
LOWmongoose.h381#if PICO_RP2040COMMENT
LOWmongoose.h421#include <rtthread.h>COMMENT
LOWmongoose.h441COMMENT
LOWmongoose.h461#elif MG_ARCH == MG_ARCH_CMSIS_RTOS2COMMENT
LOWmongoose.h481 (!defined(MG_ENABLE_TCPIP) || !MG_ENABLE_TCPIP)COMMENT
LOWmongoose.h501COMMENT
LOWmongoose.h521// 1. Add nxd_bsd.h and nxd_bsd.c to the repo:COMMENT
LOWmongoose.h541#include <stdio.h>COMMENT
LOWmongoose.h561#if !defined(MG_ENABLE_EPOLL) && defined(__linux__)COMMENT
LOWmongoose.h581#include <stdbool.h>COMMENT
LOWmongoose.h601#include <unistd.h>COMMENT
LOWmongoose.h621COMMENT
LOWmongoose.h641#if defined(_MSC_VER) && _MSC_VER < 1700COMMENT
LOWmongoose.h661#endifCOMMENT
LOWmongoose.h701COMMENT
LOWmongoose.h721 #define IP_ADD_MEMBERSHIP 12COMMENT
LOWmongoose.h741#pragma comment(lib, "ws2_32.lib")COMMENT
LOWmongoose.h781#define rmdir(a) _rmdir(a)COMMENT
LOWmongoose.h801#define MG_IO_SIZE 16384COMMENT
LOWmongoose.h821#include <stdint.h>COMMENT
LOWmongoose.h881COMMENT
LOWmongoose.h901COMMENT
LOWmongoose.h961#if LWIP_SOCKET != 1COMMENT
LOWmongoose.h981#define MG_SOCK_RESET(errcode) \COMMENT
LOWmongoose.h1001#ifndef MG_ENABLE_CUSTOM_LOGCOMMENT
LOWmongoose.h1021#ifndef MG_ENABLE_LWIPCOMMENT
LOWmongoose.h1041#ifndef MG_ENABLE_EPOLLCOMMENT
LOWmongoose.h1061#ifndef MG_IPV6_V6ONLYCOMMENT
LOWmongoose.h1081#endifCOMMENT
LOWmongoose.h1101#endifCOMMENT
LOWmongoose.h1121#endifCOMMENT
LOWmongoose.h1161#define MG_ENABLE_PROFILE 0COMMENT
LOWmongoose.h1181COMMENT
LOWmongoose.h1201#define MG_SET_MAC_ADDRESS(mac)COMMENT
LOWmongoose.h1221COMMENT
LOWmongoose.h1321// -1 if str1 < str2, 1 if str1 > str2. Length is used as a tiebreakerCOMMENT
LOWmongoose.h1341// tutorials/websocket/websocket-serverCOMMENT
LOWmongoose.h1361// struct mg_str entry, key, val;COMMENT
LOWmongoose.h1381// Lock-free, single-producer / single-consumer (SPSC) message queue.COMMENT
LOWmongoose.h1441// Returns the total number of characters printed. Supported specifiers:COMMENT
LOWmongoose.h1461// - mg_print_base64 - prints a buffer as a base64-encoded stringCOMMENT
LOWmongoose.h1481// char buf[100];COMMENT
LOWmongoose.h1501// mg_snprintf(buf, sizeof(buf), "{%m:%d}", MG_ESC("status"), 1);COMMENT
15878 more matches not shown…
Example Usage Blocks76 hits · 114 pts
SeverityFileLineSnippetContext
LOWmongoose.h1470// Usage example:COMMENT
LOWtest/mongoose.h1470// Usage example:COMMENT
LOWtutorials/websocket/websocket-server/mongoose.h1470// Usage example:COMMENT
LOWtutorials/websocket/json-rpc-over-websocket/mongoose.h1470// Usage example:COMMENT
LOWtutorials/websocket/websocket-client/mongoose.h1470// Usage example:COMMENT
LOW…rt1060-evk-xpresso-baremetal-builtin/source/mongoose.h1470// Usage example:COMMENT
LOW…rdm-rw612-xpresso-freertos-lwip-wifi/source/mongoose.h1470// Usage example:COMMENT
LOW…nxp/frdm-rw612-xpresso-freertos-lwip/source/mongoose.h1470// Usage example:COMMENT
LOW…-rw612-xpresso-freertos-builtin-wifi/source/mongoose.h1470// Usage example:COMMENT
LOWtutorials/core/memory/o1heap/mongoose.h1470// Usage example:COMMENT
LOWtutorials/core/timers/mongoose.h1470// Usage example:COMMENT
LOWtutorials/core/multi-threaded-12m/mongoose.h1470// Usage example:COMMENT
LOWtutorials/core/embedded-filesystem/mongoose.h1470// Usage example:COMMENT
LOWtutorials/core/multi-threaded/mongoose.h1470// Usage example:COMMENT
LOWtutorials/udp/mdns-server/mongoose.h1470// Usage example:COMMENT
LOWtutorials/udp/captive-dns-server/mongoose.h1470// Usage example:COMMENT
LOWtutorials/udp/sntp-time-sync/mongoose.h1470// Usage example:COMMENT
LOWtutorials/udp/ssdp-search/mongoose.h1470// Usage example:COMMENT
LOWtutorials/udp/mdns-client/mongoose.h1470// Usage example:COMMENT
LOWtutorials/udp/mdns-sd-server/mongoose.h1470// Usage example:COMMENT
LOW…torials/wch/ch32v307-make-baremetal-builtin/mongoose.h1470// Usage example:COMMENT
LOWtutorials/micropython/mongoose/mongoose.h1470// Usage example:COMMENT
LOWtutorials/micropython/esp32/mongoose/mongoose.h1470// Usage example:COMMENT
LOWtutorials/tcp/rtsp-video-stream/mongoose.h1470// Usage example:COMMENT
LOWtutorials/tcp/socks5-server/mongoose.h1470// Usage example:COMMENT
LOWtutorials/tcp/tcp/mongoose.h1470// Usage example:COMMENT
LOWtutorials/tcp/modbus-dashboard/mongoose.h1470// Usage example:COMMENT
LOWtutorials/http/redirect-to-https/mongoose.h1470// Usage example:COMMENT
LOWtutorials/http/file-upload-multiple-posts/mongoose.h1470// Usage example:COMMENT
LOWtutorials/http/huge-response/mongoose.h1470// Usage example:COMMENT
LOWtutorials/http/singleton-client/mongoose.h1470// Usage example:COMMENT
LOWtutorials/http/http-streaming-client/mongoose.h1470// Usage example:COMMENT
LOWtutorials/http/uart-bridge/mongoose.h1470// Usage example:COMMENT
LOWtutorials/http/uart-bridge/esp32/main/mongoose.h1470// Usage example:COMMENT
LOWtutorials/http/http-server/mongoose.h1470// Usage example:COMMENT
LOW…ials/http/http-server/arduino/teensy41-http/mongoose.h1470// Usage example:COMMENT
LOW…torials/http/http-server/arduino/w5500-http/mongoose.h1470// Usage example:COMMENT
LOW…torials/http/http-server/arduino/esp32-http/mongoose.h1470// Usage example:COMMENT
LOWtutorials/http/video-stream/mongoose.h1470// Usage example:COMMENT
LOWtutorials/http/http-reverse-proxy/mongoose.h1470// Usage example:COMMENT
LOWtutorials/http/link-checker/mongoose.h1470// Usage example:COMMENT
LOWtutorials/http/http-client/mongoose.h1470// Usage example:COMMENT
LOW…-client/esp8266/http-client-server/src/main/mongoose.h1470// Usage example:COMMENT
LOWtutorials/http/http-proxy-client/mongoose.h1470// Usage example:COMMENT
LOWtutorials/http/http-restful-server/mongoose.h1470// Usage example:COMMENT
LOWtutorials/http/file-upload-single-post/mongoose.h1470// Usage example:COMMENT
LOWtutorials/http/wifi-router-dashboard/mongoose.h1470// Usage example:COMMENT
LOWtutorials/http/file-transfer/mongoose.h1470// Usage example:COMMENT
LOWtutorials/http/device-dashboard/mongoose.h1470// Usage example:COMMENT
LOWtutorials/http/device-dashboard/esp32/main/mongoose.h1470// Usage example:COMMENT
LOW…http/device-dashboard/microchip/same54-xpro/mongoose.h1470// Usage example:COMMENT
LOWtutorials/http/file-upload-html-form/mongoose.h1470// Usage example:COMMENT
LOWtutorials/smtp/smtp-client/mongoose.h1470// Usage example:COMMENT
LOWtutorials/webui/webui-plain/mongoose.h1470// Usage example:COMMENT
LOWtutorials/webui/webui-push-ws/mongoose.h1470// Usage example:COMMENT
LOWtutorials/webui/webui-push-rest/mongoose.h1470// Usage example:COMMENT
LOWtutorials/webui/webui-rest/mongoose.h1470// Usage example:COMMENT
LOWtutorials/webui/webui-preact/mongoose.h1470// Usage example:COMMENT
LOWtutorials/webui/webui-login/mongoose.h1470// Usage example:COMMENT
LOWtutorials/webui/live-log/mongoose.h1470// Usage example:COMMENT
16 more matches not shown…
Self-Referential Comments5 hits · 15 pts
SeverityFileLineSnippetContext
MEDIUM…12-xpresso-freertos-lwip-wifi/wifi/incl/port/osa/osa.h157 * -# Create a reader writer lockCOMMENT
MEDIUM…m-rw612-xpresso-freertos-lwip/wifi/incl/port/osa/osa.h157 * -# Create a reader writer lockCOMMENT
MEDIUM…-xpresso-freertos-lwip/lwip/codespell_changed_files.sh6# This file is subject to the terms and conditions of the GNU LesserCOMMENT
MEDIUM…dm-rw612-xpresso-freertos-lwip/lwip/codespell_check.sh5# This file is subject to the terms and conditions of the GNU LesserCOMMENT
MEDIUM…xpresso-freertos-builtin-wifi/wifi/incl/port/osa/osa.h157 * -# Create a reader writer lockCOMMENT
Modern AI Meta-Vocabulary1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUMresources/I-CUBE-Mongoose/README.md172## AI agentic developmentCOMMENT
Slop Phrases2 hits · 3 pts
SeverityFileLineSnippetContext
LOW…rw612-xpresso-freertos-lwip-wifi/lwip/src/core/netif.c281 * IPv6: Don't forget to call netif_create_ip6_linklocal_address() afterCOMMENT
LOW…frdm-rw612-xpresso-freertos-lwip/lwip/src/core/netif.c281 * IPv6: Don't forget to call netif_create_ip6_linklocal_address() afterCOMMENT
AI Slop Vocabulary2 hits · 3 pts
SeverityFileLineSnippetContext
LOW…sso-freertos-lwip-wifi/lwip/src/include/lwip/sockets.h215#define SO_DONTROUTE 0x0010 /* Unimplemented: just use interface addresses */COMMENT
LOW…-xpresso-freertos-lwip/lwip/src/include/lwip/sockets.h215#define SO_DONTROUTE 0x0010 /* Unimplemented: just use interface addresses */COMMENT
Hyper-Verbose Identifiers3 hits · 3 pts
SeverityFileLineSnippetContext
LOW…rtos-lwip-wifi/component/imu_adapter/fsl_adapter_imu.h89typedef hal_imumc_return_status_t (*imumc_rx_callback_t)(void *param, uint8_t *data, uint32_t len);CODE
LOW…-freertos-lwip/component/imu_adapter/fsl_adapter_imu.h88typedef hal_imumc_return_status_t (*imumc_rx_callback_t)(void *param, uint8_t *data, uint32_t len);CODE
LOW…s-builtin-wifi/component/imu_adapter/fsl_adapter_imu.h89typedef hal_imumc_return_status_t (*imumc_rx_callback_t)(void *param, uint8_t *data, uint32_t len);CODE
Verbosity Indicators1 hit · 2 pts
SeverityFileLineSnippetContext
LOW…-rw612-xpresso-freertos-lwip/lwip/src/apps/mdns/mdns.c614 * comparison. So if we get passed the class and type comparison we need to check if theCOMMENT