A cat(1) clone with wings.
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).
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.
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.
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.
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.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/snapshots/generate_snapshots.py | 52 | def undo_sample_file_modification(): | CODE |
| LOW | tests/syntax-tests/compare_highlighted_versions.py | 10 | def compare_highlighted_versions(root_old, root_new): | CODE |
| LOW | tests/syntax-tests/create_highlighted_versions.py | 43 | def create_highlighted_version(args): | CODE |
| LOW | tests/syntax-tests/create_highlighted_versions.py | 81 | def create_highlighted_versions(output_basepath): | CODE |
| LOW | tests/syntax-tests/source/Ruby/output.rb | 53 | def find_repeated_substring_file(file_path) | CODE |
| LOW⚡ | …hmarks/highlighting-speed-src/numpy_test_multiarray.py | 635 | def test_ellipsis_subscript_assignment(self): | CODE |
| LOW⚡ | …hmarks/highlighting-speed-src/numpy_test_multiarray.py | 642 | def test_empty_subscript_assignment(self): | CODE |
| LOW⚡ | …hmarks/highlighting-speed-src/numpy_test_multiarray.py | 649 | def test_invalid_subscript_assignment(self): | CODE |
| LOW⚡ | …hmarks/highlighting-speed-src/numpy_test_multiarray.py | 7317 | def test_multiarray_writable_attributes_deletion(self): | CODE |
| LOW⚡ | …hmarks/highlighting-speed-src/numpy_test_multiarray.py | 7326 | def test_multiarray_not_writable_attributes_deletion(self): | CODE |
| LOW⚡ | …hmarks/highlighting-speed-src/numpy_test_multiarray.py | 7334 | def test_multiarray_flags_writable_attribute_deletion(self): | CODE |
| LOW⚡ | …hmarks/highlighting-speed-src/numpy_test_multiarray.py | 7340 | def test_multiarray_flags_not_writable_attribute_deletion(self): | CODE |
| LOW⚡ | …hmarks/highlighting-speed-src/numpy_test_multiarray.py | 7450 | def test_flat_element_deletion(): | CODE |
| LOW⚡ | …hmarks/highlighting-speed-src/numpy_test_multiarray.py | 7461 | def test_scalar_element_deletion(): | CODE |
| LOW⚡ | …hmarks/highlighting-speed-src/numpy_test_multiarray.py | 7918 | def test_empty_bstring_array_is_falsey(self): | CODE |
| LOW⚡ | …hmarks/highlighting-speed-src/numpy_test_multiarray.py | 7921 | def test_whitespace_bstring_array_is_falsey(self): | CODE |
| LOW⚡ | …hmarks/highlighting-speed-src/numpy_test_multiarray.py | 7926 | def test_all_null_bstring_array_is_falsey(self): | CODE |
| LOW⚡ | …hmarks/highlighting-speed-src/numpy_test_multiarray.py | 7931 | def test_null_inside_bstring_array_is_truthy(self): | CODE |
| LOW⚡ | …hmarks/highlighting-speed-src/numpy_test_multiarray.py | 7967 | def test_empty_ustring_array_is_falsey(self): | CODE |
| LOW⚡ | …hmarks/highlighting-speed-src/numpy_test_multiarray.py | 7970 | def test_whitespace_ustring_array_is_falsey(self): | CODE |
| LOW⚡ | …hmarks/highlighting-speed-src/numpy_test_multiarray.py | 7975 | def test_all_null_ustring_array_is_falsey(self): | CODE |
| LOW⚡ | …hmarks/highlighting-speed-src/numpy_test_multiarray.py | 7980 | def test_null_inside_ustring_array_is_truthy(self): | CODE |
| LOW | …hmarks/highlighting-speed-src/numpy_test_multiarray.py | 121 | def test_writeable_from_readonly(self): | CODE |
| LOW | …hmarks/highlighting-speed-src/numpy_test_multiarray.py | 132 | def test_writeable_from_buffer(self): | CODE |
| LOW | …hmarks/highlighting-speed-src/numpy_test_multiarray.py | 161 | def test_writeable_from_c_data(self): | CODE |
| LOW | …hmarks/highlighting-speed-src/numpy_test_multiarray.py | 472 | def test_assignment_broadcasting(self): | CODE |
| LOW | …hmarks/highlighting-speed-src/numpy_test_multiarray.py | 532 | def test_stringlike_empty_list(self): | CODE |
| LOW | …hmarks/highlighting-speed-src/numpy_test_multiarray.py | 547 | def test_longdouble_assignment(self): | CODE |
| LOW | …hmarks/highlighting-speed-src/numpy_test_multiarray.py | 733 | def test_invalid_subscript_assignment(self): | CODE |
| LOW | …hmarks/highlighting-speed-src/numpy_test_multiarray.py | 761 | def test_overlapping_assignment(self): | CODE |
| LOW | …hmarks/highlighting-speed-src/numpy_test_multiarray.py | 899 | def test_zeros_like_like_zeros(self): | CODE |
| LOW | …hmarks/highlighting-speed-src/numpy_test_multiarray.py | 939 | def test_sequence_non_homogenous(self): | CODE |
| LOW | …hmarks/highlighting-speed-src/numpy_test_multiarray.py | 948 | def test_non_sequence_sequence(self): | CODE |
| LOW | …hmarks/highlighting-speed-src/numpy_test_multiarray.py | 1080 | def test_array_of_ragged_array(self): | CODE |
| LOW | …hmarks/highlighting-speed-src/numpy_test_multiarray.py | 1093 | def test_deep_nonragged_object(self): | CODE |
| LOW | …hmarks/highlighting-speed-src/numpy_test_multiarray.py | 1100 | def test_subarray_field_access(self): | CODE |
| LOW | …hmarks/highlighting-speed-src/numpy_test_multiarray.py | 1378 | def test_structuredscalar_indexing(self): | CODE |
| LOW | …hmarks/highlighting-speed-src/numpy_test_multiarray.py | 1440 | def test_count_nonzero_unaligned(self): | CODE |
| LOW | …hmarks/highlighting-speed-src/numpy_test_multiarray.py | 1555 | def test_pickle_with_buffercallback(self): | CODE |
| LOW | …hmarks/highlighting-speed-src/numpy_test_multiarray.py | 1792 | def test_sort_complex_byte_swapping(self): | CODE |
| LOW | …hmarks/highlighting-speed-src/numpy_test_multiarray.py | 2248 | def test_searchsorted_unicode(self): | CODE |
| LOW | …hmarks/highlighting-speed-src/numpy_test_multiarray.py | 2275 | def test_searchsorted_with_invalid_sorter(self): | CODE |
| LOW | …hmarks/highlighting-speed-src/numpy_test_multiarray.py | 2289 | def test_searchsorted_with_sorter(self): | CODE |
| LOW | …hmarks/highlighting-speed-src/numpy_test_multiarray.py | 2366 | def test_searchsorted_return_type(self): | CODE |
| LOW | …hmarks/highlighting-speed-src/numpy_test_multiarray.py | 2378 | def test_argpartition_out_of_range(self): | CODE |
| LOW | …hmarks/highlighting-speed-src/numpy_test_multiarray.py | 2389 | def test_partition_out_of_range(self): | CODE |
| LOW | …hmarks/highlighting-speed-src/numpy_test_multiarray.py | 2400 | def test_argpartition_integer(self): | CODE |
| LOW | …hmarks/highlighting-speed-src/numpy_test_multiarray.py | 2418 | def test_partition_empty_array(self): | CODE |
| LOW | …hmarks/highlighting-speed-src/numpy_test_multiarray.py | 2428 | def test_argpartition_empty_array(self): | CODE |
| LOW | …hmarks/highlighting-speed-src/numpy_test_multiarray.py | 2749 | def test_partition_unicode_kind(self): | CODE |
| LOW | …hmarks/highlighting-speed-src/numpy_test_multiarray.py | 2956 | def test_dot_matmul_inner_array_casting_fails(self): | CODE |
| LOW | …hmarks/highlighting-speed-src/numpy_test_multiarray.py | 3002 | def test_diagonal_view_notwriteable(self): | CODE |
| LOW | …hmarks/highlighting-speed-src/numpy_test_multiarray.py | 3297 | def test__complex__should_not_work(self): | CODE |
| LOW | …hmarks/highlighting-speed-src/numpy_test_multiarray.py | 3362 | def test_ufunc_binop_interaction(self): | CODE |
| LOW | …hmarks/highlighting-speed-src/numpy_test_multiarray.py | 3546 | def test_ufunc_override_normalize_signature(self): | CODE |
| LOW | …hmarks/highlighting-speed-src/numpy_test_multiarray.py | 3631 | def test_pow_override_with_errors(self): | CODE |
| LOW | …hmarks/highlighting-speed-src/numpy_test_multiarray.py | 3652 | def test_pow_array_object_dtype(self): | CODE |
| LOW | …hmarks/highlighting-speed-src/numpy_test_multiarray.py | 3685 | def test_pos_array_ufunc_override(self): | CODE |
| LOW | …hmarks/highlighting-speed-src/numpy_test_multiarray.py | 3698 | def test_extension_incref_elide(self): | CODE |
| LOW | …hmarks/highlighting-speed-src/numpy_test_multiarray.py | 3713 | def test_extension_incref_elide_stack(self): | CODE |
| 55 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | tests/syntax-tests/source/Bash/batgrep.sh | 2 | # ----------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/syntax-tests/source/Bash/batgrep.sh | 7 | # ----------------------------------------------------------------------------- | COMMENT |
| MEDIUM | diagnostics/info.sh | 24 | # ----------------------------------------------------------------------------- | COMMENT |
| MEDIUM | diagnostics/info.sh | 26 | # ----------------------------------------------------------------------------- | COMMENT |
| MEDIUM | diagnostics/info.sh | 143 | # ----------------------------------------------------------------------------- | COMMENT |
| MEDIUM | diagnostics/info.sh | 145 | # ----------------------------------------------------------------------------- | COMMENT |
| MEDIUM | diagnostics/info.sh | 224 | # ----------------------------------------------------------------------------- | COMMENT |
| MEDIUM | diagnostics/info.sh | 226 | # ----------------------------------------------------------------------------- | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | …hmarks/highlighting-speed-src/numpy_test_multiarray.py | 3701 | # | COMMENT |
| LOW | …hmarks/highlighting-speed-src/numpy_test_multiarray.py | 5441 | # this needs definition as there are lots places along the line | COMMENT |
| LOW | tests/benchmarks/highlighting-speed-src/jquery.js | 1241 | // Regex strategy adopted from Diego Perini | COMMENT |
| LOW | tests/benchmarks/highlighting-speed-src/jquery.js | 4081 | // 1. The entire cache object | COMMENT |
| LOW | tests/benchmarks/highlighting-speed-src/jquery.js | 10301 | COMMENT | |
| LOW | tests/scripts/find-slow-to-highlight-files.py | 1 | #!/usr/bin/env python3 | COMMENT |
| LOW | assets/syntaxes/02_Extra/syntax_test_requirements.txt | 41 | # ^^^^^ constant.other | COMMENT |
| LOW | assets/syntaxes/02_Extra/syntax_test_requirements.txt | 61 | # ^^^^^^^^^^^^^^^ - comment.line | COMMENT |
| LOW | assets/syntaxes/02_Extra/syntax_test_requirements.txt | 81 | #^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ markup.underline.link.url | COMMENT |
| LOW | src/error.rs | 21 | #[error("unable to detect syntax for {0}")] | COMMENT |
| LOW | src/terminal.rs | 21 | 0x04 => Color::Blue, | COMMENT |
| LOW | src/lib.rs | 1 | //! `bat` is a library to print syntax highlighted content. | COMMENT |
| LOW | src/theme.rs | 41 | COMMENT | |
| LOW | src/theme.rs | 61 | /// ``` | COMMENT |
| LOW | src/style.rs | 181 | /// | COMMENT |
| LOW | src/syntax_mapping.rs | 41 | COMMENT | |
| LOW | src/syntax_mapping.rs | 121 | /// | COMMENT |
| LOW | src/vscreen.rs | 61 | COMMENT | |
| LOW | src/assets.rs | 121 | file_name: impl AsRef<Path>, | COMMENT |
| LOW | src/nonprintable_notation.rs | 1 | /// How to print non-printable characters with | COMMENT |
| LOW | src/bin/bat/config.rs | 61 | COMMENT | |
| LOW | src/syntax_mapping/builtin.rs | 21 | // | COMMENT |
| LOW | src/syntax_mapping/builtin.rs | 41 | // `GlobMatcher` for rules that they have previously visited. | COMMENT |
| LOW | src/assets/assets_metadata.rs | 41 | /// | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | tests/syntax-tests/compare_highlighted_versions.py | 74 | print("Error: files with changes have been found") | CODE |
| MEDIUM | tests/syntax-tests/source/Swift/test.swift | 161 | print("Error creating a file \(destinationFileUrl) : \(writeError)") | CODE |
| MEDIUM | tests/syntax-tests/source/Swift/test.swift | 165 | print("Error took place while downloading a file. Error description: %@", error?.localizedDescription); | CODE |
| MEDIUM | …hmarks/highlighting-speed-src/numpy_test_multiarray.py | 328 | def make_array(size, offset, strides): | CODE |
| LOW⚡ | …hmarks/highlighting-speed-src/numpy_test_multiarray.py | 7457 | except Exception: | CODE |
| LOW | …hmarks/highlighting-speed-src/numpy_test_multiarray.py | 332 | except Exception as e: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| CRITICAL | tests/benchmarks/highlighting-speed-src/jquery.js | 7622 | jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) { | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/integration_tests.rs | 3210 | .write_stdin("Lorem Ipsum") | CODE |
| LOW | tests/integration_tests.rs | 3213 | .stdout("\x1B[48;2;208;218;231mLorem Ipsum\x1B[0m") | CODE |
| LOW | tests/integration_tests.rs | 3230 | .write_stdin("Lorem Ipsum") | CODE |
| LOW | tests/integration_tests.rs | 3233 | .stdout("\x1B[48;2;33;48;67mLorem Ipsum\x1B[0m") | CODE |
| LOW | tests/integration_tests.rs | 4239 | .args(["config", "user.email", "test@test.com"]) | CODE |
| LOW | tests/syntax-tests/highlighted/HTML/test.html | 19 | [38;2;248;248;242m Lorem [0m[38;2;255;255;255m<[0m[38;2;249;38;114mstrong[0m[38;2;255;255;255m>[0m[38;2; | CODE |
| LOW | tests/syntax-tests/source/HTML/test.html | 19 | Lorem <strong>ipsum</strong> dolor sit amet consectetur adipisicing | CODE |
| LOW | tests/syntax-tests/source/PHP/test.php | 103 | $doe->setName('John Doe'); | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/syntax-tests/source/Python/battest.py | 1 | CODE | |
| LOW | tests/syntax-tests/source/Python/battest.py | 3 | CODE | |
| LOW | tests/syntax-tests/source/Python/battest.py | 4 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | …hmarks/highlighting-speed-src/numpy_test_multiarray.py | 3406 | # Create an object with the given base, in the given module, with a | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | tests/benchmarks/highlighting-speed-src/jquery.js | 10313 | // understands anonymous AMD modules. A named AMD is safest and most robust | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | …hmarks/highlighting-speed-src/numpy_test_multiarray.py | 3210 | CODE | |
| LOW | …hmarks/highlighting-speed-src/numpy_test_multiarray.py | 3362 | CODE | |
| LOW | …hmarks/highlighting-speed-src/numpy_test_multiarray.py | 4477 | CODE | |
| LOW | …hmarks/highlighting-speed-src/numpy_test_multiarray.py | 8413 | CODE | |
| LOW | …hmarks/highlighting-speed-src/numpy_test_multiarray.py | 3433 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/syntax-tests/create_highlighted_versions.py | 56 | env["COLORTERM"] = "truecolor" # make sure to output 24bit colors | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/benchmarks/highlighting-speed-src/jquery.js | 4173 | function getData( data ) { | CODE |