An efficient, small mobile key-value storage framework developed by WeChat. Works on Android, iOS, macOS, Windows, POSIX, and OHOS.
This report presents the forensic synthetic code analysis of Tencent/MMKV, a C++ project with 18,665 GitHub stars. SynthScan v2.0 examined 55,393 lines of code across 368 source files, recording 139 pattern matches distributed across 5 syntactic categories. The overall adjusted score of 2.8 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 139 distinct pattern matches across 5 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 | POSIX/CMakeLists.txt | 1 | # | COMMENT |
| LOW | POSIX/demo/CMakeLists.txt | 1 | # | COMMENT |
| LOW | POSIX/demo/TestInterProcessLock.cpp | 21 | #include <MMKV/MMKV.h> | COMMENT |
| LOW | POSIX/demo/demo.cpp | 21 | #include <MMKV/MMKV.h> | COMMENT |
| LOW | POSIX/demo/demo.cpp | 1121 | // string key = "keyyy"; | COMMENT |
| LOW | POSIX/golang/CMakeLists.txt | 1 | # | COMMENT |
| LOW | POSIX/src/CMakeLists.txt | 1 | # | COMMENT |
| LOW | Core/MMKVLog.h | 21 | #ifndef MMKV_MMKVLOG_H | COMMENT |
| LOW | Core/MMKVLog.h | 41 | COMMENT | |
| LOW | Core/MMKVLog.h | 61 | # endif | COMMENT |
| LOW | Core/MMBuffer.cpp | 21 | #define NOMINMAX // undefine max/min | COMMENT |
| LOW | Core/MMKV.h | 21 | #ifndef MMKV_MMKV_H | COMMENT |
| LOW | Core/MMKV.h | 601 | // MMKV's size won't reduce after deleting key-values | COMMENT |
| LOW | Core/MMKV_Android.cpp | 21 | #include "MMKV.h" | COMMENT |
| LOW | Core/CMakeLists.txt | 1 | # | COMMENT |
| LOW | Core/MMKV.cpp | 21 | #include "CodedInputData.h" | COMMENT |
| LOW | Core/MMKV.cpp | 41 | #include <cstring> | COMMENT |
| LOW | Core/MMKVMetaInfo.hpp | 101 | #endif | COMMENT |
| LOW | Core/PBEncodeItem.hpp | 101 | #endif | COMMENT |
| LOW | Core/ThreadLock.h | 21 | #ifndef MMKV_THREADLOCK_H | COMMENT |
| LOW | Core/MiniPBCoder.cpp | 21 | #include "MiniPBCoder.h" | COMMENT |
| LOW | Core/MiniPBCoder_OSX.cpp | 21 | #include "MiniPBCoder.h" | COMMENT |
| LOW | Core/MMKVPredef.h | 21 | #ifndef MMKV_SRC_MMKVPREDEF_H | COMMENT |
| LOW | Core/MMKVPredef.h | 41 | #endif | COMMENT |
| LOW | Core/MMKVPredef.h | 61 | # define MMKV_ANDROID | COMMENT |
| LOW | Core/MMKVPredef.h | 81 | # endif | COMMENT |
| LOW | Core/MMKVPredef.h | 121 | #endif // MMKV_WIN32 | COMMENT |
| LOW | Core/MMKVPredef.h | 261 | constexpr size_t AES_IV_LEN = 16; | COMMENT |
| LOW | Core/MMKVPredef.h | 281 | #else | COMMENT |
| LOW | Core/CodedInputDataCrypt.cpp | 21 | #include "CodedInputDataCrypt.h" | COMMENT |
| LOW | Core/KeyValueHolder.h | 121 | #endif | COMMENT |
| LOW | Core/MMKV_OSX.cpp | 21 | #include "MMKVPredef.h" | COMMENT |
| LOW | Core/MemoryFile_Linux.cpp | 21 | #include "MemoryFile.h" | COMMENT |
| LOW | Core/ScopedLock.hpp | 61 | #include <type_traits> | COMMENT |
| LOW | Core/MMKV_IO.cpp | 21 | #include "MMKV_IO.h" | COMMENT |
| LOW | Core/MMKV_IO.cpp | 41 | #include <filesystem> | COMMENT |
| LOW | Core/MiniPBCoder.h | 21 | #ifndef MMKV_MINIPBCODER_H | COMMENT |
| LOW | Core/MemoryFile.cpp | 21 | #include "MemoryFile.h" | COMMENT |
| LOW | Core/fakeinclude/MMKVCore/ThreadLock.h | 21 | #include "../../ThreadLock.h" | COMMENT |
| LOW | Core/fakeinclude/MMKVCore/ScopedLock.hpp | 21 | #include "../../ScopedLock.hpp" | COMMENT |
| LOW | Core/crc32/CMakeLists.txt | 1 | # | COMMENT |
| LOW | Core/crc32/crc32_armv8.cpp | 41 | COMMENT | |
| LOW | Core/crc32/Checksum.h | 61 | // getauxval(AT_HWCAP) in OHOS returns wrong value, we just assume all OHOS device have crc32 instr | COMMENT |
| LOW | Core/crc32/zlib/zconf.h | 1 | /* zconf.h -- configuration of the zlib compression library | COMMENT |
| LOW | Core/crc32/zlib/zconf.h | 21 | #define WINDOWS | COMMENT |
| LOW | Core/crc32/zlib/zconf.h | 41 | #define MAXSEG_64K | COMMENT |
| LOW | Core/crc32/zlib/zconf.h | 61 | #define STDC | COMMENT |
| LOW | Core/crc32/zlib/zconf.h | 81 | #define z_const const | COMMENT |
| LOW | Core/crc32/zlib/zconf.h | 141 | COMMENT | |
| LOW | Core/crc32/zlib/zconf.h | 161 | #define FAR _far | COMMENT |
| LOW | Core/crc32/zlib/zconf.h | 181 | #ifdef ZLIB_DLL | COMMENT |
| LOW | Core/crc32/zlib/zconf.h | 201 | #define ZEXPORT WINAPI | COMMENT |
| LOW | Core/crc32/zlib/zconf.h | 221 | COMMENT | |
| LOW | Core/crc32/zlib/zconf.h | 261 | #endif | COMMENT |
| LOW | Core/crc32/zlib/zconf.h | 281 | #define Z_HAVE_UNISTD_H | COMMENT |
| LOW | Core/crc32/zlib/zconf.h | 301 | #ifndef Z_SOLO | COMMENT |
| LOW | Core/crc32/zlib/zconf.h | 321 | #include <unistd.h> /* for SEEK_*, off_t, and _LFS64_LARGEFILE */ | COMMENT |
| LOW | Core/crc32/zlib/zconf.h | 341 | #endif | COMMENT |
| LOW | Core/crc32/zlib/zconf.h | 361 | #endif | COMMENT |
| LOW | Core/aes/openssl/openssl_md5_locl.h | 21 | #define HASH_LONG MD5_LONG | COMMENT |
| 68 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | flutter/mmkv_ios/pubspec.yaml | 28 | # The following section is specific to Flutter. | COMMENT |
| MEDIUM | flutter/mmkv_android/pubspec.yaml | 28 | # The following section is specific to Flutter. | COMMENT |
| MEDIUM | flutter/mmkv/pubspec.yaml | 43 | # The following section is specific to Flutter. | COMMENT |
| MEDIUM | flutter/mmkv/example/pubspec.yaml | 38 | # The following section is specific to Flutter. | COMMENT |
| MEDIUM | flutter/mmkv_ohos/pubspec.yaml | 32 | # The following section is specific to Flutter packages. | COMMENT |
| MEDIUM | flutter/mmkv_win32/pubspec.yaml | 27 | # The following section is specific to Flutter packages. | COMMENT |
| MEDIUM | flutter/mmkv_linux/pubspec.yaml | 27 | # The following section is specific to Flutter packages. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | Script/dumpJavaSignature.py | 129 | except Exception as e: | CODE |
| MEDIUM | Script/dumpJavaSignature.py | 144 | print(f"Error: {e}") | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | flutter/mmkv/example/pubspec.yaml | 42 | # included with your application, so that you can use the icons in | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | …y/src/ohosTest/ets/testrunner/OpenHarmonyTestRunner.ts | 27 | async function addAbilityMonitorCallback(err: any) { | CODE |