Sample
pyint-31df94551093-I04
Replace names with deterministic minifier-style shortest identifiers
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0.02 | 0–1; higher is more readable |
| Dorn | 0.857 | 0–1; higher is more readable |
| Mi | 0.584 | 0–1; higher is more readable |
| LLOC | 22 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 14.67 | 0–20; mean of three runs |
| GPT-6.1 Sol | 12.67 | 0–20; mean of three runs |
| BTTF | 0.75 | 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. | 696.883 | −22.997 |
| Source linesThe number of non-empty source lines. | 43 | +17.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.652 | −6.978 |
Intercept 8.87 + feature contributions = -3.905 (log-odds).
Score = sigmoid(-3.905) = 0.02.
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.026 | +0.686 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 44 | −0.522 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 73.795 | +0.386 |
| 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.955 | +0.321 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 29 | +0.266 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 42.788 | +0.188 |
Intercept 0.07 + feature contributions = 1.794 (log-odds).
Score = sigmoid(1.794) = 0.857.
| Score | 0.584 |
|---|
| Score | 22 |
|---|
Run 1
The code is generally readable with clear structure and intent. It defines a SessionMixin class with a property, attributes, and docstrings. However, there are notable issues: the property is named 'b' (ambiguous) while the parameter is 'c' (also unclear), which obscures intent. The mixing of type annotations (typing as t, collections.abc as c) is inconsistent with standard conventions. The docstrings are helpful but some comments feel redundant. The nesting is minimal, and the action granularity is appropriate, with one concept per line. Overall, the code is understandable but suffers from poor naming choices and slightly inconsistent style, preventing it from being highly readable.
Run 2
The code is generally readable but has notable issues. The structure is logical with a clear class definition and property, but the use of single-letter variable names ('b' for property, 'c' for setter parameter) reduces clarity and feels cryptic. The mixin provides good documentation via docstrings, which helps intent. Nesting is minimal, which is positive. However, the action granularity is clear—one action per line—but the code length is slightly padded by comments for simple attributes. Reading flow is natural, starting with imports and moving to class definition. The main detractor is the poor naming convention for the 'permanent' property and its setter, which hurts clarity of intent. Also, the 'b' property name doesn't reflect its purpose, making it hard to understand without reading docstrings. Overall, it's readable but could improve with better naming and removing some comments.
Run 3
The code has a clear purpose (session mixin) and includes helpful documentation. The class structure is logical, and the property decorator pattern for 'permanent' is straightforward. However, significant readability issues exist. The most obvious is the use of 'b' as both the property name and parameter name, which obscures intent completely. The property is documented as reflecting '_permanent' but named 'b' - a confusing mismatch. The parameter 'c' also lacks descriptive value. Several attributes (new, modified, accessed) mix class attributes with instance attributes, creating potential confusion about their scope. The docstring placement for 'accessed' after the attribute is inconsistent with its preceding comment style. Import aliasing (collections.abc as c) is unnecessary and confusing when the class already imports MutableMapping separately. While the code is concise and flat, the unclear naming and inconsistent documentation style reduce readability below what would be expected for this otherwise simple class.
Run 1
1. Code Structure: Imports and session attributes are logically grouped, though several imports are unused in this snippet. 2. Nesting: Minimal nesting makes the code easy to scan. 3. Clarity of intent: The class docstring and attribute documentation explain session behavior, but names such as b and c obscure meaning. The @permanent.setter decorator references an undefined property rather than b, creating a confusing inconsistency. 4. Code length: The implementation is concise, although comments and version metadata occupy substantially more space than the behavior. 5. Action granularity: Each statement performs one action, with no compressed multi-action lines. 6. Reading flow: The progression from imports to property methods and default attributes is natural, but inconsistent naming and mixed documentation styles interrupt comprehension.
Run 2
Code Structure: The mixin logically groups session attributes, but unused imports add clutter. Nesting: Minimal nesting makes the code easy to scan. Clarity of intent: Docstrings explain session behavior, but naming the property and setter 'b' and its parameter 'c' obscures their purpose. The decorator '@permanent.setter' references an undefined name rather than the declared property, creating a major mismatch between intent and implementation. Code length: The implementation is concise, though imports and lengthy documentation outweigh the executable code. Action granularity: Each statement performs a single action. Reading flow: The progression from property to session flags is natural, but cryptic names, the mismatched decorator, and inconsistent documentation placement interrupt comprehension.
Run 3
Code Structure: Imports and session attributes are logically grouped, but unused imports add clutter. Nesting: The class and short methods have minimal nesting. Clarity of intent: The class docstring and attribute documentation explain session behavior, but names such as 'b' and 'c' obscure meaning. The setter references '@permanent.setter' even though the property is named 'b', creating a significant inconsistency and an undefined reference. Code length: Methods are concise, although extensive documentation dominates this small snippet. Action granularity: Each executable line performs one clear action. Reading flow: The progression from property to session flags is reasonable, but inconsistent naming and mixed documentation styles interrupt comprehension.