Repository Analysis

apache/brpc

brpc is an Industrial-grade RPC framework using C++ Language, which is often used in high performance system such as Search, Storage, Machine learning, Advertisement, Recommendation etc. "brpc" means "better RPC".

6.7 Low AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of apache/brpc, a C++ project with 17,552 GitHub stars. SynthScan v2.0 examined 306,521 lines of code across 1240 source files, recording 2046 pattern matches distributed across 11 syntactic categories. The overall adjusted score of 6.7 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.7
Adjusted Score
6.7
Raw Score
100%
Time Factor
2026-07-12
Last Push
17.6K
Stars
C++
Language
306.5K
Lines of Code
1.2K
Files
2.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 2LOW 2044

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 2046 distinct pattern matches across 11 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 Block1995 hits · 1970 pts
SeverityFileLineSnippetContext
LOWCMakeLists.txt1# Licensed to the Apache Software Foundation (ASF) under oneCOMMENT
LOWconfig_brpc.sh1#!/usr/bin/env shCOMMENT
LOW.licenserc.yaml1# Licensed to the Apache Software Foundation (ASF) under oneCOMMENT
LOWCHANGES.md1<!--COMMENT
LOWtools/print_gcc_version.sh1#!/usr/bin/env bashCOMMENT
LOWtools/CMakeLists.txt1# Licensed to the Apache Software Foundation (ASF) under oneCOMMENT
LOWtools/lldb_bthread_stack.py1#!/usr/bin/env pythonCOMMENT
LOWtools/get_brpc_revision.sh1#!/usr/bin/env bashCOMMENT
LOWtools/gdb_bthread_stack.py1#!/usr/bin/env pythonCOMMENT
LOWtools/add_syntax_equal_proto2_to_all.sh1#!/usr/bin/env bashCOMMENT
LOWtools/rpc_replay/CMakeLists.txt1# Licensed to the Apache Software Foundation (ASF) under oneCOMMENT
LOWtools/rpc_replay/info_thread.cpp1// Licensed to the Apache Software Foundation (ASF) under oneCOMMENT
LOWtools/rpc_replay/info_thread.h1// Licensed to the Apache Software Foundation (ASF) under oneCOMMENT
LOWtools/rpc_replay/rpc_replay.cpp1// Licensed to the Apache Software Foundation (ASF) under oneCOMMENT
LOWtools/rpc_replay/rpc_replay.cpp21#include <butil/time.h>COMMENT
LOWtools/parallel_http/CMakeLists.txt1# Licensed to the Apache Software Foundation (ASF) under oneCOMMENT
LOWtools/parallel_http/parallel_http.cpp1// Licensed to the Apache Software Foundation (ASF) under oneCOMMENT
LOWtools/trackme_server/CMakeLists.txt1# Licensed to the Apache Software Foundation (ASF) under oneCOMMENT
LOWtools/trackme_server/trackme_server.cpp1// Licensed to the Apache Software Foundation (ASF) under oneCOMMENT
LOWtools/rpc_press/pb_util.cpp1// Licensed to the Apache Software Foundation (ASF) under oneCOMMENT
LOWtools/rpc_press/CMakeLists.txt1# Licensed to the Apache Software Foundation (ASF) under oneCOMMENT
LOWtools/rpc_press/pb_util.h1// Licensed to the Apache Software Foundation (ASF) under oneCOMMENT
LOWtools/rpc_press/json_loader.cpp1// Licensed to the Apache Software Foundation (ASF) under oneCOMMENT
LOWtools/rpc_press/client.py1# Licensed to the Apache Software Foundation (ASF) under oneCOMMENT
LOWtools/rpc_press/rpc_press_impl.cpp1// Licensed to the Apache Software Foundation (ASF) under oneCOMMENT
LOWtools/rpc_press/rpc_press_impl.cpp21#include <sys/time.h>COMMENT
LOWtools/rpc_press/info_thread.cpp1// Licensed to the Apache Software Foundation (ASF) under oneCOMMENT
LOWtools/rpc_press/rpc_press.cpp1// Licensed to the Apache Software Foundation (ASF) under oneCOMMENT
LOWtools/rpc_press/json_loader.h1// Licensed to the Apache Software Foundation (ASF) under oneCOMMENT
LOWtools/rpc_press/rpc_press_impl.h1// Licensed to the Apache Software Foundation (ASF) under oneCOMMENT
LOWtools/rpc_press/info_thread.h1// Licensed to the Apache Software Foundation (ASF) under oneCOMMENT
LOWtools/rpc_view/rpc_view.cpp1// Licensed to the Apache Software Foundation (ASF) under oneCOMMENT
LOWtools/rpc_view/CMakeLists.txt1# Licensed to the Apache Software Foundation (ASF) under oneCOMMENT
LOWtest/bvar_mvariable_unittest.cpp1// Licensed to the Apache Software Foundation (ASF) under oneCOMMENT
LOWtest/bvar_mvariable_unittest.cpp21#include <string_view>COMMENT
LOWtest/brpc_http_message_unittest.cpp1// Licensed to the Apache Software Foundation (ASF) under oneCOMMENT
LOWtest/brpc_channel_unittest.cpp1// Licensed to the Apache Software Foundation (ASF) under oneCOMMENT
LOWtest/brpc_channel_unittest.cpp21COMMENT
LOWtest/bthread_setconcurrency_unittest.cpp1// Licensed to the Apache Software Foundation (ASF) under oneCOMMENT
LOWtest/bvar_multi_dimension_unittest.cpp1// Licensed to the Apache Software Foundation (ASF) under oneCOMMENT
LOWtest/bvar_multi_dimension_unittest.cpp21#include <cstddef>COMMENT
LOWtest/bthread_id_unittest.cpp1// Licensed to the Apache Software Foundation (ASF) under oneCOMMENT
LOWtest/baidu_thread_local_unittest.cpp1// Licensed to the Apache Software Foundation (ASF) under oneCOMMENT
LOWtest/bvar_status_unittest.cpp1// Licensed to the Apache Software Foundation (ASF) under oneCOMMENT
LOWtest/brpc_mysql_auth_packet_unittest.cpp1// Licensed to the Apache Software Foundation (ASF) under oneCOMMENT
LOWtest/brpc_http_rpc_protocol_unittest.cpp1// Licensed to the Apache Software Foundation (ASF) under oneCOMMENT
LOWtest/brpc_http_rpc_protocol_unittest.cpp21COMMENT
LOWtest/brpc_http_rpc_protocol_unittest.cpp41#include "butil/fd_guard.h"COMMENT
LOWtest/bvar_lock_timer_unittest.cpp1// Licensed to the Apache Software Foundation (ASF) under oneCOMMENT
LOWtest/brpc_load_balancer_unittest.cpp1// Licensed to the Apache Software Foundation (ASF) under oneCOMMENT
LOWtest/brpc_load_balancer_unittest.cpp21COMMENT
LOWtest/brpc_load_balancer_unittest.cpp1301 bthread_usleep(1000);COMMENT
LOWtest/brpc_load_balancer_unittest.cpp1321// trigger theCOMMENT
LOWtest/CMakeLists.txt1# Licensed to the Apache Software Foundation (ASF) under oneCOMMENT
LOWtest/string_splitter_unittest.cpp1// Licensed to the Apache Software Foundation (ASF) under oneCOMMENT
LOWtest/brpc_hulu_pbrpc_protocol_unittest.cpp1// Licensed to the Apache Software Foundation (ASF) under oneCOMMENT
LOWtest/brpc_hulu_pbrpc_protocol_unittest.cpp21COMMENT
LOWtest/brpc_snappy_compress_unittest.cpp1// Licensed to the Apache Software Foundation (ASF) under oneCOMMENT
LOWtest/bvar_variable_unittest.cpp1// Licensed to the Apache Software Foundation (ASF) under oneCOMMENT
LOWtest/object_pool_unittest.cpp1// Licensed to the Apache Software Foundation (ASF) under oneCOMMENT
1935 more matches not shown…
Example Usage Blocks10 hits · 15 pts
SeverityFileLineSnippetContext
LOWtest/multiprocess_func_list.h20// Example usage:COMMENT
LOWsrc/brpc/versioned_ref_with_id.h146// Example usage:COMMENT
LOWsrc/butil/lazy_instance.h26// Example usage:COMMENT
LOWsrc/butil/gtest_prod_util.h33// Example usage:COMMENT
LOWsrc/butil/gtest_prod_util.h63// Example usage:COMMENT
LOWsrc/butil/compiler_specific.h47// Example usage:COMMENT
LOWsrc/butil/memory/singleton.h166// Example usage:COMMENT
LOWsrc/butil/mac/foundation_util.h251// Example usage:COMMENT
LOWsrc/butil/mac/foundation_util.h312// Example usage:COMMENT
LOWsrc/butil/threading/thread_local.h32// Example usage:COMMENT
Slop Phrases9 hits · 14 pts
SeverityFileLineSnippetContext
LOWexample/dynamic_partition_echo_c++/server.cpp162 // Don't forget to stop and join the server otherwise still-runningCOMMENT
LOWexample/selective_echo_c++/server.cpp161 // Don't forget to stop and join the server otherwise still-runningCOMMENT
LOWexample/multi_threaded_echo_fns_c++/server.cpp177 // Don't forget to stop and join the server otherwise still-runningCOMMENT
LOWexample/partition_echo_c++/server.cpp162 // Don't forget to stop and join the server otherwise still-runningCOMMENT
LOWsrc/bthread/task_group.cpp287 // Don't forget to add elapse of last wait_task.COMMENT
LOWsrc/brpc/parallel_channel.cpp315 // NOTE: Don't forget to set "nfailed = _ndone" when the _cntl is setCOMMENT
LOWsrc/brpc/health_reporter.h35 // Don't forget to call done->Run() at the end.COMMENT
LOWsrc/brpc/controller.cpp1266 // Don't forget to signal waiters on authenticationCOMMENT
LOWsrc/brpc/http_header.cpp34 // NOTE: don't forget to clear the field in Clear() as well.COMMENT
Structural Annotation Overuse8 hits · 12 pts
SeverityFileLineSnippetContext
LOWsrc/bthread/rwlock.cpp235 // Step 1: announce ourselves before doing anything else, so thatCOMMENT
LOWsrc/bthread/rwlock.cpp251 // Step 2: serialize with other writers. At most one writer holdsCOMMENT
LOWsrc/bthread/rwlock.cpp275 // Step 3: with `writer_queue_mutex' held, wait for all readers to drainCOMMENT
LOWsrc/bthread/butex.cpp514 // NOTE: This function must be no-op when bw->container is NULL.COMMENT
LOWsrc/bthread/unstable.h76// NOTE: This function does not wake up pthread waiters.(tested on linux 2.6.32)COMMENT
LOWsrc/brpc/uri.h87 // NOTE: This method is not thread-safe because it may re-generate theCOMMENT
LOWsrc/butil/endpoint.h75// NOTE: This function caches result on first call.COMMENT
LOWsrc/butil/endpoint.h79// NOTE: This function caches result on first call.COMMENT
AI Slop Vocabulary7 hits · 11 pts
SeverityFileLineSnippetContext
MEDIUMsrc/brpc/span.h192 // However, returning by value is more robust: it prevents potential data races ifCOMMENT
LOWsrc/brpc/builtin/pprof_perl.cpp1210 "# names. You show the name the first time, and just use its number\n"CODE
LOWsrc/brpc/builtin/pprof_perl.cpp3642 " # Since we know one of the pair is 0, it's fine to just add them.\n"CODE
LOWsrc/brpc/builtin/pprof_perl.cpp4264 "# If all else fails, just return the name of the library unmodified.\n"CODE
LOWsrc/brpc/builtin/pprof_perl.cpp4753 " # If \"addr2line\" isn't installed on the system at all, just use\n"CODE
LOWsrc/brpc/builtin/pprof_perl.cpp4885 " # No symbols: just use addresses\n"CODE
MEDIUMsrc/butil/safe_strerror_posix.h34// more robust in the case of heap corruption errors, since it doesn't need toCOMMENT
Fake / Example Data7 hits · 7 pts
SeverityFileLineSnippetContext
LOWtest/iobuf_unittest.cpp1175 void* dummy_data = NULL;CODE
LOWtest/iobuf_unittest.cpp1177 ASSERT_TRUE(dummy_stream.Next(&dummy_data, &dummy_size));CODE
LOWexample/couchbase_c++/couchbase_client.cpp34 R"({"name": "John Doe", "age": 30, "email": "john@example.com"})";CODE
LOWexample/couchbase_c++/couchbase_client.cpp121 R"({"name": "Jane Doe", "age": 28, "email": "jane.doe@example.com"})";CODE
LOW…le/couchbase_c++/traditional_brpc_couchbase_client.cpp93 R"({"name": "John Doe", "age": 30, "email": "john@example.com"})",CODE
LOWdocs/en/couchbase_example.md328 R"({"name": "John Doe", "age": 30, "email": "john@example.com"})", // valueCODE
LOWdocs/en/couchbase_example.md519std::string add_value = R"({"name": "John Doe", "age": 30, "email": "john@example.com"})";CODE
Verbosity Indicators3 hits · 4 pts
SeverityFileLineSnippetContext
LOWsrc/bthread/rwlock.cpp235 // Step 1: announce ourselves before doing anything else, so thatCOMMENT
LOWsrc/bthread/rwlock.cpp251 // Step 2: serialize with other writers. At most one writer holdsCOMMENT
LOWsrc/bthread/rwlock.cpp275 // Step 3: with `writer_queue_mutex' held, wait for all readers to drainCOMMENT
Deep Nesting2 hits · 2 pts
SeverityFileLineSnippetContext
LOWtools/lldb_bthread_stack.py128CODE
LOWtools/gdb_bthread_stack.py73CODE
Redundant / Tautological Comments2 hits · 2 pts
SeverityFileLineSnippetContext
LOWsrc/brpc/builtin/pprof_perl.cpp3753 " # Check if the file contains a symbol-section marker.\n"CODE
LOWsrc/brpc/builtin/pprof_perl.cpp5178 " # Verify if addr2line can find the $sep_symbol. If not, we use objdump\n"CODE
Hyper-Verbose Identifiers2 hits · 2 pts
SeverityFileLineSnippetContext
LOWsrc/brpc/builtin/flot_min_js.cpp46 return "(function($){$.color={};$.color.make=function(r,g,b,a){var o={};o.r=r||0;o.g=g||0;o.b=b||0;o.a=a!=null?a:1;oCODE
LOWsrc/brpc/builtin/flot_min_js.cpp46 return "(function($){$.color={};$.color.make=function(r,g,b,a){var o={};o.r=r||0;o.g=g||0;o.b=b||0;o.a=a!=null?a:1;oCODE
Excessive Try-Catch Wrapping1 hit · 1 pts
SeverityFileLineSnippetContext
LOWtools/gdb_bthread_stack.py173 except Exception as e:CODE