Repository Analysis

harfbuzz/harfbuzz

HarfBuzz text shaping engine

3.0 Likely human-written View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of harfbuzz/harfbuzz, a C++ project with 5,918 GitHub stars. SynthScan v2.0 examined 105,913 lines of code across 319 source files, recording 138 pattern matches distributed across 9 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-13
Last Push
5.9K
Stars
C++
Language
105.9K
Lines of Code
319
Files
138
Pattern Hits
2026-07-14
Scan Date
0.02
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 6MEDIUM 57LOW 75

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

Decorative Section Separators56 hits · 209 pts
SeverityFileLineSnippetContext
MEDIUMsrc/ms-use/IndicSyllabicCategory-Additional.txt12# ================================================COMMENT
MEDIUMsrc/ms-use/IndicSyllabicCategory-Additional.txt14# ================================================COMMENT
MEDIUMsrc/ms-use/IndicSyllabicCategory-Additional.txt22# ================================================COMMENT
MEDIUMsrc/ms-use/IndicSyllabicCategory-Additional.txt28# ================================================COMMENT
MEDIUMsrc/ms-use/IndicSyllabicCategory-Additional.txt33# ================================================COMMENT
MEDIUMsrc/ms-use/IndicSyllabicCategory-Additional.txt38# ================================================COMMENT
MEDIUMsrc/ms-use/IndicSyllabicCategory-Additional.txt43# ================================================COMMENT
MEDIUMsrc/ms-use/IndicSyllabicCategory-Additional.txt48# ================================================COMMENT
MEDIUMsrc/ms-use/IndicSyllabicCategory-Additional.txt53# ================================================COMMENT
MEDIUMsrc/ms-use/IndicSyllabicCategory-Additional.txt59# ================================================COMMENT
MEDIUMsrc/ms-use/IndicSyllabicCategory-Additional.txt65# ================================================COMMENT
MEDIUMsrc/ms-use/IndicSyllabicCategory-Additional.txt72# ================================================COMMENT
MEDIUMsrc/ms-use/IndicSyllabicCategory-Additional.txt73# ================================================COMMENT
MEDIUMsrc/ms-use/IndicSyllabicCategory-Additional.txt75# ================================================COMMENT
MEDIUMsrc/ms-use/IndicSyllabicCategory-Additional.txt76# ================================================COMMENT
MEDIUMsrc/ms-use/IndicSyllabicCategory-Additional.txt134# ================================================COMMENT
MEDIUMsrc/ms-use/IndicSyllabicCategory-Additional.txt139# ================================================COMMENT
MEDIUMsrc/ms-use/IndicSyllabicCategory-Additional.txt144# ================================================COMMENT
MEDIUMsrc/ms-use/IndicSyllabicCategory-Additional.txt150# ================================================COMMENT
MEDIUMsrc/ms-use/IndicSyllabicCategory-Additional.txt190# ================================================COMMENT
MEDIUMsrc/ms-use/IndicSyllabicCategory-Additional.txt195# ================================================COMMENT
MEDIUMsrc/ms-use/IndicSyllabicCategory-Additional.txt205# ================================================COMMENT
MEDIUMsrc/ms-use/IndicSyllabicCategory-Additional.txt211# ================================================COMMENT
MEDIUMsrc/ms-use/IndicSyllabicCategory-Additional.txt216# ================================================COMMENT
MEDIUMsrc/ms-use/IndicSyllabicCategory-Additional.txt217# ================================================COMMENT
MEDIUMsrc/ms-use/IndicSyllabicCategory-Additional.txt219# ================================================COMMENT
MEDIUMsrc/ms-use/IndicSyllabicCategory-Additional.txt220# ================================================COMMENT
MEDIUMsrc/ms-use/IndicSyllabicCategory-Additional.txt228# ================================================COMMENT
MEDIUMsrc/ms-use/IndicSyllabicCategory-Additional.txt234# ================================================COMMENT
MEDIUMsrc/ms-use/IndicSyllabicCategory-Additional.txt244# ================================================COMMENT
MEDIUMsrc/ms-use/IndicSyllabicCategory-Additional.txt254# ================================================COMMENT
MEDIUMsrc/ms-use/IndicSyllabicCategory-Additional.txt259# ================================================COMMENT
MEDIUMsrc/ms-use/IndicSyllabicCategory-Additional.txt264# ================================================COMMENT
MEDIUMsrc/ms-use/IndicSyllabicCategory-Additional.txt269# ================================================COMMENT
MEDIUMsrc/ms-use/IndicSyllabicCategory-Additional.txt274# ================================================COMMENT
MEDIUMsrc/ms-use/IndicSyllabicCategory-Additional.txt163# ================================================COMMENT
MEDIUMsrc/ms-use/IndicSyllabicCategory-Additional.txt175# ================================================COMMENT
MEDIUMsrc/ms-use/IndicPositionalCategory-Additional.txt14# ================================================COMMENT
MEDIUMsrc/ms-use/IndicPositionalCategory-Additional.txt15# ================================================COMMENT
MEDIUMsrc/ms-use/IndicPositionalCategory-Additional.txt17# ================================================COMMENT
MEDIUMsrc/ms-use/IndicPositionalCategory-Additional.txt18# ================================================COMMENT
MEDIUMsrc/ms-use/IndicPositionalCategory-Additional.txt35# ================================================COMMENT
MEDIUMsrc/ms-use/IndicPositionalCategory-Additional.txt40# ================================================COMMENT
MEDIUMsrc/ms-use/IndicPositionalCategory-Additional.txt48# ================================================COMMENT
MEDIUMsrc/ms-use/IndicPositionalCategory-Additional.txt59# ================================================COMMENT
MEDIUMsrc/ms-use/IndicPositionalCategory-Additional.txt65# ================================================COMMENT
MEDIUMsrc/ms-use/IndicPositionalCategory-Additional.txt66# ================================================COMMENT
MEDIUMsrc/ms-use/IndicPositionalCategory-Additional.txt68# ================================================COMMENT
MEDIUMsrc/ms-use/IndicPositionalCategory-Additional.txt69# ================================================COMMENT
MEDIUMsrc/ms-use/IndicPositionalCategory-Additional.txt92# ================================================COMMENT
MEDIUMsrc/ms-use/IndicPositionalCategory-Additional.txt97# ================================================COMMENT
MEDIUMsrc/ms-use/IndicPositionalCategory-Additional.txt114# ================================================COMMENT
MEDIUMsrc/ms-use/IndicPositionalCategory-Additional.txt119# ================================================COMMENT
MEDIUMsrc/ms-use/IndicPositionalCategory-Additional.txt120# ================================================COMMENT
MEDIUMsrc/ms-use/IndicPositionalCategory-Additional.txt122# ================================================COMMENT
MEDIUMsrc/ms-use/IndicPositionalCategory-Additional.txt123# ================================================COMMENT
Cross-Language Confusion6 hits · 30 pts
SeverityFileLineSnippetContext
HIGHsrc/gen-tag-table.py990 print (' tags.push(%s); // %s' % (hb_tag_rust (tags[0]), ot.names[tags[0]]))CODE
HIGHsrc/gen-tag-table.py1031 print (' tags.push(%s); // %s' % (hb_tag_rust (tags[0]), ot.names[tags[0]]))CODE
HIGHsrc/gen-tag-table.py1247print (" if (!p || p >= limit || limit - p < %i) goto out;" % min_subtag_len)CODE
HIGHsrc/gen-tag-table.py1275 print (' for (i = 0; i < %s && i < *count; i++)' % len (tags))CODE
HIGHsrc/gen-tag-table.py1327 print (' for (i = 0; i < %s && i < *count; i++)' % len (tags))CODE
HIGHsrc/gen-vowel-constraints.py308 print (' for (buffer->idx = 0; buffer->idx + 1 < count && buffer->successful;)')CODE
Over-Commented Block22 hits · 22 pts
SeverityFileLineSnippetContext
LOWtest/api/test-c.c41#include <hb-coretext.h>COMMENT
LOWtest/api/test-c.c61#include <hb-graphite2.h>COMMENT
LOWutil/hb-fc-list.c21 * PERFORMANCE OF THIS SOFTWARE.COMMENT
LOWutil/hb-fc-list.c41#define HAVE_GETOPT 1COMMENT
LOWutil/gpu/demo-common.h21#include <algorithm>COMMENT
LOWutil/gpu/web/config-override.h1/* Re-enable features that HB_LEAN disables but the GPU demo needs. */COMMENT
LOWutil/gpu/web/gl-stub.h21/* Constants */COMMENT
LOWutil/gpu/web/gl-stub.h61#define GLFW_REPEAT 2COMMENT
LOWutil/gpu/web/gl-stub.h81#define GLFW_KEY_F 70COMMENT
LOWsrc/hb-common.h41# ifdef __cplusplusCOMMENT
LOWsrc/hb-common.h61typedef unsigned __int64 uint64_t;COMMENT
LOWsrc/hb-ot.h21 * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TOCOMMENT
LOWsrc/hb-wasm-api.h41# define HB_WASM_END_DECLS }COMMENT
LOWsrc/hb-wasm-api.h61#define HB_WASM_EXEC_ENVCOMMENT
LOWsrc/hb.h21 * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TOCOMMENT
LOWsrc/hb.h41#include "hb-shape.h"COMMENT
LOWsrc/gen-ucd-table.py41# General_Category (gc), Canonical_Combining_Class (ccc),COMMENT
LOWsrc/ms-use/IndicSyllabicCategory-Additional.txt1# Override values For Indic_Syllabic_CategoryCOMMENT
LOWsrc/ms-use/IndicPositionalCategory-Additional.txt1# Override values For Indic_Positional_CategoryCOMMENT
LOWsrc/rust/hb.rs1#![allow(non_camel_case_types)]COMMENT
LOWsrc/wasm/rust/harfbuzz-wasm/src/lib.rs1#![warn(missing_docs)]COMMENT
LOWsrc/wasm/rust/harfbuzz-wasm/src/lib.rs241pub trait BufferItem {COMMENT
Deep Nesting17 hits · 17 pts
SeverityFileLineSnippetContext
LOWtest/subset/subset_test_suite.py123CODE
LOWtest/shape/hb_test_tools.py79CODE
LOWtest/shape/hb_test_tools.py135CODE
LOWtest/shape/hb_test_tools.py225CODE
LOWtest/shape/hb_test_tools.py347CODE
LOWtest/shape/hb_test_tools.py444CODE
LOWtest/fuzzing/decode-seed.py115CODE
LOWtest/fuzzing/record-subset-test.py173CODE
LOWsrc/justify.py164CODE
LOWsrc/gen-arabic-table.py150CODE
LOWsrc/gen-tag-table.py1357CODE
LOWsrc/gen-tag-table.py360CODE
LOWsrc/gen-tag-table.py424CODE
LOWsrc/gen-tag-table.py473CODE
LOWsrc/gen-tag-table.py571CODE
LOWsrc/gen-vowel-constraints.py92CODE
LOWsrc/gen-vowel-constraints.py134CODE
Hyper-Verbose Identifiers17 hits · 16 pts
SeverityFileLineSnippetContext
LOWtest/subset/run-tests.py191def open_subset_batch_process():CODE
LOWtest/shape/hb_test_tools.py293 def filter_printer_function_no_newline (filter_callback):CODE
LOWtest/shape/hb_test_tools.py347 def filter_multiple_strings_or_stdin (callback, mnemonic, \CODE
LOWtest/fuzzing/hb_fuzzing_tools.py102def emit_pin_all_axes_to_default(ops: bytearray) -> None:CODE
LOWtest/fuzzing/record-subset-test.py163def handle_file_backed_set_option(ops: bytearray, name: str, path: str) -> None:STRING
LOWtest/vector/run-tests.py36def open_vector_batch_process():CODE
LOWtest/vector/run-tests.py52def close_vector_batch_process(vector_process):CODE
LOWsrc/gen-tag-table.py473 def inherit_from_macrolanguages (self):CODE
LOWsrc/gen-tag-table.py654 def remove_extra_macrolanguages (self):CODE
LOWsrc/gen-tag-table.py900 def language_name_intersection_rust (a, b):CODE
LOWsrc/gen-tag-table.py903 def get_matching_language_name_rust (intersection, candidates):CODE
LOWsrc/gen-tag-table.py959 def print_subtag_matches_rust (subtag, new_line):CODE
LOWsrc/gen-tag-table.py1094def language_name_intersection (a, b):CODE
LOWsrc/gen-tag-table.py1108def get_matching_language_name (intersection, candidates):CODE
LOWsrc/gen-tag-table.py1357def verify_disambiguation_dict ():CODE
LOWsrc/hb-unicode.h354typedef hb_unicode_combining_class_t (*hb_unicode_combining_class_func_t) (hb_unicode_funcs_t *ufuncs,CODE
LOWsrc/hb-unicode.h372typedef hb_unicode_general_category_t (*hb_unicode_general_category_func_t) (hb_unicode_funcs_t *ufuncs,CODE
Unused Imports10 hits · 10 pts
SeverityFileLineSnippetContext
LOWtest/subset/run-repack-tests.py6CODE
LOWtest/subset/run-repack-tests.py8CODE
LOWtest/subset/run-repack-tests.py13CODE
LOWtest/subset/run-tests.py8CODE
LOWtest/shape/hb_test_tools.py4CODE
LOWtest/shape/data/text-rendering-tests/update.py3CODE
LOWtest/shape/data/text-rendering-tests/update.py3CODE
LOWtest/fuzzing/decode-seed.py8CODE
LOWutil/gpu/gen-default-texts.py5CODE
LOWsrc/gen-arabic-joining-list.py10CODE
Fake / Example Data6 hits · 6 pts
SeverityFileLineSnippetContext
LOWutil/gpu/default-text.txt1Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam tincidunt nibh quis semper malesuada. Mauris sit amet meCODE
LOWutil/gpu/default-text.txt1Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam tincidunt nibh quis semper malesuada. Mauris sit amet meCODE
LOWutil/gpu/web/dom.html26scene.textContent = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam tincidunt nibh quis semper malesuadCODE
LOWutil/gpu/web/dom.html26scene.textContent = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam tincidunt nibh quis semper malesuadCODE
LOWperf/texts/en-paragraph.txt1Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam tincidunt nibh quis semper malesuada. Mauris sit amet meCODE
LOWperf/texts/en-paragraph.txt1Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam tincidunt nibh quis semper malesuada. Mauris sit amet meCODE
Excessive Try-Catch Wrapping3 hits · 3 pts
SeverityFileLineSnippetContext
LOWtest/subset/run-repack-tests.py80 except Exception as e:CODE
LOWtest/subset/run-tests.py130 except Exception as e:CODE
LOWtest/subset/run-tests.py139 except Exception as e:CODE
Slop Phrases1 hit · 2 pts
SeverityFileLineSnippetContext
MEDIUMdocs/usermanual-clusters.xml262 As mentioned earlier, client programs using HarfBuzz oftenCODE