Sample

pyint-3e9944ce72f5-I04

Replace names with deterministic minifier-style shortest identifiers

Matched original source

Lines33

Scores

MethodScoreScale
Posnett00–1; higher is more readable
Dorn0.8110–1; higher is more readable
Mi0.3220–1; higher is more readable
LLOC18Logical lines; fewer is more readable
DeepSeek V4 Pro9.670–20; mean of three runs
GPT-6.1 Sol14.330–20; mean of three runs
BTTF0.4910–1; higher is more readable

Views

Source code

from __future__ import annotations import typing as t from jinja2.loaders import BaseLoader from werkzeug.routing import RequestRedirect from .blueprints import Blueprint from .globals import _cv_app from .sansio.app import App class DebugFilesKeyError(KeyError, AssertionError): """Raised from request.files during debugging. The idea is that it can provide a better error message than just a generic KeyError/BadRequest. """ def __init__(self, a: Request, b: str) -> None: c = a.form.getlist(b) d = [ f"You tried to access the file {b!r} in the request.files" " dictionary but it does not exist. The mimetype for the" f" request is {a.mimetype!r} instead of" " 'multipart/form-data' which means that no file contents" " were transmitted. To fix this error you should provide" ' enctype="multipart/form-data" in your form.' ] if c: e = ", ".join(repr(f) for f in c) d.append( "\n\nThe browser instead transmitted some file names. " f"This was submitted: {e}" ) self.msg = "".join(d) def __str__(self) -> str: return self.msg

Loading feature diagnosis…

Source regions

Feature contributions

Feature contributions

FeatureValueContribution
(log-odds)
Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones.782.526−25.823
Source linesThe number of non-empty source lines.33+13.2
Byte entropyHow varied the bytes in the source text are. Repeated bytes give a lower value; a more even mixture gives a higher value.4.398−6.597

Intercept 8.87 + feature contributions = -10.35 (log-odds).
Score = sigmoid(-10.35) = 0.

Feature contributions

FeatureValueContribution
(log-odds)
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.04+0.555
Identifier layout (horizontal)How rapidly the visual pattern of identifier characters changes from left to right. It measures spatial frequency, not the meaning of the names.75+0.489
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.1+0.398
Indentation frequencyHow rapidly indentation changes from line to line.31+0.335
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.33.088−0.271
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.34−0.167
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.32.882+0.05

Intercept 0.07 + feature contributions = 1.459 (log-odds).
Score = sigmoid(1.459) = 0.811.

Score0.322
Score18
Run 1

The code has a clear purpose and good docstring, but the implementation uses cryptic single-letter variable names (a, b, c, d, e) that obscure intent. The class structure is logical, but the __init__ method mixes concerns (error message construction with request inspection). Nesting is flat, which helps, but the long f-string concatenation and list-building pattern for an error message feels unnecessarily verbose and hard to follow. Reading flow is disrupted by having to track what each single-letter variable holds. Action granularity is mostly one action per line, but the multi-part string assembly lacks clarity. Overall, the code is functional but not immediately readable without careful study.

Run 2

The code is generally clear and logically organized, with a clear purpose for the custom exception class. The structure is simple and linear. However, readability is reduced by non-descriptive variable names: 'a' for Request, 'b' for the key string, and 'c', 'd', 'e' for local data. These names obscure intent. Nesting is minimal, and action granularity is reasonable, but the long f-string breaks and list-building pattern make the reading flow slightly awkward. The code is concise enough, but the renaming of standard parameters hurts clarity of intent. Overall, it's understandable but less readable than it could be with clearer naming.

Run 3

The code scores poorly due to severely reduced readability. Variable names like 'a', 'b', 'c', 'd', 'e', and 'f' obscure intent, making the logic hard to follow. The constructor performs multiple responsibilities—error message construction, list formatting, and string assembly—compressed into a few dense lines. The error message text is split across many adjacent string literals, disrupting reading flow. While the class structure is simple and nesting is shallow, the lack of semantic naming and convoluted string concatenation outweigh those strengths. Action granularity is mixed; some lines do too much (e.g., list comprehension and assignment of 'self.msg'). Overall, the code is technically functional but unreasonably difficult to parse or maintain.

Run 1

Code Structure: The exception class is logically organized, with initialization and string conversion clearly separated, though several unrelated imports add clutter. Nesting: Only one shallow conditional keeps control flow easy to follow. Clarity of intent: The class name, docstring, and error message explain the purpose well, but single-letter parameter and variable names obscure their roles, and Request is not visibly imported. Code length: The implementation is compact; most length comes from a useful explanatory message rather than unnecessary logic. Action granularity: Statements generally perform one action each, and message construction is cleanly split across lines. Reading flow: Execution proceeds naturally from retrieving form values to building and optionally extending the message, then storing it. More descriptive names and cleaner imports would substantially improve readability.

Run 2

Code Structure: The exception class is logically organized into initialization and string representation, although several unused imports add clutter. Nesting: Only one conditional is present, keeping the code easy to follow. Clarity of intent: The class name, docstring, and descriptive error message explain its purpose, but single-letter parameters and variables obscure their roles. Request is also not imported in the shown code, reducing annotation clarity. Code length: The implementation is compact; most of its length serves the useful diagnostic message. Action granularity: Statements generally perform one action each, with no compressed multi-action lines. Reading flow: Execution proceeds naturally from retrieving submitted values to constructing and optionally extending the message, then storing it. However, generic variable names and the long, fragmented string require additional attention.

Run 3

Code Structure: The exception class is logically organized into initialization and string representation, but several unused imports add clutter. Nesting: A single conditional keeps the code shallow and easy to follow. Clarity of intent: The class name, docstring, and descriptive error message explain its purpose, but single-letter parameter and variable names obscure their roles. Request is not imported in the shown code, making the annotation harder to contextualize. Code length: The implementation is reasonably concise; most length comes from useful diagnostic text. Action granularity: Statements generally perform one action each, with message construction split cleanly across lines. Reading flow: Execution proceeds naturally from retrieving form values to building the message and optionally adding submitted filenames, although deciphering abbreviated names interrupts that flow.