Beautifier for javascript
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).
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.
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 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.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | test/resources/underscore-min.js | 1 | // Underscore.js 1.7.0 | COMMENT |
| LOW | test/data/css/tests.js | 741 | { name: "indent_size", value: "4" }, | COMMENT |
| LOW | test/data/css/tests.js | 761 | // 'var a = {', | COMMENT |
| LOW | test/data/css/tests.js | 781 | // ], | COMMENT |
| LOW | test/data/css/tests.js | 801 | // ' ten : 10', | COMMENT |
| LOW | test/data/css/tests.js | 821 | // ' ten : 10', | COMMENT |
| LOW | test/data/css/tests.js | 841 | // ' ten : 10', | COMMENT |
| LOW | test/data/css/tests.js | 901 | ' two : 2,', | COMMENT |
| LOW | test/data/css/tests.js | 921 | // '};' | COMMENT |
| LOW | test/data/css/tests.js | 961 | ] | COMMENT |
| LOW | test/data/css/tests.js | 981 | // '.div {', | COMMENT |
| LOW | test/data/css/tests.js | 1001 | // ' /* beautify ignore:end */', | COMMENT |
| LOW | test/data/css/tests.js | 1021 | // '}' | COMMENT |
| LOW | test/data/css/tests.js | 1041 | // ' /* beautify ignore:start preserve:start */', | COMMENT |
| LOW | test/data/javascript/tests.js | 61 | // handlebars {{{ ... }}} and {{ ... }} and {{# ... }} and {{! ... }} and {{!-- --}} | COMMENT |
| LOW | test/data/javascript/tests.js | 5181 | // ' {', | COMMENT |
| LOW | test/data/javascript/tests.js | 5201 | // ' id: "a",', | COMMENT |
| LOW | python/cssbeautifier/_main.py | 1 | # | COMMENT |
| LOW | python/cssbeautifier/__init__.py | 1 | # | COMMENT |
| LOW | python/cssbeautifier/css/options.py | 1 | # | COMMENT |
| LOW | python/cssbeautifier/css/beautifier.py | 21 | COMMENT | |
| LOW | python/jsbeautifier/__init__.py | 21 | # Permission is hereby granted, free of charge, to any person | COMMENT |
| LOW | python/jsbeautifier/__init__.py | 41 | # Originally written by Einar Lielmanis et al., | COMMENT |
| LOW | python/jsbeautifier/core/options.py | 1 | # The MIT License (MIT) | COMMENT |
| LOW | python/jsbeautifier/core/token.py | 1 | # The MIT License (MIT) | COMMENT |
| LOW | python/jsbeautifier/core/tokenstream.py | 1 | # The MIT License (MIT) | COMMENT |
| LOW | python/jsbeautifier/core/pattern.py | 1 | # The MIT License (MIT) | COMMENT |
| LOW | python/jsbeautifier/core/whitespacepattern.py | 1 | # The MIT License (MIT) | COMMENT |
| LOW | python/jsbeautifier/core/templatablepattern.py | 1 | # The MIT License (MIT) | COMMENT |
| LOW | python/jsbeautifier/core/tokenizer.py | 1 | # The MIT License (MIT) | COMMENT |
| LOW | python/jsbeautifier/core/directives.py | 1 | # The MIT License (MIT) | COMMENT |
| LOW | python/jsbeautifier/core/inputscanner.py | 1 | # The MIT License (MIT) | COMMENT |
| LOW | python/jsbeautifier/core/output.py | 1 | # The MIT License (MIT) | COMMENT |
| LOW | python/jsbeautifier/cli/__init__.py | 21 | # obtaining a copy of this software and associated documentation files | COMMENT |
| LOW | python/jsbeautifier/unpackers/urlencode.py | 1 | # | COMMENT |
| LOW | python/jsbeautifier/unpackers/packer.py | 1 | # | COMMENT |
| LOW | python/jsbeautifier/unpackers/myobfuscate.py | 1 | # | COMMENT |
| LOW | python/jsbeautifier/unpackers/javascriptobfuscator.py | 1 | # | COMMENT |
| LOW | python/jsbeautifier/unpackers/evalbased.py | 1 | # | COMMENT |
| LOW | python/jsbeautifier/unpackers/tests/__init__.py | 1 | # Empty file :) | COMMENT |
| LOW | …sbeautifier/unpackers/tests/test-myobfuscate-output.js | 1 | // | COMMENT |
| LOW | python/jsbeautifier/javascript/options.py | 1 | # The MIT License (MIT) | COMMENT |
| LOW | python/jsbeautifier/javascript/tokenizer.py | 1 | # The MIT License (MIT) | COMMENT |
| LOW | python/jsbeautifier/javascript/acorn.py | 1 | import re | COMMENT |
| LOW | python/jsbeautifier/javascript/beautifier.py | 1 | # The MIT License (MIT) | COMMENT |
| LOW | python/jsbeautifier/javascript/beautifier.py | 581 | # (c || d)); | COMMENT |
| LOW | js/test/sanitytest.js | 1 | // | COMMENT |
| LOW | js/src/unpackers/javascriptobfuscator_unpacker.js | 21 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS | COMMENT |
| LOW | js/src/unpackers/p_a_c_k_e_r_unpacker.js | 21 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS | COMMENT |
| LOW | js/src/javascript/acorn.js | 1 | /* jshint node: true, curly: false */ | COMMENT |
| LOW | .github/workflows/codeql-analysis.yml | 1 | # For most projects, this workflow file will not need changing; you simply need | COMMENT |
| LOW | .github/workflows/codeql-analysis.yml | 41 | - name: Initialize CodeQL | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | python/jsbeautifier/core/output.py | 261 | self.current_line.push(last_item) | CODE |
| HIGH | python/jsbeautifier/core/output.py | 266 | sweet_code = "\n".join(line.toString() for line in self.__lines) | CODE |
| HIGH⚡ | python/jsbeautifier/core/output.py | 292 | self.current_line.push(token.whitespace_before) | CODE |
| HIGH⚡ | python/jsbeautifier/core/output.py | 293 | self.current_line.push(token.text) | CODE |
| HIGH⚡ | python/jsbeautifier/core/output.py | 300 | self.current_line.push(printable_token) | CODE |
| HIGH⚡ | python/jsbeautifier/core/output.py | 309 | self.current_line.push(" ") | CODE |
| HIGH | python/jsbeautifier/javascript/beautifier.py | 354 | line.push(current_token.whitespace_before) | CODE |
| HIGH | python/jsbeautifier/javascript/beautifier.py | 377 | self._output.previous_line.push(popped) | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | python/test-perf-jsbeautifier.py | 3 | CODE | |
| LOW | python/cssbeautifier/_main.py | 27 | CODE | |
| LOW | python/cssbeautifier/_main.py | 28 | CODE | |
| LOW | python/cssbeautifier/_main.py | 29 | CODE | |
| LOW | python/cssbeautifier/_main.py | 30 | CODE | |
| LOW | python/cssbeautifier/_main.py | 33 | CODE | |
| LOW | python/jsbeautifier/__init__.py | 2 | CODE | |
| LOW | python/jsbeautifier/__init__.py | 3 | CODE | |
| LOW | python/jsbeautifier/__init__.py | 4 | CODE | |
| LOW | python/jsbeautifier/__init__.py | 6 | CODE | |
| LOW | python/jsbeautifier/__init__.py | 8 | CODE | |
| LOW | python/jsbeautifier/__init__.py | 9 | CODE | |
| LOW | python/jsbeautifier/__init__.py | 10 | CODE | |
| LOW | python/jsbeautifier/__init__.py | 12 | CODE | |
| LOW | python/jsbeautifier/core/tokenstream.py | 25 | CODE | |
| LOW | python/jsbeautifier/core/tokenstream.py | 26 | CODE | |
| LOW | python/jsbeautifier/core/tokenstream.py | 27 | CODE | |
| LOW | python/jsbeautifier/core/whitespacepattern.py | 25 | CODE | |
| LOW | python/jsbeautifier/core/tokenizer.py | 29 | CODE | |
| LOW | python/jsbeautifier/tests/core/test_options.py | 1 | CODE | |
| LOW | python/jsbeautifier/cli/__init__.py | 5 | CODE | |
| LOW | python/jsbeautifier/cli/__init__.py | 6 | CODE | |
| LOW | python/jsbeautifier/cli/__init__.py | 7 | CODE | |
| LOW | python/jsbeautifier/cli/__init__.py | 11 | CODE | |
| LOW | python/jsbeautifier/cli/__init__.py | 12 | CODE | |
| LOW | python/jsbeautifier/cli/__init__.py | 13 | CODE | |
| LOW | python/jsbeautifier/unpackers/packer.py | 17 | CODE | |
| LOW | python/jsbeautifier/javascript/beautifier.py | 26 | CODE | |
| LOW | python/jsbeautifier/javascript/beautifier.py | 27 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | python/cssbeautifier/_main.py | 100 | CODE | |
| LOW | python/cssbeautifier/css/beautifier.py | 147 | CODE | |
| LOW | python/cssbeautifier/css/beautifier.py | 184 | CODE | |
| LOW | python/jsbeautifier/__init__.py | 154 | CODE | |
| LOW | python/jsbeautifier/core/templatablepattern.py | 149 | CODE | |
| LOW | python/jsbeautifier/cli/__init__.py | 53 | CODE | |
| LOW | python/jsbeautifier/cli/__init__.py | 131 | CODE | |
| LOW | python/jsbeautifier/cli/__init__.py | 189 | CODE | |
| LOW | python/jsbeautifier/unpackers/javascriptobfuscator.py | 24 | CODE | |
| LOW | python/jsbeautifier/javascript/tokenizer.py | 229 | CODE | |
| LOW | python/jsbeautifier/javascript/tokenizer.py | 337 | CODE | |
| LOW | python/jsbeautifier/javascript/tokenizer.py | 373 | CODE | |
| LOW | python/jsbeautifier/javascript/tokenizer.py | 416 | CODE | |
| LOW | python/jsbeautifier/javascript/tokenizer.py | 526 | CODE | |
| LOW | python/jsbeautifier/javascript/tokenizer.py | 569 | CODE | |
| LOW | python/jsbeautifier/javascript/beautifier.py | 199 | CODE | |
| LOW | python/jsbeautifier/javascript/beautifier.py | 507 | CODE | |
| LOW | python/jsbeautifier/javascript/beautifier.py | 708 | CODE | |
| LOW | python/jsbeautifier/javascript/beautifier.py | 850 | CODE | |
| LOW | python/jsbeautifier/javascript/beautifier.py | 881 | CODE | |
| LOW | python/jsbeautifier/javascript/beautifier.py | 1206 | CODE | |
| LOW | python/jsbeautifier/javascript/beautifier.py | 1300 | CODE | |
| LOW | python/jsbeautifier/javascript/beautifier.py | 1524 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | python/test-perf-cssbeautifier.py | 12 | def beautifier_test_github_css(): | CODE |
| LOW⚡ | python/test-perf-jsbeautifier.py | 14 | def beautifier_test_underscore(): | CODE |
| LOW⚡ | python/test-perf-jsbeautifier.py | 18 | def beautifier_test_underscore_min(): | CODE |
| LOW⚡ | python/test-perf-jsbeautifier.py | 22 | def beautifier_test_github_min(): | CODE |
| LOW | python/jsbeautifier/core/whitespacepattern.py | 43 | def __set_whitespace_patterns(self, whitespace_chars, newline_chars): | CODE |
| LOW | python/jsbeautifier/core/tokenizer.py | 86 | def __get_next_token_with_comments(self, previous, open_token): | CODE |
| LOW | python/jsbeautifier/cli/__init__.py | 53 | def set_file_editorconfig_opts(filename, js_options): | CODE |
| LOW | python/jsbeautifier/cli/__init__.py | 131 | def get_filepaths_from_params(filepath_params, replace): | CODE |
| LOW | python/jsbeautifier/cli/__init__.py | 170 | def integrate_editorconfig_options(filepath, local_options, outfile, default_file_type): | CODE |
| LOW | python/jsbeautifier/javascript/beautifier.py | 99 | def remove_redundant_indentation(output, frame): | CODE |
| LOW | python/jsbeautifier/javascript/beautifier.py | 235 | def handle_whitespace_and_comments( | CODE |
| LOW | python/jsbeautifier/javascript/beautifier.py | 292 | def allow_wrap_or_preserved_newline(self, current_token, force_linewrap=False): | CODE |
| LOW | python/jsbeautifier/javascript/beautifier.py | 345 | def print_token_line_indentation(self, current_token): | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | python/cssbeautifier/_main.py | 37 | __all__ = ["default_options", "beautify", "beautify_file", "usage", "main"] | CODE |
| LOW | python/jsbeautifier/__init__.py | 66 | __all__ = [ | CODE |
| LOW | python/jsbeautifier/core/pattern.py | 25 | __all__ = ["Pattern"] | CODE |
| LOW | python/jsbeautifier/core/whitespacepattern.py | 28 | __all__ = ["WhitespacePattern"] | CODE |
| LOW | python/jsbeautifier/core/templatablepattern.py | 28 | __all__ = ["TemplatablePattern"] | CODE |
| LOW | python/jsbeautifier/core/tokenizer.py | 32 | __all__ = ["TOKEN", "Tokenizer", "TokenizerPatterns", "TokenTypes"] | CODE |
| LOW | python/jsbeautifier/core/output.py | 31 | __all__ = ["Output"] | CODE |
| LOW | python/jsbeautifier/cli/__init__.py | 40 | __all__ = [ | CODE |
| LOW | python/jsbeautifier/javascript/tokenizer.py | 35 | __all__ = ["TOKEN", "Tokenizer", "TokenTypes"] | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | js/src/core/output.js | 287 | // but still return True as though you had | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | test/resources/github.css | 6 | */.flash{position:relative;padding:16px;color:#032f62;background-color:#dbedff;border:1px solid rgba(27,31,35,0.15);bor | COMMENT |
| LOW | python/jsbeautifier/core/output.py | 242 | # otherwise, newline only if we didn't just add one or we're forced | COMMENT |
| LOW | python/jsbeautifier/unpackers/evalbased.py | 32 | # In case of failure, we'll just return the original, without crashing on user. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | python/cssbeautifier/_main.py | 199 | print("Error while decoding input or encoding output:", file=sys.stderr) | STRING |
| LOW | python/cssbeautifier/_main.py | 203 | except Exception as ex: | STRING |
| MEDIUM | python/jsbeautifier/__init__.py | 296 | print("Error while decoding input or encoding output:", file=sys.stderr) | STRING |
| LOW | python/jsbeautifier/__init__.py | 300 | except Exception as ex: | STRING |
| MEDIUM | python/jsbeautifier/cli/__init__.py | 88 | print("Error loading EditorConfig. Ignoring.", file=sys.stderr) | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | test/data/html/tests.js | 1198 | '[(ngModel)]="myValue" [disabled]="isDisabled" [placeholder]="placeholder"', | CODE |
| LOW | test/data/html/tests.js | 1204 | '^^^indent_attr$$$[(ngModel)]="myValue" [disabled]="isDisabled" [placeholder]="placeholder"', | CODE |
| LOW | test/data/html/tests.js | 1262 | '<div class="alert alert-info" style="margin-left: 1px;" role="alert">lorem ipsum</div>', | CODE |
| LOW | test/data/html/tests.js | 1270 | ' <div class="alert alert-info" style="margin-left: 1px;" role="alert">lorem ipsum</div>', | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | python/jsbeautifier/cli/__init__.py | 143 | # Check if each literal filepath exists | COMMENT |
| LOW | python/jsbeautifier/javascript/beautifier.py | 711 | # Check if this is a BlockStatement that should be treated as a | COMMENT |