Repository Analysis

bpftrace/bpftrace

High-level tracing language for Linux

2.9 Likely human-written View on GitHub

Analysis Overview

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).

2.9
Adjusted Score
2.9
Raw Score
100%
Time Factor
2026-07-14
Last Push
10.2K
Stars
C++
Language
140.2K
Lines of Code
639
Files
384
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

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 1MEDIUM 6LOW 377

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 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.

Over-Commented Block356 hits · 353 pts
SeverityFileLineSnippetContext
LOWtests/async_action.cpp1#include <regex>COMMENT
LOWtests/utils.cpp1#include <climits>COMMENT
LOWtests/type_resolver.cpp1#include <gmock/gmock-matchers.h>COMMENT
LOWtests/child.cpp1#include <csignal>COMMENT
LOWtests/portability_analyser.cpp1#include "ast/passes/portability_analyser.h"COMMENT
LOWtests/field_analyser.cpp1#include "ast/passes/field_analyser.h"COMMENT
LOWtests/probe.cpp1#include "ast/passes/ap_probe_expansion.h"COMMENT
LOWtests/bpftrace.cpp1#include <chrono>COMMENT
LOWtests/required_resources.cpp1#include <iostream>COMMENT
LOWtests/type_checker.cpp1#include <gmock/gmock-matchers.h>COMMENT
LOWtests/clang_parser.cpp1#include <llvm/Config/llvm-config.h>COMMENT
LOWtests/mocks.h1#pragma onceCOMMENT
LOWtests/pre_type_check.cpp1#include <gmock/gmock-matchers.h>COMMENT
LOWtests/parser.cpp1#include <climits>COMMENT
LOWtests/include/libbpf-usdt/usdt.h301COMMENT
LOWtests/include/libbpf-usdt/usdt.h321#define USDT_NOP nopCOMMENT
LOWtests/include/libbpf-usdt/usdt.h341#ifdef __usdt_va_optCOMMENT
LOWtests/include/libbpf-usdt/usdt.h361#define __usdt_asm5(x, ...) __usdt_str(x) "," __usdt_asm4(__VA_ARGS__)COMMENT
LOWtests/include/libbpf-usdt/usdt.h461#define __usdt_argref(id) %I[id]%[id]COMMENT
LOWtests/include/libbpf-usdt/usdt.h521__usdt_maybe_signed(wchar_t);COMMENT
LOWtests/include/libbpf-usdt/usdt.h541#define __usdt_asm_ops6(a,b,c,d,e,x) __usdt_asm_ops5(a,b,c,d,e), __usdt_asm_op(6, x)COMMENT
LOWtests/testlibs/usdt_tp.h1#ifndef _USDTLIBX_H_COMMENT
LOWtests/testprogs/mountns_pivot_wrapper.c1#ifndef _GNU_SOURCECOMMENT
LOWtests/testprogs/syscall.c1#include <ctype.h>COMMENT
LOWtests/testprogs/mountns_wrapper.c1#ifndef _GNU_SOURCECOMMENT
LOWscripts/clang_tidy.sh61# to keep it simple.COMMENT
LOWscripts/create-assets.sh1#!/bin/bashCOMMENT
LOWscripts/sync_headers.sh1#!/usr/bin/env bashCOMMENT
LOWsrc/async_action.cpp1#include <fstream>COMMENT
LOWsrc/struct.cpp1#include <algorithm>COMMENT
LOWsrc/bpfbytecode.h1#pragma onceCOMMENT
LOWsrc/bfd-disasm.cpp1#include <fcntl.h>COMMENT
LOWsrc/btf.cpp1#include "scopeguard.h"COMMENT
LOWsrc/btf.cpp21#pragma GCC diagnostic popCOMMENT
LOWsrc/btf.cpp541 // string.GetSize() will return len + 1, which is a mismatch with the actualCOMMENT
LOWsrc/dwarf_parser.cpp321 ssize_t bitfield_width = get_bitfield_size(field_die);COMMENT
LOWsrc/types.h1#pragma onceCOMMENT
LOWsrc/run_bpftrace.cpp1#include <csignal>COMMENT
LOWsrc/globalvars.cpp1#include <bpf/bpf.h>COMMENT
LOWsrc/btf.h1#pragma onceCOMMENT
LOWsrc/bpftrace.cpp1#include "bpfbytecode.h"COMMENT
LOWsrc/bpftrace.cpp21#include <glob.h>COMMENT
LOWsrc/bpftrace.cpp41#include "attached_probe.h"COMMENT
LOWsrc/bpffeature.cpp1#include "bpffeature.h"COMMENT
LOWsrc/usyms.cpp1#include "types.h"COMMENT
LOWsrc/required_resources.h1#pragma onceCOMMENT
LOWsrc/required_resources.h141std::ostream &operator<<(std::ostream &os, const RuntimeErrorInfo &info);COMMENT
LOWsrc/attached_probe.cpp1#ifndef _GNU_SOURCECOMMENT
LOWsrc/attached_probe.cpp21#include <bpf/libbpf.h>COMMENT
LOWsrc/probe_matcher.cpp1#include <algorithm>COMMENT
LOWsrc/bpftrace.h1#pragma onceCOMMENT
LOWsrc/bpftrace.h21#include "bpfbytecode.h"COMMENT
LOWsrc/bpfbytecode.cpp1#include "bpfbytecode.h"COMMENT
LOWsrc/bpfbytecode.cpp141COMMENT
LOWsrc/log.h121 : LogStream(file, line, LogType::BUG, out) {};COMMENT
LOWsrc/log.h141#define LOGSTREAM_ERROR(...) LOGSTREAM_COMMON(__VA_ARGS__)COMMENT
LOWsrc/parser.cpp1#include "parser.h"COMMENT
LOWsrc/types_format.cpp341 }COMMENT
LOWsrc/types_format.cpp401 if (min_index != 0) {COMMENT
LOWsrc/main.cpp1#include <bpf/libbpf.h>COMMENT
296 more matches not shown…
Excessive Try-Catch Wrapping7 hits · 16 pts
SeverityFileLineSnippetContext
LOWtests/runtime/engine/runner.py299 except Exception as err:CODE
MEDIUMtests/runtime/engine/runner.py257def check_expect(expect, output):CODE
MEDIUMscripts/generate_stdlib_docs.py66 print(f"Error: File '{file_path}' not found.")CODE
MEDIUMscripts/generate_stdlib_docs.py116 print(f"Error: Permission denied to read '{file_path}'.")CODE
MEDIUMscripts/generate_stdlib_docs.py119 print(f"Error: Unable to decode '{file_path}' as UTF-8.")CODE
LOWscripts/generate_stdlib_docs.py121 except Exception as e:CODE
MEDIUMscripts/generate_stdlib_docs.py122 print(f"Error reading file '{file_path}': {e}")CODE
Deep Nesting9 hits · 9 pts
SeverityFileLineSnippetContext
LOWtests/runtime/engine/runner.py96CODE
LOWtests/runtime/engine/runner.py174CODE
LOWtests/runtime/engine/runner.py218CODE
LOWtests/runtime/engine/runner.py257CODE
LOWtests/runtime/engine/parser.py59CODE
LOWtests/runtime/engine/parser.py89CODE
LOWtests/runtime/engine/parser.py112CODE
LOWscripts/generate_stdlib_docs.py62CODE
LOWscripts/generate_stdlib_docs.py125CODE
Synthetic Comment Markers1 hit · 8 pts
SeverityFileLineSnippetContext
HIGHsrc/stdlib/include/linux/netlink.h67#define NLM_F_DUMP_FILTERED 0x20 /* Dump was filtered as requested */COMMENT
Example Usage Blocks4 hits · 6 pts
SeverityFileLineSnippetContext
LOWscripts/shellcheck.sh6# Example usage:COMMENT
LOWscripts/clang_tidy.sh6# Example usage:COMMENT
LOWscripts/bpftrace_tidy.sh6# Example usage:COMMENT
LOWscripts/sync_headers.sh16# Example usage:COMMENT
Hyper-Verbose Identifiers3 hits · 3 pts
SeverityFileLineSnippetContext
LOWtests/runtime/engine/runner.py507 def print_befores_and_after_output():CODE
LOWscripts/generate_stdlib_docs.py31def parse_deprecated_variant_string(line: str) -> Optional[str]:CODE
LOWscripts/generate_stdlib_docs.py43def parse_function_name_string(line: str) -> Optional[str]:CODE
AI Slop Vocabulary1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUMsrc/ast/passes/resource_analyser.cpp579 // We do this to simplify the code and make it more robust to changesCOMMENT
Unused Imports2 hits · 2 pts
SeverityFileLineSnippetContext
LOWtests/runtime/engine/main.py4CODE
LOW.github/include/ci.py25CODE
Verbosity Indicators1 hit · 2 pts
SeverityFileLineSnippetContext
LOWsrc/ast/passes/fold_literals.cpp706 // First, we need to check if this directly wraps a positional parameter.COMMENT