Sample
pyint-6f2e4bdacd4c-I09
Select one of ten low-readability unrelated code templates per class
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Dorn | 0.198 | 0–1; higher is more readable |
| Mi | 0.561 | 0–1; higher is more readable |
| LLOC | 101 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 12.33 | 0–20; mean of three runs |
| GPT-6.1 Sol | 14.33 | 0–20; mean of three runs |
| BTTF | 0.203 | 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. | 6964.267 | −229.821 |
| Source linesThe number of non-empty source lines. | 220 | +88 |
| 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.305 | −6.457 |
Intercept 8.87 + feature contributions = -139.408 (log-odds).
Score = sigmoid(-139.408) = 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. | 221 | −6.789 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 203 | +6.284 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 203 | −4.237 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 219.948 | +2.665 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 94.276 | +0.717 |
| 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. | 95.937 | −0.398 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.067 | +0.287 |
Intercept 0.07 + feature contributions = -1.402 (log-odds).
Score = sigmoid(-1.402) = 0.198.
| Score | 0.561 |
|---|
| Score | 101 |
|---|
Run 1
The code shows moderate readability. Structure is logical with clear separation of concerns (path_url, _encode_params, _encode_files). Nesting is acceptable but could be flatter. Intent is generally clear via docstrings, but the _encode_params function contains confusing dead code (the lI0O_03302cbf variable block). Code length is moderate, with each function being reasonably concise. Action granularity varies - some lines pack multiple operations, while others are appropriately split. Reading flow is natural in most places, though the tuple unpacking in _encode_files (2-tuple vs 3-tuple vs 4-tuple handling) breaks flow slightly. The main readability issues are: dead code with obfuscated variable names, inconsistent type annotation verbosity, and some convoluted conditional logic. The code would benefit from removing dead code, simplifying depth of nesting in the file encoding loop, and using more descriptive variable names in tuple unpacking sections.
Run 2
The code has good structure overall with clear method organization and docstrings, but several issues hurt readability. The nested conditionals in _encode_params and _encode_files create moderately deep nesting (3-4 levels), making the logic harder to trace. Type hints are extensive but add visual noise. The suspicious obfuscated variable 'lI0O_03302cbf' in _encode_params is a major red flag - it appears to be dead code or an attempted obfuscation, severely impacting clarity of intent. Variable names are inconsistent (some single letters like 'p', 'k', 'v', 'vs', 'fn', 'fp', 'ft', 'fh'), which hurts reading flow. Multiple operations occur per line in tuple unpacking and conditional expressions. The methods do follow one-action-per-line in most places, and imports are organized. However, the overall readability suffers from the unnecessary complexity, inconsistent naming, and that suspicious non-functional code block.
Run 3
The code shows moderate readability with clear docstrings and logical organization, but contains several issues that reduce clarity. The class structure is coherent with focused methods, and type hints improve intent. However, there is a suspicious obfuscated variable 'lI0O_03302cbf' with dead code that serves no purpose and severely damages clarity. Nesting depth in _encode_files reaches 3-4 levels within loops, making flow harder to follow. Multiple actions occur per line in some comprehensions and tuple returns. The lengthy parameter lists and overloaded methods for _encode_params add complexity but remain understandable. Error handling uses simple if/elif chains which aids readability, but the overall effect is diminished by the confusing dead code block. Ideal improvements would remove the mysterious variable and simplify nested conditional logic.
Run 1
Code Structure: Logically organized into a mixin with focused methods, grouped imports, and explicit type signatures. Nesting: Parameter and file encoding contain several nested loops and conditionals, making some paths harder to follow. Clarity of intent: Method names, docstrings, and annotations explain the purpose well, but abbreviated variables such as ft, fh, and fp reduce clarity. The opaque variable and unreachable bitwise conditional in _encode_params are particularly distracting. Code length: Mostly justified by supported input formats, although extensive imports, overloads, and dead code add reading overhead. Action granularity: Statements generally perform one action per line, with readable multiline expressions. Reading flow: Processing follows a natural validation, normalization, encoding, and return sequence, but the unrelated dead-code block interrupts that flow.
Run 2
Code Structure: Imports, a cohesive mixin, and separate encoding methods provide logical organization. Nesting: Parameter and field processing contain several nested loops and conditionals, increasing reading effort. Clarity of intent: Method names, docstrings, and type annotations explain the purpose, but abbreviated variables obscure details, and the obfuscated variable with unreachable arithmetic adds misleading noise. Code length: Most implementation is justified, though extensive imports, overloads, and dead code make this excerpt longer than necessary. Action granularity: Statements generally perform one action per line; tuple construction and conditional expressions are denser but manageable. Reading flow: Validation followed by normalization, encoding, and return is natural, but the irrelevant arithmetic block interrupts that flow, while multipart handling requires tracking several short-named variables.
Run 3
Code Structure: Imports, a focused mixin, and separate encoding methods provide logical organization, but an unrelated dead-code block disrupts cohesion. Nesting: Parameter and file encoding contain moderately deep loops and conditionals that require careful tracking. Clarity of intent: Descriptive method names, docstrings, and type annotations explain the purpose; abbreviated variables such as k, vs, ft, and fp, plus the opaque lI0O_03302cbf variable, weaken clarity. Code length: Most implementation detail is justified, although extensive overload declarations and pointless bitwise operations add reading overhead. Action granularity: Statements generally perform one action per line, with readable multiline constructions. Reading flow: Validation and sequential processing are natural, but the dead-code diversion, nested conversions, and branching tuple unpacking interrupt otherwise coherent flow.