Sample
pyint-de647292a81c-I04
Replace names with deterministic minifier-style shortest identifiers
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Dorn | 0.564 | 0–1; higher is more readable |
| Mi | 0.769 | 0–1; higher is more readable |
| LLOC | 36 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 10.33 | 0–20; mean of three runs |
| GPT-6.1 Sol | 14 | 0–20; mean of three runs |
| BTTF | 0.251 | 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. | 1864.969 | −61.544 |
| 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.449 | −6.674 |
Intercept 8.87 + feature contributions = -25.748 (log-odds).
Score = sigmoid(-25.748) = 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. | 85 | −1.973 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 57 | +1.234 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 57 | −0.887 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 83.912 | +0.763 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 78.953 | +0.469 |
| 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. | 78.941 | +0.322 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.07 | +0.261 |
Intercept 0.07 + feature contributions = 0.259 (log-odds).
Score = sigmoid(0.259) = 0.564.
| Score | 0.769 |
|---|
| Score | 36 |
|---|
Run 1
The code has some readability issues. The structure is logical with a single class and clear methods, but the naming conventions are poor: single-letter parameters (c, e, f, i) and local variables (d, g, h, j, k) obscure intent. The docstrings are misleading—'a' claims to parse *s* but takes parameter *c*, and there's no clear indication of what actions the methods perform based on their names. Method 'b' has multiple responsibilities (validation and transformation) and uses NotImplementedError for flow control, which is unusual. While nesting is minimal and each line generally performs one action, the constant need to mentally map cryptic names to types hampers reading flow. The version comparison logic in the tuple transformation is not immediately obvious. The class-level attributes are clear, and imports are clean, but the overall clarity of intent suffers significantly from the obfuscated naming throughout the methods.
Run 2
The code is generally readable with clear class structure, logical organization, and good use of decorators and type hints. The class docstring provides useful examples. However, readability is reduced by non-descriptive method and parameter names: 'a', 'b', 'c', 'e', 'f', 'g', 'h', 'i', 'j', 'k' are all unclear. The method 'b' performs multiple actions (type checking, validation, transformation) which affects action granularity. The parsing logic in 'a' is straightforward but the parameter name 'c' obscures intent. The code structure is flat and avoids deep nesting. Imports are organized. The docstrings help explain behavior, but the naming conventions significantly impact clarity of intent and reading flow. The code length is concise for what it does.
Run 3
The code has some positive aspects: it uses dataclass-like attrs, decorators for ordering, and keeps methods relatively short. However, readability is significantly harmed by meaningless variable names (a, b, c, d, e, f, g, h, i, j, k) and method names (a, b). The docstrings are unhelpful and sometimes misleading (e.g., 'Parse *s*' but argument is 'c', and the class docstring refers to attr.VersionInfo while code is VersionInfo). The b method mixes validation and transformation logic, making intent unclear. Nesting is shallow, which is good, but error handling and return logic add cognitive load. The class docstring examples are extensive but not directly tied to method behavior. Overall, the structure is logical but obscured by poor naming and inconsistent documentation, reducing clarity.
Run 1
Code Structure: The class logically groups version fields, parsing, comparison normalization, comparisons, and hashing. Nesting: Shallow conditionals and short try/except blocks are easy to follow. Clarity of intent: Descriptive fields, examples, and the release-order comment help, but methods a and b and variables c through k obscure their roles. The parsing docstring references s and _VersionInfo rather than the actual parameter and class, adding confusion. Code length: Compact overall, with useful documentation and little unnecessary implementation. Action granularity: Most lines perform one clear action; tuple unpacking and constructor arguments remain manageable. Reading flow: Methods follow a natural progression, but cryptic names require readers to repeatedly infer meanings, and using NotImplementedError as an internal comparison signal introduces some indirection.
Run 2
Code Structure: The class logically groups version fields, parsing, comparison normalization, comparison operators, and hashing. Nesting: Shallow conditionals and short try/except blocks keep complexity low. Clarity of intent: Descriptive field names, examples, and the release-level comment help, but methods a and b and variables c through k obscure their purposes. The parsing docstring references s and _VersionInfo instead of the actual parameter and class, adding confusion. Code length: Methods are concise, with little unnecessary repetition beyond the parallel comparison implementations. Action granularity: Most lines perform a single operation; tuple unpacking and the constructor call remain manageable. Reading flow: The progression from fields to parsing and comparison is natural, but cryptic identifiers force readers to repeatedly inspect implementations to understand relationships.
Run 3
Code Structure: The class logically groups version fields, parsing, comparison normalization, comparisons, and hashing. Nesting: Shallow conditionals and short try/except blocks keep complexity low. Clarity of intent: Descriptive field names, examples, and the release-level comment explain the purpose, but methods a and b and variables c through k obscure their roles. Docstrings also reference names absent from the signatures and inconsistently name the class. Code length: Methods are concise, with little unnecessary code; the long class docstring provides useful examples. Action granularity: Most lines perform one action, though constructor arguments are compressed onto one line. Reading flow: Organization is natural and consistent, but cryptic identifiers force readers to repeatedly infer meaning. Overall, the straightforward structure is readable despite substantial naming weaknesses.