Repository Analysis

beautifier/js-beautify

Beautifier for javascript

5.0 Low AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of beautifier/js-beautify, a JavaScript project with 8,984 GitHub stars. SynthScan v2.0 examined 40,833 lines of code across 146 source files, recording 149 pattern matches distributed across 11 syntactic categories. The overall adjusted score of 5.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).

5.0
Adjusted Score
5.0
Raw Score
100%
Time Factor
2026-07-14
Last Push
9.0K
Stars
JavaScript
Language
40.8K
Lines of Code
146
Files
149
Pattern Hits
2026-07-14
Scan Date
0.06
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 9MEDIUM 4LOW 136

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 149 distinct pattern matches across 11 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 Block52 hits · 52 pts
SeverityFileLineSnippetContext
LOWtest/resources/underscore-min.js1// Underscore.js 1.7.0COMMENT
LOWtest/data/css/tests.js741 { name: "indent_size", value: "4" },COMMENT
LOWtest/data/css/tests.js761 // 'var a = {',COMMENT
LOWtest/data/css/tests.js781 // ],COMMENT
LOWtest/data/css/tests.js801 // ' ten : 10',COMMENT
LOWtest/data/css/tests.js821 // ' ten : 10',COMMENT
LOWtest/data/css/tests.js841 // ' ten : 10',COMMENT
LOWtest/data/css/tests.js901 ' two : 2,',COMMENT
LOWtest/data/css/tests.js921 // '};'COMMENT
LOWtest/data/css/tests.js961 ]COMMENT
LOWtest/data/css/tests.js981 // '.div {',COMMENT
LOWtest/data/css/tests.js1001 // ' /* beautify ignore:end */',COMMENT
LOWtest/data/css/tests.js1021 // '}'COMMENT
LOWtest/data/css/tests.js1041 // ' /* beautify ignore:start preserve:start */',COMMENT
LOWtest/data/javascript/tests.js61 // handlebars {{{ ... }}} and {{ ... }} and {{# ... }} and {{! ... }} and {{!-- --}} COMMENT
LOWtest/data/javascript/tests.js5181 // ' {',COMMENT
LOWtest/data/javascript/tests.js5201 // ' id: "a",',COMMENT
LOWpython/cssbeautifier/_main.py1#COMMENT
LOWpython/cssbeautifier/__init__.py1#COMMENT
LOWpython/cssbeautifier/css/options.py1#COMMENT
LOWpython/cssbeautifier/css/beautifier.py21COMMENT
LOWpython/jsbeautifier/__init__.py21# Permission is hereby granted, free of charge, to any personCOMMENT
LOWpython/jsbeautifier/__init__.py41# Originally written by Einar Lielmanis et al.,COMMENT
LOWpython/jsbeautifier/core/options.py1# The MIT License (MIT)COMMENT
LOWpython/jsbeautifier/core/token.py1# The MIT License (MIT)COMMENT
LOWpython/jsbeautifier/core/tokenstream.py1# The MIT License (MIT)COMMENT
LOWpython/jsbeautifier/core/pattern.py1# The MIT License (MIT)COMMENT
LOWpython/jsbeautifier/core/whitespacepattern.py1# The MIT License (MIT)COMMENT
LOWpython/jsbeautifier/core/templatablepattern.py1# The MIT License (MIT)COMMENT
LOWpython/jsbeautifier/core/tokenizer.py1# The MIT License (MIT)COMMENT
LOWpython/jsbeautifier/core/directives.py1# The MIT License (MIT)COMMENT
LOWpython/jsbeautifier/core/inputscanner.py1# The MIT License (MIT)COMMENT
LOWpython/jsbeautifier/core/output.py1# The MIT License (MIT)COMMENT
LOWpython/jsbeautifier/cli/__init__.py21# obtaining a copy of this software and associated documentation filesCOMMENT
LOWpython/jsbeautifier/unpackers/urlencode.py1#COMMENT
LOWpython/jsbeautifier/unpackers/packer.py1#COMMENT
LOWpython/jsbeautifier/unpackers/myobfuscate.py1#COMMENT
LOWpython/jsbeautifier/unpackers/javascriptobfuscator.py1#COMMENT
LOWpython/jsbeautifier/unpackers/evalbased.py1#COMMENT
LOWpython/jsbeautifier/unpackers/tests/__init__.py1# Empty file :)COMMENT
LOW…sbeautifier/unpackers/tests/test-myobfuscate-output.js1//COMMENT
LOWpython/jsbeautifier/javascript/options.py1# The MIT License (MIT)COMMENT
LOWpython/jsbeautifier/javascript/tokenizer.py1# The MIT License (MIT)COMMENT
LOWpython/jsbeautifier/javascript/acorn.py1import reCOMMENT
LOWpython/jsbeautifier/javascript/beautifier.py1# The MIT License (MIT)COMMENT
LOWpython/jsbeautifier/javascript/beautifier.py581 # (c || d));COMMENT
LOWjs/test/sanitytest.js1//COMMENT
LOWjs/src/unpackers/javascriptobfuscator_unpacker.js21 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERSCOMMENT
LOWjs/src/unpackers/p_a_c_k_e_r_unpacker.js21 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERSCOMMENT
LOWjs/src/javascript/acorn.js1/* jshint node: true, curly: false */COMMENT
LOW.github/workflows/codeql-analysis.yml1# For most projects, this workflow file will not need changing; you simply needCOMMENT
LOW.github/workflows/codeql-analysis.yml41 - name: Initialize CodeQLCOMMENT
Cross-Language Confusion8 hits · 50 pts
SeverityFileLineSnippetContext
HIGHpython/jsbeautifier/core/output.py261 self.current_line.push(last_item)CODE
HIGHpython/jsbeautifier/core/output.py266 sweet_code = "\n".join(line.toString() for line in self.__lines)CODE
HIGHpython/jsbeautifier/core/output.py292 self.current_line.push(token.whitespace_before)CODE
HIGHpython/jsbeautifier/core/output.py293 self.current_line.push(token.text)CODE
HIGHpython/jsbeautifier/core/output.py300 self.current_line.push(printable_token)CODE
HIGHpython/jsbeautifier/core/output.py309 self.current_line.push(" ")CODE
HIGHpython/jsbeautifier/javascript/beautifier.py354 line.push(current_token.whitespace_before)CODE
HIGHpython/jsbeautifier/javascript/beautifier.py377 self._output.previous_line.push(popped)CODE
Unused Imports29 hits · 29 pts
SeverityFileLineSnippetContext
LOWpython/test-perf-jsbeautifier.py3CODE
LOWpython/cssbeautifier/_main.py27CODE
LOWpython/cssbeautifier/_main.py28CODE
LOWpython/cssbeautifier/_main.py29CODE
LOWpython/cssbeautifier/_main.py30CODE
LOWpython/cssbeautifier/_main.py33CODE
LOWpython/jsbeautifier/__init__.py2CODE
LOWpython/jsbeautifier/__init__.py3CODE
LOWpython/jsbeautifier/__init__.py4CODE
LOWpython/jsbeautifier/__init__.py6CODE
LOWpython/jsbeautifier/__init__.py8CODE
LOWpython/jsbeautifier/__init__.py9CODE
LOWpython/jsbeautifier/__init__.py10CODE
LOWpython/jsbeautifier/__init__.py12CODE
LOWpython/jsbeautifier/core/tokenstream.py25CODE
LOWpython/jsbeautifier/core/tokenstream.py26CODE
LOWpython/jsbeautifier/core/tokenstream.py27CODE
LOWpython/jsbeautifier/core/whitespacepattern.py25CODE
LOWpython/jsbeautifier/core/tokenizer.py29CODE
LOWpython/jsbeautifier/tests/core/test_options.py1CODE
LOWpython/jsbeautifier/cli/__init__.py5CODE
LOWpython/jsbeautifier/cli/__init__.py6CODE
LOWpython/jsbeautifier/cli/__init__.py7CODE
LOWpython/jsbeautifier/cli/__init__.py11CODE
LOWpython/jsbeautifier/cli/__init__.py12CODE
LOWpython/jsbeautifier/cli/__init__.py13CODE
LOWpython/jsbeautifier/unpackers/packer.py17CODE
LOWpython/jsbeautifier/javascript/beautifier.py26CODE
LOWpython/jsbeautifier/javascript/beautifier.py27CODE
Deep Nesting23 hits · 23 pts
SeverityFileLineSnippetContext
LOWpython/cssbeautifier/_main.py100CODE
LOWpython/cssbeautifier/css/beautifier.py147CODE
LOWpython/cssbeautifier/css/beautifier.py184CODE
LOWpython/jsbeautifier/__init__.py154CODE
LOWpython/jsbeautifier/core/templatablepattern.py149CODE
LOWpython/jsbeautifier/cli/__init__.py53CODE
LOWpython/jsbeautifier/cli/__init__.py131CODE
LOWpython/jsbeautifier/cli/__init__.py189CODE
LOWpython/jsbeautifier/unpackers/javascriptobfuscator.py24CODE
LOWpython/jsbeautifier/javascript/tokenizer.py229CODE
LOWpython/jsbeautifier/javascript/tokenizer.py337CODE
LOWpython/jsbeautifier/javascript/tokenizer.py373CODE
LOWpython/jsbeautifier/javascript/tokenizer.py416CODE
LOWpython/jsbeautifier/javascript/tokenizer.py526CODE
LOWpython/jsbeautifier/javascript/tokenizer.py569CODE
LOWpython/jsbeautifier/javascript/beautifier.py199CODE
LOWpython/jsbeautifier/javascript/beautifier.py507CODE
LOWpython/jsbeautifier/javascript/beautifier.py708CODE
LOWpython/jsbeautifier/javascript/beautifier.py850CODE
LOWpython/jsbeautifier/javascript/beautifier.py881CODE
LOWpython/jsbeautifier/javascript/beautifier.py1206CODE
LOWpython/jsbeautifier/javascript/beautifier.py1300CODE
LOWpython/jsbeautifier/javascript/beautifier.py1524CODE
Hyper-Verbose Identifiers13 hits · 14 pts
SeverityFileLineSnippetContext
LOWpython/test-perf-cssbeautifier.py12def beautifier_test_github_css():CODE
LOWpython/test-perf-jsbeautifier.py14def beautifier_test_underscore():CODE
LOWpython/test-perf-jsbeautifier.py18def beautifier_test_underscore_min():CODE
LOWpython/test-perf-jsbeautifier.py22def beautifier_test_github_min():CODE
LOWpython/jsbeautifier/core/whitespacepattern.py43 def __set_whitespace_patterns(self, whitespace_chars, newline_chars):CODE
LOWpython/jsbeautifier/core/tokenizer.py86 def __get_next_token_with_comments(self, previous, open_token):CODE
LOWpython/jsbeautifier/cli/__init__.py53def set_file_editorconfig_opts(filename, js_options):CODE
LOWpython/jsbeautifier/cli/__init__.py131def get_filepaths_from_params(filepath_params, replace):CODE
LOWpython/jsbeautifier/cli/__init__.py170def integrate_editorconfig_options(filepath, local_options, outfile, default_file_type):CODE
LOWpython/jsbeautifier/javascript/beautifier.py99def remove_redundant_indentation(output, frame):CODE
LOWpython/jsbeautifier/javascript/beautifier.py235 def handle_whitespace_and_comments(CODE
LOWpython/jsbeautifier/javascript/beautifier.py292 def allow_wrap_or_preserved_newline(self, current_token, force_linewrap=False):CODE
LOWpython/jsbeautifier/javascript/beautifier.py345 def print_token_line_indentation(self, current_token):CODE
Modern Structural Boilerplate9 hits · 9 pts
SeverityFileLineSnippetContext
LOWpython/cssbeautifier/_main.py37__all__ = ["default_options", "beautify", "beautify_file", "usage", "main"]CODE
LOWpython/jsbeautifier/__init__.py66__all__ = [CODE
LOWpython/jsbeautifier/core/pattern.py25__all__ = ["Pattern"]CODE
LOWpython/jsbeautifier/core/whitespacepattern.py28__all__ = ["WhitespacePattern"]CODE
LOWpython/jsbeautifier/core/templatablepattern.py28__all__ = ["TemplatablePattern"]CODE
LOWpython/jsbeautifier/core/tokenizer.py32__all__ = ["TOKEN", "Tokenizer", "TokenizerPatterns", "TokenTypes"]CODE
LOWpython/jsbeautifier/core/output.py31__all__ = ["Output"]CODE
LOWpython/jsbeautifier/cli/__init__.py40__all__ = [CODE
LOWpython/jsbeautifier/javascript/tokenizer.py35__all__ = ["TOKEN", "Tokenizer", "TokenTypes"]CODE
Cross-Language Confusion (JS/TS)1 hit · 8 pts
SeverityFileLineSnippetContext
HIGHjs/src/core/output.js287 // but still return True as though you hadCOMMENT
AI Slop Vocabulary3 hits · 6 pts
SeverityFileLineSnippetContext
MEDIUMtest/resources/github.css6 */.flash{position:relative;padding:16px;color:#032f62;background-color:#dbedff;border:1px solid rgba(27,31,35,0.15);borCOMMENT
LOWpython/jsbeautifier/core/output.py242 # otherwise, newline only if we didn't just add one or we're forcedCOMMENT
LOWpython/jsbeautifier/unpackers/evalbased.py32# In case of failure, we'll just return the original, without crashing on user.COMMENT
Excessive Try-Catch Wrapping5 hits · 5 pts
SeverityFileLineSnippetContext
MEDIUMpython/cssbeautifier/_main.py199 print("Error while decoding input or encoding output:", file=sys.stderr)STRING
LOWpython/cssbeautifier/_main.py203 except Exception as ex:STRING
MEDIUMpython/jsbeautifier/__init__.py296 print("Error while decoding input or encoding output:", file=sys.stderr)STRING
LOWpython/jsbeautifier/__init__.py300 except Exception as ex:STRING
MEDIUMpython/jsbeautifier/cli/__init__.py88 print("Error loading EditorConfig. Ignoring.", file=sys.stderr)CODE
Fake / Example Data4 hits · 4 pts
SeverityFileLineSnippetContext
LOWtest/data/html/tests.js1198 '[(ngModel)]="myValue" [disabled]="isDisabled" [placeholder]="placeholder"',CODE
LOWtest/data/html/tests.js1204 '^^^indent_attr$$$[(ngModel)]="myValue" [disabled]="isDisabled" [placeholder]="placeholder"',CODE
LOWtest/data/html/tests.js1262 '<div class="alert alert-info" style="margin-left: 1px;" role="alert">lorem ipsum</div>',CODE
LOWtest/data/html/tests.js1270 ' <div class="alert alert-info" style="margin-left: 1px;" role="alert">lorem ipsum</div>',CODE
Redundant / Tautological Comments2 hits · 3 pts
SeverityFileLineSnippetContext
LOWpython/jsbeautifier/cli/__init__.py143 # Check if each literal filepath existsCOMMENT
LOWpython/jsbeautifier/javascript/beautifier.py711 # Check if this is a BlockStatement that should be treated as aCOMMENT