Sample
pyint-afd4a9c92359-I04
Replace names with deterministic minifier-style shortest identifiers
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Dorn | 0.668 | 0–1; higher is more readable |
| Mi | 0.625 | 0–1; higher is more readable |
| LLOC | 25 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 8.67 | 0–20; mean of three runs |
| GPT-6.1 Sol | 12 | 0–20; mean of three runs |
| BTTF | 0.459 | 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. | 1680.564 | −55.459 |
| Source linesThe number of non-empty source lines. | 62 | +24.8 |
| 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.479 | −6.718 |
Intercept 8.87 + feature contributions = -28.507 (log-odds).
Score = sigmoid(-28.507) = 0.
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 62 | −1.159 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 53 | +1.096 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 53 | −0.795 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 84.873 | +0.565 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 61.93 | +0.456 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.056 | +0.401 |
| 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. | 84.952 | +0.067 |
Intercept 0.07 + feature contributions = 0.701 (log-odds).
Score = sigmoid(0.701) = 0.668.
| Score | 0.625 |
|---|
| Score | 25 |
|---|
Run 1
The code is poorly readable due to heavy obfuscation. Variable names like 'b', 'c', 'd', 'e', 'f', 'g', 'h' obscure intent, violating 'clarity of intent' and 'reading flow'. The method name 'a' is meaningless. The logic is linear and nesting is minimal, but the structure suffers because the original semantic naming (year, month, day, queryset, date_value, lookup_kwargs) is gone. Action granularity is mostly one action per line, which helps, but the cryptic variables force the reader to reconstruct meaning from context. Code length is reasonable, but the deliberate renaming undermines maintainability and comprehension.
Run 2
The code's structure is logical but suffers from poor naming: parameters, variables, and methods are single-character or abbreviated (a, b, c, d, e, f, g, h), making intent unclear. Though nesting is minimal and flow is linear, the obfuscated names force readers to infer types and purposes. Action granularity is mostly one per line, but the density of unclear operations reduces readability. The method 'a' and parameter 'b' are especially problematic, and the date string construction is compact but hard to follow without descriptive names. Overall, the logic is straightforward but the intentional obfuscation drops readability significantly.
Run 3
The code structure is generally logical, but the use of single-letter variable names (a, b, c, d, e, f, g, h) severely harms clarity of intent and reading flow. The nesting is low, which is good, and action granularity is reasonable, but the ambiguous naming makes the code difficult to understand without deep analysis. The original Django code likely used descriptive names like 'request', 'queryset', 'year', 'month', etc., which would make the logic self-documenting. Here, readers must mentally map what each letter represents, increasing cognitive load. The docstring helps, but it doesn't compensate for the poor variable naming. The code length is acceptable and framework use is standard, but the obfuscated identifiers undermine the otherwise clean structure.
Run 1
Code Structure: The method is logically organized into date extraction, queryset selection, future-date validation, filtering, and object retrieval. Nesting: Only one conditional block keeps nesting shallow. Clarity of intent: The class docstring, comments, and framework calls explain the overall purpose, but the method name 'a' and variables 'b' through 'h' obscure their roles and require repeated tracing. Code length: The implementation is reasonably concise, although several imports are unused in this snippet and the exception formatting occupies substantial space. Action granularity: Statements generally perform one action each, and multiline calls are clearly formatted. Reading flow: Execution proceeds naturally from input extraction to retrieval, but opaque identifiers interrupt comprehension, and comments referring to get_object contrast with the method's actual name.
Run 2
Code Structure: The method follows a logical sequence: parse the date, select a queryset, validate future-date access, filter, and retrieve the object. Nesting: Shallow nesting and a single conditional keep control flow simple. Clarity of intent: The class docstring and comments explain the purpose, but the method name 'a' and variables 'b' through 'h' obscure meaning and require readers to infer their roles. Code length: The implementation is reasonably concise; multiline formatting adds length but improves legibility. Action granularity: Statements generally perform one action per line, with a straightforward conditional expression for queryset selection. Reading flow: Execution proceeds naturally, but opaque identifiers interrupt comprehension, and unused imports and mixins not defined in the snippet add contextual noise.
Run 3
Code Structure: The class and method follow a logical sequence: extract date components, build a date, select a queryset, reject future dates, filter, and retrieve the object. Nesting: Control flow is shallow, with only one conditional block. Clarity of intent: The class docstring, comments, and descriptive helper names explain the purpose, but the method name 'a' and variables 'b' through 'h' obscure important roles and undermine readability. Code length: The method is reasonably concise; multiline formatting improves legibility, though several imports are unused in this snippet. Action granularity: Each statement generally performs one action, with a straightforward conditional expression for queryset selection. Reading flow: Execution proceeds naturally, but readers must repeatedly infer what anonymous variables represent. Inherited mixins and the date-parsing helper require external context.