Repository Analysis

bottlepy/bottle

bottle.py is a fast and simple micro-framework for python web-applications.

13.7 Low AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of bottlepy/bottle, a Python project with 8,772 GitHub stars. SynthScan v2.0 examined 9,423 lines of code across 38 source files, recording 104 pattern matches distributed across 7 syntactic categories. The overall adjusted score of 13.7 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).

13.7
Adjusted Score
13.7
Raw Score
100%
Time Factor
2026-07-19
Last Push
8.8K
Stars
Python
Language
9.4K
Lines of Code
38
Files
104
Pattern Hits
2026-08-02
Scan Date
0.13
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 5MEDIUM 2LOW 97

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 104 distinct pattern matches across 7 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 Identifiers52 hits · 56 pts
SeverityFileLineSnippetContext
LOWtest/test_plugins.py53 def test_uninstall_by_instance(self):CODE
LOWtest/test_plugins.py155 def test_json_plugin_catches_httpresponse(self):CODE
LOWtest/test_plugins.py196 def test_instance_method_wrapper(self):CODE
LOWtest/test_mount.py90 def test_mount_wsgi_ctype_bug(self):CODE
LOWtest/test_router.py136 def test_dynamic_before_static_any(self):CODE
LOWtest/test_router.py143 def test_any_static_before_dynamic(self):CODE
LOWtest/test_router.py150 def test_dynamic_any_if_method_exists(self):CODE
LOWtest/test_multipart.py183 def test_missing_content_type(self):CODE
LOWtest/test_multipart.py186 def test_unsupported_content_type(self):CODE
LOWtest/test_multipart.py198 def test_no_newline_after_content(self):CODE
LOWtest/test_multipart.py204 def test_no_newline_after_middle_content(self):CODE
LOWtest/test_multipart.py214 def test_preamble_before_start_boundary(self):CODE
LOWtest/test_multipart.py251 def test_content_length_to_small(self):CODE
LOWtest/test_multipart.py258 def test_no_disposition_header(self):CODE
LOWtest/test_stpl.py20 def test_self_as_variable_name(self):CODE
LOWtest/test_stpl.py101 def test_newline_in_parameterlist(self):CODE
LOWtest/test_stpl.py231 def test_bug_no_whitespace_before_stmt(self):CODE
LOWtest/test_stpl.py234 def test_bug_block_keywords_eat_prefixed_code(self):CODE
LOWtest/test_stpl.py277 def test_multiline_ignore_eob_in_string(self):STRING
LOWtest/test_stpl.py289 def test_multiline_find_eob_in_comments(self):STRING
LOWtest/test_stpl.py316 def test_multiline_eob_after_end(self):STRING
LOWtest/test_stpl.py327 def test_multiline_eob_in_single_line_code(self):STRING
LOWtest/test_stpl.py337 def test_multiline_strings_in_code_line(self):STRING
LOWtest/test_stpl.py348 def test_multiline_comprehensions_in_code_line(self):STRING
LOWtest/test_stpl.py361 def test_end_keyword_on_same_line(self):STRING
LOWtest/test_outputfilter.py85 def test_json_serialization_error(self):CODE
LOWtest/test_outputfilter.py117 def test_empty_generator_callback(self):CODE
LOWtest/test_outputfilter.py125 def test_error_in_generator_callback(self):CODE
LOWtest/test_outputfilter.py132 def test_fatal_error_in_generator_callback(self):CODE
LOWtest/test_outputfilter.py139 def test_httperror_in_generator_callback(self):CODE
LOWtest/test_outputfilter.py148 def test_httpresponse_in_generator_callback(self):CODE
LOWtest/test_outputfilter.py154 def test_unicode_generator_callback(self):CODE
LOWtest/test_outputfilter.py160 def test_invalid_generator_callback(self):CODE
LOWtest/test_wsgi.py353 def test_after_request_hooks_run_after_exception(self):CODE
LOWtest/test_wsgi.py373 def test_after_request_hooks_run_after_exception_in_before_hook(self):CODE
LOWtest/test_wsgi.py393 def test_after_request_hooks_may_rise_response_exception(self):CODE
LOWtest/test_wsgi.py410 def test_after_response_hook_can_set_headers(self):CODE
LOWtest/test_wsgi.py543 def test_module_shortcuts_with_different_name(self):CODE
LOWtest/test_route.py44 def test_callback_inspection_multiple_args(self):CODE
LOWtest/test_route.py66 def test_callback_inspection_newsig(self):CODE
LOWtest/test_route.py98 def test_unwrap_closure_callable(self):CODE
LOWtest/test_environ.py140 def test_header_access_special(self):CODE
LOWtest/test_environ.py308 def test_chunked_not_terminated(self):CODE
LOWtest/test_environ.py314 def test_chunked_illegal_size(self):CODE
LOWtest/test_environ.py317 def test_chunked_not_chunked_at_all(self):CODE
LOWtest/test_environ.py403 def test_json_header_empty_body(self):CODE
LOWtest/test_environ.py452 def test_user_defined_attributes(self):CODE
LOWtest/test_environ.py493 def test_constructor_headerlist(self):CODE
LOWtest/test_environ.py611 def test_set_cookie_value_long_string(self):CODE
LOWtest/test_environ.py615 def test_set_cookie_name_long_string(self):CODE
LOWtest/test_environ.py735 def test_prevent_control_characters_in_headers(self):CODE
LOWtest/test_environ.py870 def test_redirect_preserve_cookies(self):CODE
Unused Imports27 hits · 27 pts
SeverityFileLineSnippetContext
LOWtest/test_formsdict.py5CODE
LOWtest/test_formsdict.py5CODE
LOWtest/test_plugins.py2CODE
LOWtest/test_plugins.py5CODE
LOWtest/tools.py2CODE
LOWtest/tools.py14CODE
LOWtest/__init__.py1CODE
LOWtest/__init__.py2CODE
LOWtest/__init__.py3CODE
LOWtest/__init__.py4CODE
LOWtest/__init__.py4CODE
LOWtest/test_fileupload.py5CODE
LOWtest/test_fileupload.py6CODE
LOWtest/test_fileupload.py7CODE
LOWtest/test_oorouting.py14CODE
LOWtest/test_multipart.py4CODE
LOWtest/test_multipart.py4CODE
LOWtest/test_multipart.py4CODE
LOWtest/test_stpl.py2CODE
LOWtest/test_outputfilter.py7CODE
LOWtest/test_outputfilter.py12CODE
LOWtest/test_wsgi.py2CODE
LOWtest/test_mako.py1CODE
LOWtest/test_mako.py54CODE
LOWtest/test_jinja2.py69CODE
LOWtest/test_jinja2.py43CODE
LOWtest/test_jinja2.py50CODE
Cross-Language Confusion5 hits · 25 pts
SeverityFileLineSnippetContext
HIGHbottle.py1097 default_app.push(self)CODE
HIGHbottle.py2517 return self.push()CODE
HIGHbottle.py3788 tmp = default_app.push() # Create a new "default application"CODE
HIGHtest/test_securecookies.py13 bottle.app.push()CODE
HIGHtest/tools.py86 self.app = bottle.app.push()CODE
Deep Nesting11 hits · 10 pts
SeverityFileLineSnippetContext
LOWbottle.py2901CODE
LOWbottle.py2924CODE
LOWbottle.py3800CODE
LOWbottle.py4525CODE
LOWbottle.py430CODE
LOWbottle.py534CODE
LOWbottle.py1178CODE
LOWbottle.py2621CODE
LOWbottle.py3195CODE
LOWbottle.py4291CODE
LOWtest/test_multipart.py81CODE
Excessive Try-Catch Wrapping6 hits · 7 pts
SeverityFileLineSnippetContext
MEDIUMbottle.py130def _stderr(*args):CODE
LOWbottle.py972 except Exception as E:CODE
LOWbottle.py1038 except Exception as error:CODE
LOWbottle.py1076 except Exception as E:CODE
LOWbottle.py2124 except Exception:CODE
LOWbottle.py2555 except Exception:CODE
Self-Referential Comments1 hit · 2 pts
SeverityFileLineSnippetContext
MEDIUMbottle.py3788 tmp = default_app.push() # Create a new "default application"CODE
AI Structural Patterns2 hits · 2 pts
SeverityFileLineSnippetContext
LOWbottle.py3800CODE
LOWbottle.py1755CODE