Repository Analysis

betaflight/betaflight

Open Source Flight Controller Firmware

3.0 Likely human-written View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of betaflight/betaflight, a C project with 11,213 GitHub stars. SynthScan v2.0 examined 2,223,081 lines of code across 3943 source files, recording 8288 pattern matches distributed across 7 syntactic categories. The overall adjusted score of 3.0 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).

3.0
Adjusted Score
3.0
Raw Score
100%
Time Factor
2026-07-14
Last Push
11.2K
Stars
C
Language
2.2M
Lines of Code
3.9K
Files
8.3K
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 22LOW 8266

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 8288 distinct pattern matches across 7 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 Block8242 hits · 6676 pts
SeverityFileLineSnippetContext
LOWlib/test/gtest/inc/gtest/gtest-matchers.h1// Copyright 2007, Google Inc.COMMENT
LOWlib/test/gtest/inc/gtest/gtest-matchers.h21// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHTCOMMENT
LOWlib/test/gtest/inc/gtest/gtest-matchers.h41COMMENT
LOWlib/test/gtest/inc/gtest/gtest-matchers.h61 4251 GTEST_MAYBE_5046_ /* class A needs to have dll-interface to be used byCOMMENT
LOWlib/test/gtest/inc/gtest/gtest-matchers.h141 public:COMMENT
LOWlib/test/gtest/inc/gtest/gtest-matchers.h161 // "is empty" matcher probably only needs to explain what the actualCOMMENT
LOWlib/test/gtest/inc/gtest/gtest-matchers.h601 return os;COMMENT
LOWlib/test/gtest/inc/gtest/gtest-death-test.h1// Copyright 2005, Google Inc.COMMENT
LOWlib/test/gtest/inc/gtest/gtest-death-test.h21// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHTCOMMENT
LOWlib/test/gtest/inc/gtest/gtest-death-test.h41#define GOOGLETEST_INCLUDE_GTEST_GTEST_DEATH_TEST_H_COMMENT
LOWlib/test/gtest/inc/gtest/gtest-death-test.h61// tests. IMPORTANT: This is an internal utility. Using it may break theCOMMENT
LOWlib/test/gtest/inc/gtest/gtest-death-test.h81//COMMENT
LOWlib/test/gtest/inc/gtest/gtest-death-test.h101//COMMENT
LOWlib/test/gtest/inc/gtest/gtest-death-test.h121// learn wherever you come from. In the following: 'A' denotes aCOMMENT
LOWlib/test/gtest/inc/gtest/gtest-death-test.h141// A* matches 0 or many occurrences of ACOMMENT
LOWlib/test/gtest/inc/gtest/gtest-death-test.h161// simplicity, the current implementation doesn't search the PATHCOMMENT
LOWlib/test/gtest/inc/gtest/gtest-death-test.h221// since the sideeffects of the call are only visible in opt mode, and notCOMMENT
LOWlib/test/gtest/inc/gtest/gtest-death-test.h241// // opt-mode has sideeffect visible.COMMENT
LOWlib/test/gtest/inc/gtest/gtest-death-test.h261//COMMENT
LOWlib/test/gtest/inc/gtest/gtest-death-test.h281// death tests are not supported. Those macros must compile on such systemsCOMMENT
LOWlib/test/gtest/inc/gtest/gtest-death-test.h301// terminator - Must be an empty statement for EXPECT_DEATH_IF_SUPPORTEDCOMMENT
LOWlib/test/gtest/inc/gtest/gtest-death-test.h321 GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \COMMENT
LOWlib/test/gtest/inc/gtest/gtest-spi.h1// Copyright 2007, Google Inc.COMMENT
LOWlib/test/gtest/inc/gtest/gtest-spi.h21// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHTCOMMENT
LOWlib/test/gtest/inc/gtest/gtest-spi.h61 };COMMENT
LOWlib/test/gtest/inc/gtest/gtest-spi.h121} // namespace testingCOMMENT
LOWlib/test/gtest/inc/gtest/gtest-spi.h181 } \COMMENT
LOWlib/test/gtest/inc/gtest/gtest-spi.h201// - You cannot stream a failure message to this macro.COMMENT
LOWlib/test/gtest/inc/gtest/gtest-assertion-result.h1// Copyright 2005, Google Inc.COMMENT
LOWlib/test/gtest/inc/gtest/gtest-assertion-result.h21// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHTCOMMENT
LOWlib/test/gtest/inc/gtest/gtest-assertion-result.h41#include <memory>COMMENT
LOWlib/test/gtest/inc/gtest/gtest-assertion-result.h61// This class is useful for two purposes:COMMENT
LOWlib/test/gtest/inc/gtest/gtest-assertion-result.h81// Expected: trueCOMMENT
LOWlib/test/gtest/inc/gtest/gtest-assertion-result.h101// }COMMENT
LOWlib/test/gtest/inc/gtest/gtest-assertion-result.h121// if ((n % 2) == 0)COMMENT
LOWlib/test/gtest/inc/gtest/gtest-assertion-result.h141// This warning is off by default starting in Visual Studio 2019 but can beCOMMENT
LOWlib/test/gtest/inc/gtest/gtest-message.h1// Copyright 2005, Google Inc.COMMENT
LOWlib/test/gtest/inc/gtest/gtest-message.h21// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHTCOMMENT
LOWlib/test/gtest/inc/gtest/gtest-message.h41// to CHANGE WITHOUT NOTICE. Therefore DO NOT DEPEND ON IT in a userCOMMENT
LOWlib/test/gtest/inc/gtest/gtest-message.h61COMMENT
LOWlib/test/gtest/inc/gtest/gtest-message.h81// foo << 1 << " != " << 2;COMMENT
LOWlib/test/gtest/inc/gtest/gtest-message.h121 // overloads are visible in either the std namespace or the globalCOMMENT
LOWlib/test/gtest/inc/gtest/gtest-param-test.h1// Copyright 2008, Google Inc.COMMENT
LOWlib/test/gtest/inc/gtest/gtest-param-test.h21// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHTCOMMENT
LOWlib/test/gtest/inc/gtest/gtest-param-test.h41// parameters without writing multiple copies of the same test.COMMENT
LOWlib/test/gtest/inc/gtest/gtest-param-test.h81// Range(begin, end [, step]) - Yields values {begin, begin+step,COMMENT
LOWlib/test/gtest/inc/gtest/gtest-param-test.h101COMMENT
LOWlib/test/gtest/inc/gtest/gtest-param-test.h121const char* pets[] = {"cat", "dog"};COMMENT
LOWlib/test/gtest/inc/gtest/gtest-param-test.h141//COMMENT
LOWlib/test/gtest/inc/gtest/gtest-param-test.h181#include "gtest/internal/gtest-param-util.h"COMMENT
LOWlib/test/gtest/inc/gtest/gtest-param-test.h201// }COMMENT
LOWlib/test/gtest/inc/gtest/gtest-param-test.h241//COMMENT
LOWlib/test/gtest/inc/gtest/gtest-param-test.h261//COMMENT
LOWlib/test/gtest/inc/gtest/gtest-param-test.h281// each with parameter values 'a' and 'b':COMMENT
LOWlib/test/gtest/inc/gtest/gtest-param-test.h321// For example, this instantiates tests from test suite BarTest eachCOMMENT
LOWlib/test/gtest/inc/gtest/gtest-param-test.h341// Synopsis:COMMENT
LOWlib/test/gtest/inc/gtest/gtest-param-test.h361// Combine() allows the user to combine two or more sequences to produceCOMMENT
LOWlib/test/gtest/inc/gtest/gtest-param-test.h381//COMMENT
LOWlib/test/gtest/inc/gtest/gtest-param-test.h401// }COMMENT
LOWlib/test/gtest/inc/gtest/gtest-param-test.h421// Example:COMMENT
8182 more matches not shown…
Slop Phrases18 hits · 35 pts
SeverityFileLineSnippetContext
MEDIUM…/Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_jpeg.c131 (#) To control JPEG state you can use the following function: HAL_JPEG_GetState()CODE
MEDIUM…/Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_ltdc.c58 (#) To control LTDC state you can use the following function: HAL_LTDC_GetState()CODE
MEDIUM…/Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_dcmi.c42 (#) To control DCMI state you can use the function HAL_DCMI_GetState().CODE
MEDIUM…7/Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_dsi.c41 (#) To control DSI state you can use the following function: HAL_DSI_GetState()CODE
MEDIUM…/Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_dcmi.c42 (#) To control DCMI state you can use the function HAL_DCMI_GetState().CODE
MEDIUM…/Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_ltdc.c70 (#) To control LTDC state you can use the following function: HAL_LTDC_GetState()CODE
MEDIUM…7/Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_dsi.c41 (#) To control DSI state you can use the following function: HAL_DSI_GetState()CODE
MEDIUM…/Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_jpeg.c131 (#) To control JPEG state you can use the following function: HAL_JPEG_GetState()CODE
MEDIUM…/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_ltdc.c60 (#) To control LTDC state you can use the following function: HAL_LTDC_GetState()CODE
MEDIUM…/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dcmi.c44 (#) To control DCMI state you can use the function HAL_DCMI_GetState().CODE
MEDIUM…Drivers/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_can.c52 (#) To control CAN events you can use one of the following two methods:CODE
MEDIUM…rivers/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_hash.c49 (#) To control HASH events you can use one of the following wo methods:CODE
MEDIUM…rivers/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_cryp.c36 (#) To control CRYP events you can use one of the following two methods:CODE
MEDIUM…Drivers/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_dma.c40 (#) Optionally, if the Circular mode is enabled, you can use the Double buffer mode by configuringCODE
MEDIUM…Drivers/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_dma.c64 (#) To control DMA events you can use one of the following two methods:CODE
MEDIUM…Drivers/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_dma.c74 (#) Optionally, if Circular mode and Double Buffer mode are enabled, you can modifyCODE
LOWsrc/platform/STM32/exti.c233 // don't forget to match cleanup with configCOMMENT
LOWsrc/platform/APM32/eint_apm32.c123 // don't forget to match cleanup with configCOMMENT
AI Slop Vocabulary6 hits · 18 pts
SeverityFileLineSnippetContext
MEDIUMlib/test/gtest/inc/gtest/gtest-death-test.h152// This implementation is *not* meant to be as highly tuned or robustCOMMENT
MEDIUMlib/test/gtest/inc/gtest/gtest-death-test.h224// In practice, this can be used to test functions that utilize theCOMMENT
MEDIUMsrc/platform/STM32/sdio_h5xx.c243 // Setting all the SDIO pins to high for a short time results in more robust initialisation.COMMENT
MEDIUMsrc/platform/STM32/sdio_h7xx.c239 // Setting all the SDIO pins to high for a short time results in more robust initialisation.COMMENT
MEDIUMsrc/platform/STM32/sdio_n6xx.c307 // Setting all the SDIO pins to high for a short time results in more robust initialisation.COMMENT
MEDIUMsrc/platform/X32/sdio_x32.c234 // Setting all the SDIO pins to high for a short time results in more robust initialisation.COMMENT
Verbosity Indicators9 hits · 18 pts
SeverityFileLineSnippetContext
LOWsrc/platform/STM32/spa06_i3c_probe.c219 // Step 0: input + pull-up. Both lines should read 1.COMMENT
LOWsrc/platform/STM32/spa06_i3c_probe.c228 // Step 1: floating input. If the bus has an external pull-up the lineCOMMENT
LOWsrc/platform/STM32/spa06_i3c_probe.c237 // Step 2: drive SCL (PC10) LOW as open-drain output, SDA stays floating.COMMENT
LOWsrc/platform/STM32/spa06_i3c_probe.c248 // Step 3: drive SDA (PC11) LOW open-drain.COMMENT
LOWsrc/main/drivers/compass/compass_qmc5883.c195 // Step 1: Write special XYZ sign configuration value to register 0x29COMMENT
LOWsrc/main/drivers/compass/compass_qmc5883.c197 // Step 2: Configure CONF1 register with continuous mode, 100Hz ODR, 8G range, and OSR1=8COMMENT
LOWsrc/main/drivers/compass/compass_qmc5883.c199 // Step 3: Configure CONF2 register with OSR2=8 oversampling settingsCOMMENT
LOWsrc/main/drivers/rx/rx_sx1280.c852// Next we need to check if we need to FHSS and then do so if neededCOMMENT
LOWsrc/main/cli/cli.c2664 // Actually, we need to check if the negated value would be < INT32_MINCOMMENT
Structural Annotation Overuse7 hits · 15 pts
SeverityFileLineSnippetContext
LOWsrc/platform/STM32/spa06_i3c_probe.c219 // Step 0: input + pull-up. Both lines should read 1.COMMENT
LOWsrc/platform/STM32/spa06_i3c_probe.c228 // Step 1: floating input. If the bus has an external pull-up the lineCOMMENT
LOWsrc/platform/STM32/spa06_i3c_probe.c237 // Step 2: drive SCL (PC10) LOW as open-drain output, SDA stays floating.COMMENT
LOWsrc/platform/STM32/spa06_i3c_probe.c248 // Step 3: drive SDA (PC11) LOW open-drain.COMMENT
LOWsrc/main/drivers/compass/compass_qmc5883.c195 // Step 1: Write special XYZ sign configuration value to register 0x29COMMENT
LOWsrc/main/drivers/compass/compass_qmc5883.c197 // Step 2: Configure CONF1 register with continuous mode, 100Hz ODR, 8G range, and OSR1=8COMMENT
LOWsrc/main/drivers/compass/compass_qmc5883.c199 // Step 3: Configure CONF2 register with OSR2=8 oversampling settingsCOMMENT
TODO Padding4 hits · 6 pts
SeverityFileLineSnippetContext
LOWsrc/platform/PICO/dshot_pico.c268 // TODO: implement?COMMENT
LOWsrc/platform/PICO/system.c109 //TODO: implementCOMMENT
LOWsrc/platform/PICO/bus_spi_pico.c327 //TODO: implementCOMMENT
LOWsrc/main/msp/msp_protocol_v2_common.h26// TODO: implement new, extensible rangefinder protocolCOMMENT
Hyper-Verbose Identifiers2 hits · 2 pts
SeverityFileLineSnippetContext
LOWsrc/test/sitl/sitl_harness.py1037def scenario_geofence_rth_rxloss(sitl, rc, fdm):CODE
LOWsrc/test/sitl/sitl_harness.py1112def rescue_engagement_asserts(sitl, variant):CODE