Sample
pyint-cbbab2fcea9c-I02
Shorten method, parameter, and local names without collisions
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Dorn | 0.896 | 0–1; higher is more readable |
| Mi | 0.336 | 0–1; higher is more readable |
| LLOC | 60 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 8.33 | 0–20; mean of three runs |
| GPT-6.1 Sol | 12 | 0–20; mean of three runs |
| BTTF | 0.359 | 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. | 3445.155 | −113.69 |
| Source linesThe number of non-empty source lines. | 84 | +33.6 |
| 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.392 | −6.587 |
Intercept 8.87 + feature contributions = -77.807 (log-odds).
Score = sigmoid(-77.807) = 0.
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Indentation frequencyHow rapidly indentation changes from line to line. | 82 | +2.099 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 85 | −1.973 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 83.634 | +0.759 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 80.847 | +0.5 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| 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. | 80.965 | +0.236 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.09 | +0.064 |
Intercept 0.07 + feature contributions = 2.153 (log-odds).
Score = sigmoid(2.153) = 0.896.
| Score | 0.336 |
|---|
| Score | 60 |
|---|
Run 1
The code is functionally organized but suffers from poor naming conventions (e.g., app2, tem2, rv2, get2/get3), which obscures intent. The parameter and variable names with numeric suffixes add ambiguity and reduce clarity. Nesting is moderate but present in loops with try/except blocks. The code duplicates logic between get2 and get3, making it longer than necessary. Multiple actions occur on single lines (e.g., method calls with assignments inside append), impacting readability. Reading flow is disrupted by non-descriptive names and inconsistent naming patterns (env2, env3, loa3, loa4, blu, blu2). However, the structure is logical and comments are minimal but present, which aids slightly. The type hints are helpful but not sufficient to overcome the naming issues.
Run 2
The code has significant readability issues. Naming is poor: `app2`, `tem`, `tem2`, `tem3`, `rv2`, `trv2`, `get2`, `get3`, `loa2`, `loa4`, `blu2`, `src2`, `env2`, etc., obscures intent and makes the code confusing. The `get` method delegates to `get2` or `get3` based on a config flag, but the naming gives no clue about the behavior difference. `get2` has tangled logic with unclear variable initialization (`trv2`) and a side-effect call (`explain_template_loading_attempts`) buried in the middle. `get3` is clearer but duplicates `get2` logic partially. Action granularity is uneven; some lines bundle multiple operations, others are fragmented. The import block is clean, and the class docstring is helpful, but overall the code requires careful rereading to understand the template resolution flow. Structure is acceptable but the naming and duplication severely harm clarity.
Run 3
The code has a clear class structure and separation of concerns, but suffers from poor naming (app2, get2, get3, rv2, tem2, loa3, etc.) that obscures intent. The method names get/get2/get3 provide no semantic meaning about their differences. Nesting is mostly flat, which is good, and line-level granularity is reasonable. However, the disorganized naming conventions force readers to constantly track variable suffixes to understand which method they're in. The type hints are helpful but the numbered variable names undermine readability despite correct structure. The logic itself is simple, but the naming choices make it harder to follow than necessary.
Run 1
Code Structure: Methods logically separate loader dispatch, diagnostic loading, normal loading, iteration, and template listing. Nesting: Mostly shallow, though diagnostic loading and template listing contain several nested blocks. Clarity of intent: The class docstring and recognizable Jinja operations help, but names such as get2, get3, list2, loa3, and trv2 obscure responsibilities and data meaning. App and Scaffold annotations lack visible imports, and several imports are unused. Code length: Reasonably compact, although repeated complex type annotations and the nested template-listing loop add avoidable bulk. Action granularity: Statements generally perform one action per line, making individual operations easy to follow. Reading flow: Method ordering and straightforward control flow are coherent, but numbered identifiers, inconsistent annotation formatting, and the mid-method import interrupt reading.
Run 2
Code Structure: Responsibilities are logically separated into loading, loader iteration, and template listing methods. Nesting: Mostly shallow, although diagnostic loading and blueprint listing introduce moderate nesting. Clarity of intent: The class docstring and API calls help, but names such as get2, get3, list2, loa3, and trv2 obscure purpose and distinguish similar variables poorly. Code length: Fairly compact, though repeated complex return annotations and the explicit template-adding loop add avoidable verbosity. Action granularity: Statements generally perform one action per line, making individual operations easy to follow. Reading flow: Method ordering and straightforward control flow support comprehension, but numbered identifiers, a mid-method import, unused imports, and unexplained App and Scaffold type references interrupt reading.
Run 3
Code Structure: Methods logically separate dispatch, diagnostic loading, fast loading, loader iteration, and template listing. Nesting: Mostly shallow, although diagnostic loading and blueprint listing reach several levels. Clarity of intent: The class docstring and type annotations help, but names such as get2, get3, list2, tem4, loa3, and trv2 obscure roles and distinctions. Code length: Reasonably concise, though repeated complex return annotations and the explicit template-addition loop add verbosity. Action granularity: Statements generally perform one action per line, making operations easy to follow. Reading flow: Method ordering is sensible and exception handling is straightforward, but numbered identifiers, unused imports, unresolved App and Scaffold references in the snippet, and a mid-method import interrupt comprehension.