Repository Analysis

sharkdp/bat

A cat(1) clone with wings.

2.7 Likely human-written View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of sharkdp/bat, a Rust project with 59,708 GitHub stars. SynthScan v2.0 examined 61,771 lines of code across 451 source files, recording 174 pattern matches distributed across 12 syntactic categories. The overall adjusted score of 2.7 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.7
Adjusted Score
2.7
Raw Score
100%
Time Factor
2026-07-01
Last Push
59.7K
Stars
Rust
Language
61.8K
Lines of Code
451
Files
174
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 1HIGH 0MEDIUM 14LOW 159

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 174 distinct pattern matches across 12 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.

Hyper-Verbose Identifiers115 hits · 78 pts
SeverityFileLineSnippetContext
LOWtests/snapshots/generate_snapshots.py52def undo_sample_file_modification():CODE
LOWtests/syntax-tests/compare_highlighted_versions.py10def compare_highlighted_versions(root_old, root_new):CODE
LOWtests/syntax-tests/create_highlighted_versions.py43def create_highlighted_version(args):CODE
LOWtests/syntax-tests/create_highlighted_versions.py81def create_highlighted_versions(output_basepath):CODE
LOWtests/syntax-tests/source/Ruby/output.rb53 def find_repeated_substring_file(file_path)CODE
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py635 def test_ellipsis_subscript_assignment(self):CODE
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py642 def test_empty_subscript_assignment(self):CODE
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py649 def test_invalid_subscript_assignment(self):CODE
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py7317 def test_multiarray_writable_attributes_deletion(self):CODE
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py7326 def test_multiarray_not_writable_attributes_deletion(self):CODE
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py7334 def test_multiarray_flags_writable_attribute_deletion(self):CODE
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py7340 def test_multiarray_flags_not_writable_attribute_deletion(self):CODE
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py7450def test_flat_element_deletion():CODE
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py7461def test_scalar_element_deletion():CODE
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py7918 def test_empty_bstring_array_is_falsey(self):CODE
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py7921 def test_whitespace_bstring_array_is_falsey(self):CODE
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py7926 def test_all_null_bstring_array_is_falsey(self):CODE
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py7931 def test_null_inside_bstring_array_is_truthy(self):CODE
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py7967 def test_empty_ustring_array_is_falsey(self):CODE
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py7970 def test_whitespace_ustring_array_is_falsey(self):CODE
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py7975 def test_all_null_ustring_array_is_falsey(self):CODE
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py7980 def test_null_inside_ustring_array_is_truthy(self):CODE
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py121 def test_writeable_from_readonly(self):CODE
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py132 def test_writeable_from_buffer(self):CODE
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py161 def test_writeable_from_c_data(self):CODE
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py472 def test_assignment_broadcasting(self):CODE
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py532 def test_stringlike_empty_list(self):CODE
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py547 def test_longdouble_assignment(self):CODE
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py733 def test_invalid_subscript_assignment(self):CODE
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py761 def test_overlapping_assignment(self):CODE
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py899 def test_zeros_like_like_zeros(self):CODE
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py939 def test_sequence_non_homogenous(self):CODE
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py948 def test_non_sequence_sequence(self):CODE
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py1080 def test_array_of_ragged_array(self):CODE
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py1093 def test_deep_nonragged_object(self):CODE
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py1100 def test_subarray_field_access(self):CODE
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py1378 def test_structuredscalar_indexing(self):CODE
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py1440 def test_count_nonzero_unaligned(self):CODE
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py1555 def test_pickle_with_buffercallback(self):CODE
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py1792 def test_sort_complex_byte_swapping(self):CODE
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py2248 def test_searchsorted_unicode(self):CODE
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py2275 def test_searchsorted_with_invalid_sorter(self):CODE
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py2289 def test_searchsorted_with_sorter(self):CODE
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py2366 def test_searchsorted_return_type(self):CODE
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py2378 def test_argpartition_out_of_range(self):CODE
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py2389 def test_partition_out_of_range(self):CODE
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py2400 def test_argpartition_integer(self):CODE
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py2418 def test_partition_empty_array(self):CODE
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py2428 def test_argpartition_empty_array(self):CODE
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py2749 def test_partition_unicode_kind(self):CODE
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py2956 def test_dot_matmul_inner_array_casting_fails(self):CODE
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py3002 def test_diagonal_view_notwriteable(self):CODE
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py3297 def test__complex__should_not_work(self):CODE
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py3362 def test_ufunc_binop_interaction(self):CODE
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py3546 def test_ufunc_override_normalize_signature(self):CODE
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py3631 def test_pow_override_with_errors(self):CODE
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py3652 def test_pow_array_object_dtype(self):CODE
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py3685 def test_pos_array_ufunc_override(self):CODE
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py3698 def test_extension_incref_elide(self):CODE
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py3713 def test_extension_incref_elide_stack(self):CODE
55 more matches not shown…
Decorative Section Separators8 hits · 24 pts
SeverityFileLineSnippetContext
MEDIUMtests/syntax-tests/source/Bash/batgrep.sh2# -----------------------------------------------------------------------------COMMENT
MEDIUMtests/syntax-tests/source/Bash/batgrep.sh7# -----------------------------------------------------------------------------COMMENT
MEDIUMdiagnostics/info.sh24# -----------------------------------------------------------------------------COMMENT
MEDIUMdiagnostics/info.sh26# -----------------------------------------------------------------------------COMMENT
MEDIUMdiagnostics/info.sh143# -----------------------------------------------------------------------------COMMENT
MEDIUMdiagnostics/info.sh145# -----------------------------------------------------------------------------COMMENT
MEDIUMdiagnostics/info.sh224# -----------------------------------------------------------------------------COMMENT
MEDIUMdiagnostics/info.sh226# -----------------------------------------------------------------------------COMMENT
Over-Commented Block24 hits · 23 pts
SeverityFileLineSnippetContext
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py3701 #COMMENT
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py5441 # this needs definition as there are lots places along the lineCOMMENT
LOWtests/benchmarks/highlighting-speed-src/jquery.js1241 // Regex strategy adopted from Diego PeriniCOMMENT
LOWtests/benchmarks/highlighting-speed-src/jquery.js4081 // 1. The entire cache objectCOMMENT
LOWtests/benchmarks/highlighting-speed-src/jquery.js10301COMMENT
LOWtests/scripts/find-slow-to-highlight-files.py1#!/usr/bin/env python3COMMENT
LOWassets/syntaxes/02_Extra/syntax_test_requirements.txt41# ^^^^^ constant.otherCOMMENT
LOWassets/syntaxes/02_Extra/syntax_test_requirements.txt61# ^^^^^^^^^^^^^^^ - comment.lineCOMMENT
LOWassets/syntaxes/02_Extra/syntax_test_requirements.txt81#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ markup.underline.link.urlCOMMENT
LOWsrc/error.rs21 #[error("unable to detect syntax for {0}")]COMMENT
LOWsrc/terminal.rs21 0x04 => Color::Blue,COMMENT
LOWsrc/lib.rs1//! `bat` is a library to print syntax highlighted content.COMMENT
LOWsrc/theme.rs41COMMENT
LOWsrc/theme.rs61/// ```COMMENT
LOWsrc/style.rs181 ///COMMENT
LOWsrc/syntax_mapping.rs41COMMENT
LOWsrc/syntax_mapping.rs121 ///COMMENT
LOWsrc/vscreen.rs61COMMENT
LOWsrc/assets.rs121 file_name: impl AsRef<Path>,COMMENT
LOWsrc/nonprintable_notation.rs1/// How to print non-printable characters withCOMMENT
LOWsrc/bin/bat/config.rs61COMMENT
LOWsrc/syntax_mapping/builtin.rs21//COMMENT
LOWsrc/syntax_mapping/builtin.rs41// `GlobMatcher` for rules that they have previously visited.COMMENT
LOWsrc/assets/assets_metadata.rs41 ///COMMENT
Excessive Try-Catch Wrapping6 hits · 10 pts
SeverityFileLineSnippetContext
MEDIUMtests/syntax-tests/compare_highlighted_versions.py74 print("Error: files with changes have been found")CODE
MEDIUMtests/syntax-tests/source/Swift/test.swift161 print("Error creating a file \(destinationFileUrl) : \(writeError)")CODE
MEDIUMtests/syntax-tests/source/Swift/test.swift165 print("Error took place while downloading a file. Error description: %@", error?.localizedDescription);CODE
MEDIUM…hmarks/highlighting-speed-src/numpy_test_multiarray.py328def make_array(size, offset, strides):CODE
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py7457 except Exception:CODE
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py332 except Exception as e:CODE
Hallucination Indicators1 hit · 10 pts
SeverityFileLineSnippetContext
CRITICALtests/benchmarks/highlighting-speed-src/jquery.js7622jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) {CODE
Fake / Example Data8 hits · 8 pts
SeverityFileLineSnippetContext
LOWtests/integration_tests.rs3210 .write_stdin("Lorem Ipsum")CODE
LOWtests/integration_tests.rs3213 .stdout("\x1B[48;2;208;218;231mLorem Ipsum\x1B[0m")CODE
LOWtests/integration_tests.rs3230 .write_stdin("Lorem Ipsum")CODE
LOWtests/integration_tests.rs3233 .stdout("\x1B[48;2;33;48;67mLorem Ipsum\x1B[0m")CODE
LOWtests/integration_tests.rs4239 .args(["config", "user.email", "test@test.com"])CODE
LOWtests/syntax-tests/highlighted/HTML/test.html19 Lorem <strong>ODE
LOWtests/syntax-tests/source/HTML/test.html19 Lorem <strong>ipsum</strong> dolor sit amet consectetur adipisicingCODE
LOWtests/syntax-tests/source/PHP/test.php103$doe->setName('John Doe');CODE
Unused Imports3 hits · 3 pts
SeverityFileLineSnippetContext
LOWtests/syntax-tests/source/Python/battest.py1CODE
LOWtests/syntax-tests/source/Python/battest.py3CODE
LOWtests/syntax-tests/source/Python/battest.py4CODE
Self-Referential Comments1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUM…hmarks/highlighting-speed-src/numpy_test_multiarray.py3406 # Create an object with the given base, in the given module, with aCOMMENT
AI Slop Vocabulary1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUMtests/benchmarks/highlighting-speed-src/jquery.js10313// understands anonymous AMD modules. A named AMD is safest and most robustCOMMENT
Deep Nesting5 hits · 2 pts
SeverityFileLineSnippetContext
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py3210CODE
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py3362CODE
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py4477CODE
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py8413CODE
LOW…hmarks/highlighting-speed-src/numpy_test_multiarray.py3433CODE
Slop Phrases1 hit · 1 pts
SeverityFileLineSnippetContext
LOWtests/syntax-tests/create_highlighted_versions.py56 env["COLORTERM"] = "truecolor" # make sure to output 24bit colorsCODE
Overly Generic Function Names1 hit · 1 pts
SeverityFileLineSnippetContext
LOWtests/benchmarks/highlighting-speed-src/jquery.js4173function getData( data ) {CODE