x86 PC emulator and x86-to-wasm JIT, running in the browser
This report presents the forensic synthetic code analysis of copy/v86, a JavaScript project with 23,237 GitHub stars. SynthScan v2.0 examined 139,548 lines of code across 341 source files, recording 229 pattern matches distributed across 9 syntactic categories. The overall adjusted score of 2.4 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 229 distinct pattern matches across 9 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 | tests/qemu/compiler.h | 21 | #else | COMMENT |
| LOW | tests/qemu/compiler.h | 41 | #endif | COMMENT |
| LOW | tests/qemu/compiler.h | 61 | #ifndef container_of | COMMENT |
| LOW | tests/qemu/compiler.h | 81 | struct { \ | COMMENT |
| LOW | tests/qemu/compiler.h | 101 | # else | COMMENT |
| LOW | tests/qemu/config-host.h | 1 | /* Automatically generated by create_config - do not modify */ | COMMENT |
| LOW | tests/qemu/config-host.h | 21 | NULL | COMMENT |
| LOW | tests/qemu/config-host.h | 41 | #define CONFIG_EPOLL_CREATE1 1 | COMMENT |
| LOW | tests/qemu/config-host.h | 61 | #define CONFIG_LINUX_MAGIC_H 1 | COMMENT |
| LOW | tests/qemu/test-i386.c | 21 | #include <assert.h> | COMMENT |
| LOW | tests/qemu/test-i386.c | 41 | //#ifdef __SSE__ | COMMENT |
| LOW | tests/qemu/test-i386.c | 61 | COMMENT | |
| LOW | tests/qemu/test-i386.c | 101 | #define OP xor | COMMENT |
| LOW | tests/qemu/test-i386.c | 121 | #define OP inc | COMMENT |
| LOW | tests/qemu/test-i386.c | 141 | #undef CC_MASK | COMMENT |
| LOW | tests/qemu/test-i386.c | 161 | #include "test-i386-shift.h" | COMMENT |
| LOW | tests/qemu/test-i386.c | 181 | #define OP bt | COMMENT |
| LOW | tests/qemu/test-i386.c | 1901 | printf("VM86 end\n"); | COMMENT |
| LOW | tests/kvm-unit-tests/x86/hyperv_connections.c | 1 | #include "libcflat.h" | COMMENT |
| LOW | tests/kvm-unit-tests/x86/hyperv_synic.c | 1 | #include "libcflat.h" | COMMENT |
| LOW | tests/kvm-unit-tests/x86/pmu.c | 1 | COMMENT | |
| LOW | tests/kvm-unit-tests/x86/pmu.c | 21 | #define EVNTSEL_PC_SHIFT 19 | COMMENT |
| LOW | tests/kvm-unit-tests/x86/types.h | 1 | #ifndef __TYPES_H | COMMENT |
| LOW | tests/kvm-unit-tests/x86/access.c | 21 | COMMENT | |
| LOW | tests/kvm-unit-tests/x86/access.c | 81 | #define AC_PTE_ACCESSED_MASK (1 << AC_PTE_ACCESSED_BIT) | COMMENT |
| LOW | tests/kvm-unit-tests/x86/ioram.h | 1 | #ifndef __IO_RAM_H | COMMENT |
| LOW | tests/kvm-unit-tests/x86/svm.h | 101 | #define V_INTR_PRIO_MASK (0x0f << V_INTR_PRIO_SHIFT) | COMMENT |
| LOW | tests/kvm-unit-tests/x86/svm.h | 181 | }; | COMMENT |
| LOW | tests/kvm-unit-tests/x86/svm.h | 201 | #define SVM_SELECTOR_L_MASK (1 << SVM_SELECTOR_L_SHIFT) | COMMENT |
| LOW | tests/kvm-unit-tests/x86/svm.h | 221 | #define INTERCEPT_DR7_MASK (1 << 7) | COMMENT |
| LOW | tests/kvm-unit-tests/x86/svm.h | 241 | #define SVM_EXITINTINFO_TYPE_EXEPT SVM_EVTINJ_TYPE_EXEPT | COMMENT |
| LOW | tests/kvm-unit-tests/x86/svm.h | 261 | #define SVM_EXIT_READ_DR2 0x022 | COMMENT |
| LOW | tests/kvm-unit-tests/x86/svm.h | 281 | #define SVM_EXIT_CR0_SEL_WRITE 0x065 | COMMENT |
| LOW | tests/kvm-unit-tests/x86/svm.h | 301 | #define SVM_EXIT_INVLPG 0x079 | COMMENT |
| LOW | tests/kvm-unit-tests/x86/vmexit.c | 1 | #include "libcflat.h" | COMMENT |
| LOW | tests/kvm-unit-tests/x86/hyperv.h | 1 | #ifndef __HYPERV_H | COMMENT |
| LOW | tests/kvm-unit-tests/x86/hyperv.h | 21 | #define HV_X64_MSR_SVERSION 0x40000081 | COMMENT |
| LOW | tests/kvm-unit-tests/x86/hyperv.h | 41 | COMMENT | |
| LOW | tests/kvm-unit-tests/x86/hyperv_stimer.c | 1 | #include "libcflat.h" | COMMENT |
| LOW | tests/kvm-unit-tests/x86/vmx.h | 481 | "xchg %%r11, regs+0x58\n\t" \ | COMMENT |
| LOW | tests/kvm-unit-tests/x86/vmx.h | 501 | COMMENT | |
| LOW | tests/kvm-unit-tests/x86/vmx.h | 521 | #define EPT_MEM_TYPE_WP 5ul | COMMENT |
| LOW | tests/kvm-unit-tests/x86/vmx.h | 541 | #define EPT_CAP_INVEPT (1ull << 20) | COMMENT |
| LOW | tests/kvm-unit-tests/x86/vmx.h | 561 | #define EPT_VLT_RD 1 | COMMENT |
| LOW | tests/kvm-unit-tests/x86/vmx_tests.c | 1 | /* | COMMENT |
| LOW | tests/kvm-unit-tests/x86/eventinj.c | 1 | #include "libcflat.h" | COMMENT |
| LOW | tests/kvm-unit-tests/lib/libcflat.h | 21 | #define __LIBCFLAT_H | COMMENT |
| LOW | tests/kvm-unit-tests/lib/libcflat.h | 61 | # define __PRI32_PREFIX | COMMENT |
| LOW | tests/kvm-unit-tests/lib/pci-edu.h | 21 | #define PCI_VENDOR_ID_QEMU 0x1234 | COMMENT |
| LOW | tests/kvm-unit-tests/lib/virtio-mmio.h | 1 | #ifndef _VIRTIO_MMIO_H_ | COMMENT |
| LOW | tests/kvm-unit-tests/lib/virtio-mmio.h | 21 | #define VIRTIO_MMIO_GUEST_FEATURES_SEL 0x024 | COMMENT |
| LOW | tests/kvm-unit-tests/lib/kbuild.h | 1 | #ifndef _KBUILD_H_ | COMMENT |
| LOW | tests/kvm-unit-tests/lib/asm-generic/page.h | 21 | COMMENT | |
| LOW | tests/kvm-unit-tests/lib/asm-generic/barrier.h | 1 | #ifndef _ASM_BARRIER_H_ | COMMENT |
| LOW | tests/kvm-unit-tests/lib/asm-generic/barrier.h | 21 | #ifndef smp_mb | COMMENT |
| LOW | tests/kvm-unit-tests/lib/asm-generic/io.h | 101 | #endif | COMMENT |
| LOW | tests/kvm-unit-tests/lib/asm-generic/pci.h | 1 | #ifndef _ASM_GENERIC_PCI_H_ | COMMENT |
| LOW | tests/kvm-unit-tests/lib/asm-generic/atomic.h | 1 | #ifndef __ASM_GENERIC_ATOMIC_H__ | COMMENT |
| LOW | tests/kvm-unit-tests/lib/libfdt/fdt.h | 101 | size, content */ | COMMENT |
| LOW | tests/kvm-unit-tests/lib/libfdt/libfdt.h | 161 | /**********************************************************************/ | COMMENT |
| 146 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| CRITICAL | tests/devices/virtio_balloon.js | 57 | emulator.v86.cpu.devices.virtio_balloon.GetStats(s => { console.log(s); }); | CODE |
| CRITICAL | tests/devices/virtio_balloon.js | 58 | emulator.v86.cpu.devices.virtio_balloon.Cleanup(async (zeroed) => { | CODE |
| CRITICAL | tests/devices/virtio_balloon.js | 99 | emulator.v86.cpu.devices.virtio_balloon.Inflate(30000); | CODE |
| CRITICAL | src/browser/main.js | 3059 | if(emulator.v86.cpu.devices.cdrom.has_disk()) | CODE |
| CRITICAL | src/browser/main.js | 3067 | if(emulator.v86.cpu.devices.cdrom.has_disk()) | CODE |
| CRITICAL | src/browser/starter.js | 307 | this.screen_adapter = new ScreenAdapter(screen_options, () => this.v86.cpu.devices.vga && this.v86.cpu.devices.v | CODE |
| CRITICAL | src/browser/starter.js | 1031 | this.v86.cpu.devices.cdrom.set_cdrom(new SyncBuffer(result)); | CODE |
| CRITICAL | src/browser/starter.js | 1040 | this.v86.cpu.devices.cdrom.set_cdrom(image); | CODE |
| CRITICAL | src/browser/starter.js | 1051 | this.v86.cpu.devices.cdrom.eject(); | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | tests/benchmark/arch-python.js | 38 | print("fib(", n, ")= ", fib(n)) | CODE |
| HIGH⚡ | tests/api/2g-mem.js | 38 | print(m, " ", collectgarbage("count")) | CODE |
| HIGH⚡ | tests/api/2g-mem.js | 41 | print("memory usage (kB) ", collectgarbage("count")) | CODE |
| HIGH⚡ | tests/api/2g-mem.js | 42 | print("page count ", m) | CODE |
| HIGH⚡ | tests/api/2g-mem.js | 47 | print("ok") | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | src/buffer.js | 704 | // - loads slices of the file asynchronously as requested | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tools/fs2json.py | 108 | CODE | |
| LOW | tools/fs2json.py | 217 | CODE | |
| LOW | tools/copy-to-sha256.py | 83 | CODE | |
| LOW | tools/copy-to-sha256.py | 115 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | tools/copy-to-sha256.py | 39 | print("Error: zstandard module required when using --zstd flag") | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tools/copy-to-sha256.py | 11 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tools/docker/alpine/build-state.js | 9 | console.log("Don't forget to run `make all` before running this script"); | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | src/browser/serial.js | 331 | export function VirtioConsoleAdapterXtermJS(element, bus, xterm_lib) | CODE |