Sample
pyint-a2c8065af72b-SRC
Unmodified source class
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0.882 | 0–1; higher is more readable |
| Dorn | 0.82 | 0–1; higher is more readable |
| Mi | 0.504 | 0–1; higher is more readable |
| LLOC | 19 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 17.33 | 0–20; mean of three runs |
| GPT-6.1 Sol | 18.33 | 0–20; mean of three runs |
| BTTF | 0.727 | 0–1; higher is more readable |
Views
Loading feature diagnosis…
Source regions
Feature contributions
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Source linesThe number of non-empty source lines. | 46 | +18.4 |
| Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones. | 550.225 | −18.157 |
| 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.734 | −7.101 |
Intercept 8.87 + feature contributions = 2.011 (log-odds).
Score = sigmoid(2.011) = 0.882.
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.017 | +0.774 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 47 | −0.628 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 86.83 | +0.597 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 45.886 | +0.232 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 24 | +0.093 |
| 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. | 87 | −0.02 |
Intercept 0.07 + feature contributions = 1.515 (log-odds).
Score = sigmoid(1.515) = 0.82.
| Score | 0.504 |
|---|
| Score | 19 |
|---|
Run 1
The code is well-structured with clear imports, a single class definition, and a concise property. Nesting is minimal (one conditional in a property). The intent is clear: this is a Flask response subclass with a default HTML mimetype and a config-aware max cookie size. Code length is appropriate and not unnecessarily long. Each action is separated logically, with one meaningful action per line. Reading flow is natural, from imports to class definition to the property. The only minor deductions are for the overly long docstring and the type-ignore comments, which slightly reduce readability. Overall, it is highly readable.
Run 2
The code is highly readable with clear structure and intent. It uses concise imports, a well-documented class, and follows Flask's idiomatic style. The single property method has minimal nesting and clear action granularity. Type hints improve clarity, and consistent spacing enhances flow. Minor deductions for the type: ignore comments and slight verbosity in the docstring, which could reduce scanning speed but add useful context.
Run 3
The code is highly readable, with clear structure, minimal nesting, and logical organization. The class definition is concise, with a well-documented purpose, and the method/property is straightforward. Imports are grouped and explicit, though slightly verbose. The conditional in `max_cookie_size` is flat and easy to follow. Action granularity is appropriate, with one logical action per line. Type annotations improve clarity. The only minor issue is the slightly scattered use of `# type: ignore` comments, but this is a small trade-off for compatibility. Overall, the code is clean, maintainable, and unambiguous.
Run 1
Code Structure: Imports, class documentation, defaults, and the property are logically organized. Nesting: Only one shallow conditional, with an early return keeping the fallback flat. Clarity of intent: Descriptive names, type annotations, docstrings, and the fallback comment clearly explain behavior; understanding current_app and inherited defaults requires some Flask/Werkzeug familiarity. Code length: Executable code is concise, although the extensive class docstring and version-history entries add reading overhead. Action granularity: Each statement performs a single action, with no compressed multi-operation lines. Reading flow: The progression from response defaults to configuration-dependent behavior is natural; slightly more spacing between import groups and the class would improve visual separation.
Run 2
Code Structure: The class is logically organized, with documentation, class attributes, and a focused property; several unused imports add clutter. Nesting: A single conditional keeps the implementation flat and easy to follow. Clarity of intent: Descriptive names, type annotations, and documentation clearly explain the response defaults and configuration fallback, though some behavior depends on inherited functionality and application context. Code length: The executable code is concise, but the lengthy docstring and historical notes outweigh the small implementation. Action granularity: Each statement performs one clear action, with no compressed or compound operations. Reading flow: The property reads naturally from checking the application context to returning the configured value or the superclass default. Additional spacing around the import groups and class declaration would improve visual organization.
Run 3
Code Structure: The response defaults and configuration-backed property are logically grouped in a small class, although several imports are unused in this snippet. Nesting: A single conditional and early return keep the implementation flat. Clarity of intent: Descriptive names, type annotations, docstrings, and the fallback comment clearly explain the Flask-specific behavior. Code length: Executable code is concise; the lengthy documentation and version-history notes slightly outweigh the implementation. Action granularity: Each statement performs one clear action, without compressed multi-action lines. Reading flow: Imports, class documentation, defaults, and the property follow a natural order. Minor spacing issues around the import block and class declaration, plus type-ignore annotations, add small distractions.