Sample
pyint-8b34b4e53a9c-I02
Shorten method, parameter, and local names without collisions
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Dorn | 0.342 | 0–1; higher is more readable |
| Mi | 0.738 | 0–1; higher is more readable |
| LLOC | 58 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 6.67 | 0–20; mean of three runs |
| GPT-6.1 Sol | 13 | 0–20; mean of three runs |
| BTTF | 0.476 | 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. | 3925.211 | −129.532 |
| Source linesThe number of non-empty source lines. | 195 | +78 |
| 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.028 | −6.042 |
Intercept 8.87 + feature contributions = -48.704 (log-odds).
Score = sigmoid(-48.704) = 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. | 196 | −5.903 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 168 | +5.074 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 168 | −3.434 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 194.962 | +2.315 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 75.342 | +0.411 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.055 | +0.408 |
| 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. | 76.98 | +0.405 |
Intercept 0.07 + feature contributions = -0.655 (log-odds).
Score = sigmoid(-0.655) = 0.342.
| Score | 0.738 |
|---|
| Score | 58 |
|---|
Run 1
This code is difficult to read due to poor naming conventions and unclear structure. Parameters like 'def3', 'val2', 'rep', 'cmp', 'has', 'ini', 'con2', 'met', 'typ', 'kw', 'eq2', 'eq3', 'ord', 'order2', 'on', and 'ali' are cryptic and do not convey intent. Method names such as 'val', 'def2', and 'con' are equally ambiguous. The class __attrs_attrs__ construction is tangled and repetitive, making the logical organization hard to follow. While the code is not deeply nested, the lack of clarity and the use of abbreviated, non-descriptive identifiers severely impair readability. The reading flow is disorganized, and the action granularity is mixed, with some lines doing too much conceptually. Overall, the code appears to be a low-level internal structure but lacks sufficient documentation or clear naming to support comprehension.
Run 2
The code has a clear underlying purpose (attribute representation in the attrs library) and some structure, but readability is significantly undermined by extremely poor naming conventions. Parameter names like `def3`, `val2`, `con2`, `met2`, `eq2`, `eq3`, and `ord` are cryptic and obscure intent, making the `__init__` and decorator methods hard to follow. The `__init__` method takes 16 positional parameters, requiring readers to mentally map abbreviations to their true meaning. The class-level `__attrs_attrs__` construction combines generator expressions with tuple unpacking, which is clever but impairs clarity. The methods `val`, `def2`, and `con` are also non-descriptive. Positively, logical organization is reasonable, indentation is flat, and comments/docstrings exist, but the abstracted naming and dense multi-action lines (especially in `__attrs_attrs__`) reduce overall readability. The code assumes deep domain knowledge, and while concise in places, it sacrifices self-documentation. It reads as optimized for internal use rather than maintainability by newcomers.
Run 3
The code is extremely difficult to read due to heavily obfuscated naming (e.g., def3, val2, met2, con2, eq2, ord) that obscures intent. The class structure mixes metadata definitions with logic and uses abbreviated parameter names throughout, making it hard to follow. While the module-level imports and some docstrings are clear, the core methods like val(), def2(), and con() are cryptic and inconsistently named. Nesting is moderate, but the long tuple initialization inside __attrs_attrs__ is dense and hard to parse. Action granularity is reasonable in most methods, but the tuple comprehension and unpacking reduce clarity. Overall, the code lacks self-documenting structure and consistent naming, making maintenance difficult.
Run 1
1. Code Structure: Logically organized around a single attribute representation class, with initialization and separate decorator methods; the lengthy metadata declaration adds visual weight. 2. Nesting: Mostly flat, with simple conditionals and one comprehension, making control flow easy to follow. 3. Clarity of intent: The class docstring and descriptive instance attributes help, but cryptic parameters such as def3, eq2, and met4 and method names like def2 and con obscure meaning. Docstrings referring to meth rather than actual parameter names further weaken clarity. 4. Code length: Repetitive Attribute configuration, a large constructor signature, and numerous imports unused in this excerpt reduce concision. 5. Action granularity: Assignments and operations generally occupy separate lines, supporting readability. 6. Reading flow: Methods follow straightforward sequences, but decoding abbreviated names and navigating verbose class-level declarations interrupt otherwise natural reading.
Run 2
Code Structure: The class is logically organized into attribute declarations, initialization, and decorator helpers, but numerous imports and external definitions obscure standalone understanding. Nesting: Control flow is shallow, with simple conditionals; the tuple construction adds only moderate nesting. Clarity of intent: The class docstring and descriptive instance attributes explain the purpose, but cryptic names such as def3, val2, eq3, met4, and def2 substantially weaken readability. Docstrings referring to meth rather than actual parameter names add inconsistency. Code length: Explicit metadata declarations and the long constructor are verbose, although most lines serve a recognizable purpose. Action granularity: Assignments and operations are consistently separated, making individual steps easy to follow. Reading flow: Methods proceed naturally from checks to updates and returns, but the large metadata block and opaque constructor parameters interrupt comprehension.
Run 3
Code Structure: The class is logically organized into metadata, initialization, and decorator methods, though numerous imports and external dependencies add clutter. Nesting: Control flow is shallow, with simple conditionals; the metadata comprehension is moderately layered. Clarity of intent: The class docstring and descriptive instance attributes explain its purpose, but cryptic names such as def3, eq2, met4, val, and con obscure parameter meanings and method roles. Some docstrings reference meth rather than actual parameter names. Code length: Methods are concise, but repetitive Attribute configuration and a lengthy constructor make the class verbose. Action granularity: Statements generally perform one action per line, making state changes easy to follow. Reading flow: Consistent formatting and sequential assignments support scanning, but readers must repeatedly map abbreviated arguments to meaningful attributes and resolve definitions absent from the snippet.