Sample
pyint-097517c29860-I02
Shorten method, parameter, and local names without collisions
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Dorn | 0.761 | 0–1; higher is more readable |
| Mi | 0.68 | 0–1; higher is more readable |
| LLOC | 20 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 4.67 | 0–20; mean of three runs |
| GPT-6.1 Sol | 14 | 0–20; mean of three runs |
| BTTF | 0.185 | 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. | 750.633 | −24.771 |
| Source linesThe number of non-empty source lines. | 24 | +9.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.783 | −7.175 |
Intercept 8.87 + feature contributions = -13.476 (log-odds).
Score = sigmoid(-13.476) = 0.
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| 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. | 45.96 | +1.719 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 0 | −0.804 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 25 | +0.151 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.083 | +0.138 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 24 | −0.13 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 24 | +0.093 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 23.681 | −0.079 |
Intercept 0.07 + feature contributions = 1.157 (log-odds).
Score = sigmoid(1.157) = 0.761.
| Score | 0.68 |
|---|
| Score | 20 |
|---|
Run 1
The code is largely unreadable due to several critical issues. The class inherits from an undefined base class 'JSONTag', making it impossible to understand the context. Method names are meaningless: 'che', 'to', and 'to2' convey no information about their purpose. The parameter names are equally unhelpful: 'val', 'val2', and 'val3' do not indicate what values are expected. The methods lack docstrings or comments explaining their roles. The key attribute uses a leading space which appears to be a typo or intentionally obscure. The b64encode call references 'val2' with no type checking or validation, and b64decode lacks the 'validate' parameter that would typically be expected. The code structure is incomplete and the methods appear to be incorrectly named or organized. The only redeeming qualities are the proper import statements and the use of type hints, but these are overshadowed by the confusing naming and missing context.
Run 2
The code suffers from multiple readability issues. The class `TagBytes` inherits from `JSONTag`, which is undefined in the provided snippet, creating ambiguity. Method names are unclear: `che`, `to`, and `to2` don't convey intent, and parameter names like `val2` and `val3` add to the confusion. There's inconsistency in import style (some from same module on separate lines, others grouped) and unused imports (`datetime`, `UUID`, `Markup`, etc.) that create noise. The logic, while simple, is obscured by poor naming and a missing parent class definition. The code is concise but at the cost of clarity. Structure and formatting are otherwise acceptable, but without meaningful names or context, the purpose of the class is difficult to discern. Overall, the code is difficult to read and maintain.
Run 3
The code lacks clarity and completeness. It defines a class 'TagBytes' inheriting from 'JSONTag', but 'JSONTag' is not imported, making the code non-functional. Method names 'che', 'to', and 'to2' are ambiguous and inconsistent—'che' is undefined. Parameters like 'val', 'val2', and 'val3' are vague, reducing readability. The code has minimal nesting and is short, but the missing import, unclear naming, and broken method signatures hurt comprehension. Action granularity is reasonable—one action per line—but the reading flow is disjointed. Without context or imports, intent is unclear, and the class structure appears fragmented.
Run 1
Code Structure: Imports and a small class are logically organized, but several unused imports add clutter, and JSONTag is not defined or imported in the snippet. Nesting: Minimal nesting makes the code easy to scan. Clarity of intent: TagBytes and the base64 operations suggest byte serialization, but method names che, to, and to2 obscure their roles; val2 and val3 are also uninformative. Code length: The class is concise, although the imports are disproportionate to its functionality. Action granularity: Each statement performs a focused action; the chained encoding and decoding expression remains understandable. Reading flow: The progression from type checking to encoding and decoding is natural, but cryptic names and missing context interrupt comprehension.
Run 2
Code Structure: The class is logically organized into a type check and two conversion methods, but numerous unused imports add clutter and JSONTag is not defined or imported in the snippet. Nesting: Methods are flat and easy to scan. Clarity of intent: TagBytes and the Base64 operations suggest byte serialization, but che, to, and to2 obscure method roles; val2 and val3 are uninformative, and broad Any annotations offer little guidance. Code length: The implementation is concise, though the import block is disproportionately long. Action granularity: Each method has one straightforward return statement; chaining encoding and decoding on one line remains readable. Reading flow: Consistent formatting and method order support a natural progression, but ambiguous names and unexplained key metadata interrupt understanding.
Run 3
Code Structure: Imports and a small class are logically organized, but several imports are unused and JSONTag is not defined or imported in the snippet. Nesting: Flat methods with no branching make the code easy to scan. Clarity of intent: TagBytes and the base64 operations suggest byte serialization, but che, to, to2, and val2/val3 are vague names that obscure method roles. The tag key is also unexplained. Code length: The implementation is concise, although unused imports add clutter. Action granularity: Each method contains one clear return expression; the encode-and-decode chain is compact and understandable. Reading flow: The progression from type checking to encoding and decoding is natural, but ambiguous naming and missing context interrupt comprehension.