Sample
pyint-44c7b1f4c2cc-I03
Replace names with length-matched meaningful but unrelated identifiers
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Dorn | 0.837 | 0–1; higher is more readable |
| Mi | 0.28 | 0–1; higher is more readable |
| LLOC | 18 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 11 | 0–20; mean of three runs |
| GPT-6.1 Sol | 15 | 0–20; mean of three runs |
| BTTF | 0.594 | 0–1; higher is more readable |
Views
Loading feature diagnosis…
Source regions
Feature contributions
Feature contributions
| Feature | Value | Contribution (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. | 597.591 | −19.721 |
| Source linesThe number of non-empty source lines. | 23 | +9.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.595 | −6.892 |
Intercept 8.87 + feature contributions = -8.542 (log-odds).
Score = sigmoid(-8.542) = 0.
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| 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. | 70.917 | +0.661 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.041 | +0.539 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 24 | +0.187 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 22.917 | −0.09 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 44.417 | −0.088 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 20 | −0.045 |
Intercept 0.07 + feature contributions = 1.633 (log-odds).
Score = sigmoid(1.633) = 0.837.
| Score | 0.28 |
|---|
| Score | 18 |
|---|
Run 1
The code structure is logical with clear imports and a single class definition. Nesting is flat, with only one level of conditional check. Clarity of intent is somewhat degraded by the misleading parameter name 'age' which should likely be 'app', and 'message' instead of 'kwargs'. The code is concise, but action granularity is mixed — the conditional assignment and constructor call are single-line but not separated for clarity. Reading flow is natural given the short length, but the parameter naming creates ambiguity about purpose and relationships. Overall, the code is readable but could be improved with more descriptive variable names and minor formatting adjustments.
Run 2
The code has several readability issues. The parameter names 'age' (which should represent an App instance) and 'message' (which should represent options) are misleading and make the intent unclear. The action granularity is mixed - some lines combine multiple operations while others are unnecessarily verbose. The structure is reasonable but the naming inconsistencies create confusion. The import organization is clean with proper grouping, and the docstring is helpful, but the implementation details don't follow idiomatic Python naming conventions. The use of 't.Any' for typing is acceptable, though 'message' as a parameter name for configuration options is particularly confusing. Overall, the code works but requires mental effort to understand the actual purpose of parameters and their relationships.
Run 3
The code follows a reasonable import structure and the class/docstring clearly state intent. However, the constructor parameters (`age: App`, `**message`) are ambiguous and misleading; they should be named `app` and `options` (or `kwargs`). The `__init__` method also mixes multiple actions conditionally setting loader, calling parent init, and assigning state, but this is acceptable. The logic is flat and not deeply nested, which is good. However, the conditional loader insertion and parameter naming reduce clarity of intent. The use of `typing as t` is conventional, but the unused imports (`BaseLoader`, `Template`, `TemplateNotFound`, context/signals) add noise. Overall, the code is readable but suffers from poor naming and minor clutter, preventing higher readability.
Run 1
Code Structure: Imports, class documentation, and initialization are logically organized, though several imports are unused in this snippet. Nesting: A single conditional keeps nesting shallow. Clarity of intent: The loader fallback and parent initialization are understandable, but the parameter names 'age' and 'message' obscure their apparent roles as application and configuration arguments. The 'App' annotation is not imported, and the docstring describes blueprint behavior not demonstrated here. Code length: The implementation is concise, with little unnecessary logic. Action granularity: Each line performs one clear action. Reading flow: Execution proceeds naturally from checking the loader to initializing the environment and storing the application, although additional blank lines between imports and the class would improve visual separation.
Run 2
Code Structure: Imports and a small class are logically organized, although several imports appear unused and App is not defined in the snippet. Nesting: Only one shallow conditional, making control flow easy to follow. Clarity of intent: Inheritance, the docstring, and loader initialization convey the purpose, but parameter names age and message obscure their roles as the application and environment options. The docstring's blueprint discussion is not directly illustrated by the implementation. Code length: The implementation is concise, though unused imports add clutter. Action granularity: Each line performs a single clear action. Reading flow: Initialization follows a natural sequence—supply a default loader, initialize the base environment, and store the application—but clearer naming and import grouping would improve readability.
Run 3
Code Structure: Imports and a single class are logically organized, although import grouping and spacing could improve. Nesting: The constructor has only one shallow conditional, making control flow easy to follow. Clarity of intent: Inheritance and loader initialization communicate the general purpose, but misleading names such as 'age' and 'message' obscure the application and keyword arguments. The docstring describes blueprint behavior not directly visible here, and 'App' is not imported or defined in the snippet. Code length: The implementation is concise, though several imports appear unused. Action granularity: Each statement performs one clear action. Reading flow: The constructor progresses naturally from selecting a default loader to initializing the superclass and storing the application, but naming and surplus imports interrupt readability.