Repository Analysis

ledger/ledger

Double-entry accounting system with a command-line reporting interface

7.0 Low AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of ledger/ledger, a C++ project with 6,021 GitHub stars. SynthScan v2.0 examined 40,417 lines of code across 207 source files, recording 208 pattern matches distributed across 13 syntactic categories. The overall adjusted score of 7.0 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).

7.0
Adjusted Score
7.0
Raw Score
100%
Time Factor
2026-08-28
Last Push
6.0K
Stars
C++
Language
40.4K
Lines of Code
207
Files
208
Pattern Hits
2026-08-29
Scan Date
0.01
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 2MEDIUM 44LOW 162

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 208 distinct pattern matches across 13 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.

Decorative Section Separators34 hits · 93 pts
SeverityFileLineSnippetContext
MEDIUMlefthook.yml19# ---------------------------------------------------------------------------COMMENT
MEDIUMlefthook.yml25# ---------------------------------------------------------------------------COMMENT
MEDIUMlefthook.yml57# ---------------------------------------------------------------------------COMMENT
MEDIUMlefthook.yml59# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/snapshot.py20# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/snapshot.py22# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/snapshot.py32# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/snapshot.py34# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/snapshot.py74# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/snapshot.py76# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/snapshot.py229# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/snapshot.py231# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/snapshot.py328# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/snapshot.py330# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/snapshot.py434# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/snapshot.py436# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/snapshot.py480# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/snapshot.py482# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/snapshot.py522# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/snapshot.py524# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/snapshot.py572# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/snapshot.py574# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/snapshot.py605# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/snapshot.py607# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/snapshot.py682# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/snapshot.py684# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/snapshot.py707# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/snapshot.py709# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/snapshot.py776# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/snapshot.py778# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/snapshot.py806# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/snapshot.py808# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/snapshot.py829# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/snapshot.py831# ---------------------------------------------------------------------------COMMENT
Over-Commented Block73 hits · 73 pts
SeverityFileLineSnippetContext
LOWCMakeLists.txt601COMMENT
LOWubsan-suppressions.txt1# UndefinedBehaviorSanitizer (UBSan) suppression file for known pre-existing issues.COMMENT
LOWlsan-suppressions.txt1# LeakSanitizer (LSan) suppression file for known pre-existing leaks.COMMENT
LOWlefthook.yml1# lefthook.ymlCOMMENT
LOWbenchmark/run_benchmark.sh1#!/usr/bin/env bashCOMMENT
LOWbenchmark/profile.sh1#!/usr/bin/env bashCOMMENT
LOWtools/update_copyright_year.sh1#!/bin/shCOMMENT
LOWtest/CMakeLists.txt41add_subdirectory(baseline)COMMENT
LOWtest/GenerateTests.py21COMMENT
LOWtest/GenerateTests.py61 #p_cerr_bal.stdin.close()COMMENT
LOWtest/regress/2152.py1import ledgerCOMMENT
LOWtest/regress/752.py1import ledgerCOMMENT
LOWtest/regress/2163.py1import ledgerCOMMENT
LOWtest/regress/1019.py1#!/usr/bin/env python3COMMENT
LOWtest/regress/2169.py1import ledgerCOMMENT
LOWtest/regress/2098.py1#!/usr/bin/env python3COMMENT
LOWtest/regress/976.py1import ledgerCOMMENT
LOWtest/regress/513.py1#!/usr/bin/env python3COMMENT
LOWtest/regress/1796.py1import ledgerCOMMENT
LOWtest/regress/3229.py1#!/usr/bin/env python3COMMENT
LOWtest/scripts/mock-getquote-with-exchange.sh1#!/bin/shCOMMENT
LOWpython/demo.py21COMMENT
LOWpython/demo.py41# - Did you use European-style numbers (1.000,00)?COMMENT
LOWpython/demo.py101COMMENT
LOWpython/demo.py241#COMMENT
LOWpython/demo.py261# promotes itself to a Balance object to make the addition valid.COMMENT
LOWcontrib/ledger-completion.bash1### AssumptionCOMMENT
LOWcontrib/ledger-completion.bash41 # Options are found in source code:COMMENT
LOWcontrib/ledger-completion.bash81 return 0COMMENT
LOWcontrib/non-profit-audit-reports/readcsv.py1#!/usr/bin/env python3COMMENT
LOWcontrib/non-profit-audit-reports/csv2ods.py1#!/usr/bin/env python3COMMENT
LOWcontrib/non-profit-audit-reports/ooolib2/__init__.py1"ooolib-python - Copyright (C) 2006-2009 Joseph Colton"COMMENT
LOWcontrib/iso4127-commodities/iso4217ledger.sh1#!/bin/shCOMMENT
LOWcontrib/raw/GenerateLatexExpeneseReport.pl121COMMENT
LOW.github/FUNDING.yml1# These are supported funding model platformsCOMMENT
LOW.github/workflows/nix-flake.yml21 - uses: actions/checkout@v7COMMENT
LOWlib/utfcpp/v4/source/utf8/core.h41#endifCOMMENT
LOWlib/utfcpp/v4/tests/noexceptionstests.cpp1#include "ftest.h"COMMENT
LOWlib/utfcpp/v4/tests/ftest.h221 std::cout << __FILE__ << ":" << __LINE__ << ": Failure\n"; \COMMENT
LOWlib/utfcpp/v4/tests/apitests.cpp1#include "ftest.h"COMMENT
LOWsrc/amount.h721#define AMOUNT_PRINT_COLORIZE 0x02COMMENT
LOWsrc/commodity.h121#define COMMODITY_NOMARKET 0x010 ///< Exclude from market-price valuations (-V/-X).COMMENT
LOWsrc/error.h101/// are separated by newlines. The parser calls this as it entersCOMMENT
LOWsrc/utils.h181std::size_t current_memory_size();COMMENT
LOWsrc/utils.h401#define SHOW_ERROR() \COMMENT
LOWsrc/utils.h461 } \COMMENT
LOWsrc/utils.h481#define DEBUG_STOP_(name) DEBUG_STOP_(name, _this_category)COMMENT
LOWsrc/utils.h501} // namespace ledgerCOMMENT
LOWsrc/post.h101public:COMMENT
LOWsrc/post.h281 * through the filter chain: running totals, display totals, sort keys,COMMENT
LOWsrc/op.h341 /// Compilation resolves identifiers (IDENT) to their definitions inCOMMENT
LOWsrc/op.h361 /// @param scope The runtime scope providing variable/function bindings.COMMENT
LOWsrc/op.h441 temp->set_function(fobj);COMMENT
LOWsrc/pool.h141 static std::shared_ptr<commodity_pool_t> current_pool;COMMENT
LOWsrc/pool.h161 commodity_t* find(const string& name);COMMENT
LOWsrc/pool.h181 /// @}COMMENT
LOWsrc/pool.h201 /// @brief Look up an annotated commodity by base commodity reference,COMMENT
LOWsrc/query.h341 /// @brief Scan a quoted or delimited pattern (`'...'`, `"..."`, `/.../`).COMMENT
LOWsrc/times.h121/// year for dates whose format lacks a year component (e.g., `01/15`).COMMENT
LOWsrc/times.h141/// Configurable so that `weekly` reports can begin on Monday, etc.COMMENT
13 more matches not shown…
Hyper-Verbose Identifiers44 hits · 44 pts
SeverityFileLineSnippetContext
LOWtest/python/PostingTest.py50 def test_posting_amount_value(self):CODE
LOWtest/python/PostingTest.py56 def test_posting_amount_with_cost(self):CODE
LOWtest/python/PostingTest.py65 def test_posting_account_name(self):CODE
LOWtest/python/PostingTest.py73 def test_posting_account_hierarchy(self):CODE
LOWtest/python/PostingTest.py111 def test_posting_given_cost_none(self):CODE
LOWtest/python/PostingTest.py116 def test_posting_has_tag_string(self):CODE
LOWtest/python/PostingTest.py124 def test_posting_get_tag_string(self):CODE
LOWtest/python/PostingTest.py132 def test_posting_get_tag_missing(self):CODE
LOWtest/python/PostingTest.py139 def test_posting_tag_inheritance(self):CODE
LOWtest/python/PostingTest.py172 def test_must_balance_regular(self):CODE
LOWtest/python/PostingTest.py177 def test_must_balance_virtual_balanced(self):CODE
LOWtest/python/PostingTest.py184 def test_must_balance_virtual_unbalanced(self):CODE
LOWtest/python/PostingTest.py203 def test_is_virtual_true_for_balanced_virtual(self):CODE
LOWtest/python/PostingTest.py210 def test_is_virtual_true_for_unbalanced_virtual(self):CODE
LOWtest/python/PostingTest.py249 def test_posting_state_cleared(self):CODE
LOWtest/python/PostingTest.py256 def test_posting_state_uncleared(self):CODE
LOWtest/python/PostingTest.py262 def test_posting_state_pending(self):CODE
LOWtest/python/PostingTest.py276 def test_posting_xact_reference(self):CODE
LOWtest/python/PostingTest.py284 def test_posting_xact_payee_different_transactions(self):CODE
LOWtest/python/PostingTest.py292 def test_posting_xdata_lifecycle(self):CODE
LOWtest/python/PostingTest.py343 def test_posting_iterator_on_xact(self):CODE
LOWtest/python/PostingTest.py353 def test_posting_iterator_counts(self):CODE
LOWtest/python/PostingTest.py363 def test_posting_balancing_amount(self):CODE
LOWtest/python/PostingTest.py369 def test_multiple_queries_xdata_stability(self):CODE
LOWtest/python/PostingTest.py539 def test_posting_no_assigned_amount(self):CODE
LOWtest/python/PostingTest.py155 def test_reported_account_default(self):CODE
LOWtest/python/PostingTest.py161 def test_set_reported_account(self):CODE
LOWtest/python/PostingTest.py304 def test_posting_xdata_create_after_clear(self):CODE
LOWtest/python/PostingTest.py382 def test_query_then_iterate_stability(self):CODE
LOWtest/python/PostingTest.py396 def test_sequential_queries_different_accounts(self):CODE
LOWtest/python/PostingTest.py410 def test_multiple_postings_same_query(self):CODE
LOWtest/python/PostingTest.py417 def test_posting_assigned_amount_none(self):CODE
LOWtest/python/PostingTest.py430 def test_posting_account_identity(self):CODE
LOWtest/python/PostingTest.py570 def test_transaction_level_tag_inherited(self):CODE
LOWtest/python/PostingTest.py578 def test_multiple_tags_on_posting(self):CODE
LOWtest/python/PostingTest.py604 def test_get_tag_value_content(self):CODE
LOWtest/python/PostingTest.py612 def test_get_tag_txn_value_content(self):CODE
LOWtest/python/PostingTest.py40 def test_basic_posting_access(self):STRING
LOWtest/python/PostingTest.py197 def test_is_virtual_false_for_real_posting(self):STRING
LOWtest/python/PostingTest.py531 def test_posting_assigned_amount(self):STRING
LOWtest/python/PostingTest.py223 def test_has_flags_post_virtual(self):STRING
LOWcmake/strip_pch_flags.py22def get_compiler_implicit_flags(compiler: str) -> list[str]:CODE
LOWcontrib/non-profit-audit-reports/ooolib2/__init__.py1067 def parse_content_start_element(self, name, attrs):CODE
LOWcontrib/non-profit-audit-reports/ooolib2/__init__.py1152 def parse_content_end_element(self, name):CODE
Deep Nesting23 hits · 22 pts
SeverityFileLineSnippetContext
LOWtest/DocTests.py47CODE
LOWtest/DocTests.py142CODE
LOWtest/CheckTexinfo.py20CODE
LOWtest/CheckTexinfo.py60CODE
LOWtest/RegressTests.py31CODE
LOWtest/RegressTests.py101CODE
LOWtest/snapshot.py356CODE
LOWtest/snapshot.py438CODE
LOWtest/snapshot.py837CODE
LOWtest/semantic/check_all.py63CODE
LOWtest/semantic/check_all.py133CODE
LOWtest/semantic/check_all.py159CODE
LOWtest/semantic/sweep.py154CODE
LOWcmake/strip_pch_flags.py22CODE
LOWcmake/strip_pch_flags.py94CODE
LOWcontrib/non-profit-audit-reports/csv2ods.py67CODE
LOWcontrib/non-profit-audit-reports/ooolib2/__init__.py420CODE
LOWcontrib/non-profit-audit-reports/ooolib2/__init__.py527CODE
LOWcontrib/non-profit-audit-reports/ooolib2/__init__.py542CODE
LOWcontrib/non-profit-audit-reports/ooolib2/__init__.py787CODE
LOWcontrib/non-profit-audit-reports/ooolib2/__init__.py1173CODE
LOWscripts/orchestrator.py98CODE
LOWscripts/orchestrator.py229CODE
Cross-Language Confusion2 hits · 12 pts
SeverityFileLineSnippetContext
HIGHtest/semantic/check_all.py196 " 'lake exe cache get && lake build'\n"CODE
HIGHpython/demo.py79# There are a few built-in commodities: null, %, h, m and s. Normally youCOMMENT
Excessive Try-Catch Wrapping8 hits · 11 pts
SeverityFileLineSnippetContext
MEDIUMbenchmark/compare_benchmarks.py34 print("Error: baseline has no benchmark results", file=sys.stderr)CODE
MEDIUMbenchmark/compare_benchmarks.py105 print(f"Error: baseline file not found: {args.baseline}", file=sys.stderr)CODE
MEDIUMbenchmark/compare_benchmarks.py108 print(f"Error: candidate file not found: {args.candidate}", file=sys.stderr)CODE
MEDIUMtest/snapshot.py843 print(f"Error: ledger binary not found: {args.ledger_binary}", file=sys.stderr)CODE
MEDIUMtest/snapshot.py846 print(f"Error: data file not found: {args.data_file}", file=sys.stderr)CODE
MEDIUMtest/snapshot.py875 print(f"Error: no combos found for command '{args.only_command}'", file=sys.stderr)CODE
LOWscripts/orchestrator.py196 except Exception as e:CODE
LOWscripts/orchestrator.py354 except Exception as e:CODE
Unused Imports13 hits · 11 pts
SeverityFileLineSnippetContext
LOWtest/CheckOptions.py5CODE
LOWtest/snapshot.py4CODE
LOWtest/python/PostingTest.py4CODE
LOWtest/python/PostingTest.py6CODE
LOWtest/python/PostingTest.py7CODE
LOWtest/python/JournalTest.py5CODE
LOWtest/python/TransactionTest.py4CODE
LOWtest/python/TransactionTest.py6CODE
LOWtest/python/TransactionTest.py7CODE
LOWtest/python/ValueTest.py6CODE
LOWtest/regress/1205.py9CODE
LOWtest/regress/B21BF389.py3CODE
LOWtest/regress/819.py17CODE
AI Slop Vocabulary3 hits · 7 pts
SeverityFileLineSnippetContext
MEDIUMtest/CheckEnvVars.py8# The standard test harness uses --args-only which skips env var processing,COMMENT
MEDIUMtest/python/PostingTest.py547 """Dedicated test case for comprehensive tag operations."""STRING
MEDIUMtest/semantic/check_all.py255 # absence is a harness error, not a quiet omission.COMMENT
Redundant / Tautological Comments3 hits · 4 pts
SeverityFileLineSnippetContext
LOWbenchmark/compare_benchmarks.py68 # Print results tableCOMMENT
LOWscripts/orchestrator.py155 # Check if test file was createdCOMMENT
LOWscripts/orchestrator.py184 # Check if a test file was partially created before timeoutCOMMENT
Slop Phrases1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUMpython/demo.py50# commodity without parsing an amount, you can use the methodCOMMENT
AI Structural Patterns2 hits · 2 pts
SeverityFileLineSnippetContext
LOWcontrib/getquote-uk.py13CODE
LOWcontrib/non-profit-audit-reports/ooolib2/__init__.py51CODE
Example Usage Blocks1 hit · 2 pts
SeverityFileLineSnippetContext
LOWbenchmark/profile.sh4# Usage:COMMENT
Fake / Example Data1 hit · 1 pts
SeverityFileLineSnippetContext
LOWbenchmark/gen_benchmark.py35 "Acme Corp", "Freelance Client", "Bank Interest",CODE