High-level tracing language for Linux
This report presents the forensic synthetic code analysis of bpftrace/bpftrace, a C++ project with 10,210 GitHub stars. SynthScan v2.0 examined 140,232 lines of code across 639 source files, recording 384 pattern matches distributed across 9 syntactic categories. The overall adjusted score of 2.9 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).
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.
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 384 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/async_action.cpp | 1 | #include <regex> | COMMENT |
| LOW | tests/utils.cpp | 1 | #include <climits> | COMMENT |
| LOW | tests/type_resolver.cpp | 1 | #include <gmock/gmock-matchers.h> | COMMENT |
| LOW | tests/child.cpp | 1 | #include <csignal> | COMMENT |
| LOW | tests/portability_analyser.cpp | 1 | #include "ast/passes/portability_analyser.h" | COMMENT |
| LOW | tests/field_analyser.cpp | 1 | #include "ast/passes/field_analyser.h" | COMMENT |
| LOW | tests/probe.cpp | 1 | #include "ast/passes/ap_probe_expansion.h" | COMMENT |
| LOW | tests/bpftrace.cpp | 1 | #include <chrono> | COMMENT |
| LOW | tests/required_resources.cpp | 1 | #include <iostream> | COMMENT |
| LOW | tests/type_checker.cpp | 1 | #include <gmock/gmock-matchers.h> | COMMENT |
| LOW | tests/clang_parser.cpp | 1 | #include <llvm/Config/llvm-config.h> | COMMENT |
| LOW | tests/mocks.h | 1 | #pragma once | COMMENT |
| LOW | tests/pre_type_check.cpp | 1 | #include <gmock/gmock-matchers.h> | COMMENT |
| LOW | tests/parser.cpp | 1 | #include <climits> | COMMENT |
| LOW | tests/include/libbpf-usdt/usdt.h | 301 | COMMENT | |
| LOW | tests/include/libbpf-usdt/usdt.h | 321 | #define USDT_NOP nop | COMMENT |
| LOW | tests/include/libbpf-usdt/usdt.h | 341 | #ifdef __usdt_va_opt | COMMENT |
| LOW | tests/include/libbpf-usdt/usdt.h | 361 | #define __usdt_asm5(x, ...) __usdt_str(x) "," __usdt_asm4(__VA_ARGS__) | COMMENT |
| LOW | tests/include/libbpf-usdt/usdt.h | 461 | #define __usdt_argref(id) %I[id]%[id] | COMMENT |
| LOW | tests/include/libbpf-usdt/usdt.h | 521 | __usdt_maybe_signed(wchar_t); | COMMENT |
| LOW | tests/include/libbpf-usdt/usdt.h | 541 | #define __usdt_asm_ops6(a,b,c,d,e,x) __usdt_asm_ops5(a,b,c,d,e), __usdt_asm_op(6, x) | COMMENT |
| LOW | tests/testlibs/usdt_tp.h | 1 | #ifndef _USDTLIBX_H_ | COMMENT |
| LOW | tests/testprogs/mountns_pivot_wrapper.c | 1 | #ifndef _GNU_SOURCE | COMMENT |
| LOW | tests/testprogs/syscall.c | 1 | #include <ctype.h> | COMMENT |
| LOW | tests/testprogs/mountns_wrapper.c | 1 | #ifndef _GNU_SOURCE | COMMENT |
| LOW | scripts/clang_tidy.sh | 61 | # to keep it simple. | COMMENT |
| LOW | scripts/create-assets.sh | 1 | #!/bin/bash | COMMENT |
| LOW | scripts/sync_headers.sh | 1 | #!/usr/bin/env bash | COMMENT |
| LOW | src/async_action.cpp | 1 | #include <fstream> | COMMENT |
| LOW | src/struct.cpp | 1 | #include <algorithm> | COMMENT |
| LOW | src/bpfbytecode.h | 1 | #pragma once | COMMENT |
| LOW | src/bfd-disasm.cpp | 1 | #include <fcntl.h> | COMMENT |
| LOW | src/btf.cpp | 1 | #include "scopeguard.h" | COMMENT |
| LOW | src/btf.cpp | 21 | #pragma GCC diagnostic pop | COMMENT |
| LOW | src/btf.cpp | 541 | // string.GetSize() will return len + 1, which is a mismatch with the actual | COMMENT |
| LOW | src/dwarf_parser.cpp | 321 | ssize_t bitfield_width = get_bitfield_size(field_die); | COMMENT |
| LOW | src/types.h | 1 | #pragma once | COMMENT |
| LOW | src/run_bpftrace.cpp | 1 | #include <csignal> | COMMENT |
| LOW | src/globalvars.cpp | 1 | #include <bpf/bpf.h> | COMMENT |
| LOW | src/btf.h | 1 | #pragma once | COMMENT |
| LOW | src/bpftrace.cpp | 1 | #include "bpfbytecode.h" | COMMENT |
| LOW | src/bpftrace.cpp | 21 | #include <glob.h> | COMMENT |
| LOW | src/bpftrace.cpp | 41 | #include "attached_probe.h" | COMMENT |
| LOW | src/bpffeature.cpp | 1 | #include "bpffeature.h" | COMMENT |
| LOW | src/usyms.cpp | 1 | #include "types.h" | COMMENT |
| LOW | src/required_resources.h | 1 | #pragma once | COMMENT |
| LOW | src/required_resources.h | 141 | std::ostream &operator<<(std::ostream &os, const RuntimeErrorInfo &info); | COMMENT |
| LOW | src/attached_probe.cpp | 1 | #ifndef _GNU_SOURCE | COMMENT |
| LOW | src/attached_probe.cpp | 21 | #include <bpf/libbpf.h> | COMMENT |
| LOW | src/probe_matcher.cpp | 1 | #include <algorithm> | COMMENT |
| LOW | src/bpftrace.h | 1 | #pragma once | COMMENT |
| LOW | src/bpftrace.h | 21 | #include "bpfbytecode.h" | COMMENT |
| LOW | src/bpfbytecode.cpp | 1 | #include "bpfbytecode.h" | COMMENT |
| LOW | src/bpfbytecode.cpp | 141 | COMMENT | |
| LOW | src/log.h | 121 | : LogStream(file, line, LogType::BUG, out) {}; | COMMENT |
| LOW | src/log.h | 141 | #define LOGSTREAM_ERROR(...) LOGSTREAM_COMMON(__VA_ARGS__) | COMMENT |
| LOW | src/parser.cpp | 1 | #include "parser.h" | COMMENT |
| LOW | src/types_format.cpp | 341 | } | COMMENT |
| LOW | src/types_format.cpp | 401 | if (min_index != 0) { | COMMENT |
| LOW | src/main.cpp | 1 | #include <bpf/libbpf.h> | COMMENT |
| 296 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/runtime/engine/runner.py | 299 | except Exception as err: | CODE |
| MEDIUM | tests/runtime/engine/runner.py | 257 | def check_expect(expect, output): | CODE |
| MEDIUM | scripts/generate_stdlib_docs.py | 66 | print(f"Error: File '{file_path}' not found.") | CODE |
| MEDIUM⚡ | scripts/generate_stdlib_docs.py | 116 | print(f"Error: Permission denied to read '{file_path}'.") | CODE |
| MEDIUM⚡ | scripts/generate_stdlib_docs.py | 119 | print(f"Error: Unable to decode '{file_path}' as UTF-8.") | CODE |
| LOW⚡ | scripts/generate_stdlib_docs.py | 121 | except Exception as e: | CODE |
| MEDIUM⚡ | scripts/generate_stdlib_docs.py | 122 | print(f"Error reading file '{file_path}': {e}") | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/runtime/engine/runner.py | 96 | CODE | |
| LOW | tests/runtime/engine/runner.py | 174 | CODE | |
| LOW | tests/runtime/engine/runner.py | 218 | CODE | |
| LOW | tests/runtime/engine/runner.py | 257 | CODE | |
| LOW | tests/runtime/engine/parser.py | 59 | CODE | |
| LOW | tests/runtime/engine/parser.py | 89 | CODE | |
| LOW | tests/runtime/engine/parser.py | 112 | CODE | |
| LOW | scripts/generate_stdlib_docs.py | 62 | CODE | |
| LOW | scripts/generate_stdlib_docs.py | 125 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | src/stdlib/include/linux/netlink.h | 67 | #define NLM_F_DUMP_FILTERED 0x20 /* Dump was filtered as requested */ | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | scripts/shellcheck.sh | 6 | # Example usage: | COMMENT |
| LOW | scripts/clang_tidy.sh | 6 | # Example usage: | COMMENT |
| LOW | scripts/bpftrace_tidy.sh | 6 | # Example usage: | COMMENT |
| LOW | scripts/sync_headers.sh | 16 | # Example usage: | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/runtime/engine/runner.py | 507 | def print_befores_and_after_output(): | CODE |
| LOW | scripts/generate_stdlib_docs.py | 31 | def parse_deprecated_variant_string(line: str) -> Optional[str]: | CODE |
| LOW | scripts/generate_stdlib_docs.py | 43 | def parse_function_name_string(line: str) -> Optional[str]: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | src/ast/passes/resource_analyser.cpp | 579 | // We do this to simplify the code and make it more robust to changes | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/runtime/engine/main.py | 4 | CODE | |
| LOW | .github/include/ci.py | 25 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | src/ast/passes/fold_literals.cpp | 706 | // First, we need to check if this directly wraps a positional parameter. | COMMENT |