Sample
pyint-55aec3122454-I03
Replace names with length-matched meaningful but unrelated identifiers
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Dorn | 0.64 | 0–1; higher is more readable |
| Mi | 0.598 | 0–1; higher is more readable |
| LLOC | 145 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 6.67 | 0–20; mean of three runs |
| GPT-6.1 Sol | 10 | 0–20; mean of three runs |
| BTTF | 0.334 | 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. | 8948.982 | −295.316 |
| Source linesThe number of non-empty source lines. | 298 | +119.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.392 | −6.588 |
Intercept 8.87 + feature contributions = -173.835 (log-odds).
Score = sigmoid(-173.835) = 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. | 299 | −9.55 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 198 | +6.111 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 297.859 | +3.754 |
| 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. | 133.98 | −2.01 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 133.99 | +1.357 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.051 | +0.443 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
Intercept 0.07 + feature contributions = 0.573 (log-odds).
Score = sigmoid(0.573) = 0.64.
| Score | 0.598 |
|---|
| Score | 145 |
|---|
Run 1
This code is exceptionally difficult to read due to pervasive semantic misnaming. Method and variable names are unrelated to their actual functions: 'dispatch' acts like keys(), 'save' like keys(), 'findResult' like values(), 'filter' like values(), 'configure' like items(), 'parse' like items(), 'load' like set(), 'route' like get(), 'validateRequest' like _find, 'parseCount' wraps set_cookie, 'detect' wraps update, 'loadWindow' returns policy, 'loadItem' filters by domain/path, 'removeRecord' lists domains, etc. Parameters are equally confusing: 'size' means name, 'order' means value, 'source' means domain, 'step' means path, 'buffer' means cookie, 'document' means value, 'window'/'region'/'client'/'option'/'config' mean Cookie. This breaks the fundamental contract between identifiers and their purpose, forcing readers to constantly translate. The heavy use of unrelated identifiers makes even short methods incomprehensible. While the code is structurally flat and lines are concise, the complete obfuscation of intent destroys readability. The documentation repeats the misleading names rather than clarifying them. This appears to be intentionally obfuscated code masquerading as a cookie jar implementation.
Run 2
The code has significant readability issues. Method names like 'load', 'dispatch', 'save', 'filter', 'parse', 'configure', 'removeRecord', 'updateNode', 'validateSession', 'loadItem', 'parseCount', 'detect', 'route', 'validateRequest', 'read', and 'loadWindow' do not clearly describe their actual functionality, making intent unclear. Parameter names are inconsistent and often unrelated to their purpose (e.g., 'size', 'order', 'source', 'step', 'buffer', 'token', 'client'). Several methods have confusing names that don't match their documented behavior in docstrings. While the code structure is organized with clear class and method separation, and nesting levels are generally low, the extensive use of misleading names and inconsistent parameter semantics significantly hampers readability. There is some nesting in conditional loops which adds complexity. The code is concise per line but the naming problems make the overall flow disorganized. The type hints and docstrings are present but don't overcome the semantic confusion in naming choices.
Run 3
The code suffers from obfuscated naming (e.g., 'size'/'order' for cookie name/value, 'dispatch'/'save' for keys), which severely harms clarity of intent. Parameter names do not reflect their purpose, making the dict-like interface confusing. Nesting in methods like `validateRequest` reaches four levels, reducing readability. Structure is logical at the class level, but many methods contain unnecessary comments and type ignores. Code length is reasonable, but action granularity is mixed. Reading flow is disrupted by semantic mismatches between method names and their documented behavior.
Run 1
Code Structure: Methods are logically separated within one class, though imports are inconsistently grouped. Nesting: Most methods are shallow, but cookie lookup methods contain three to four nested conditions that impede scanning. Clarity of intent: The largest weakness is misleading method and variable names, such as add, removeRecord, size, and document, which obscure cookie operations. Docstrings help explain intent but reference method and parameter names that do not match the implementation. Code length: Individual methods are generally short, although repetitive wrappers, lookup logic, and lengthy documentation increase overall reading effort. Action granularity: Statements usually perform one action per line; the assignment expression adds only minor complexity. Reading flow: Consistent indentation, type annotations, and spacing support navigation, but arbitrary naming, inconsistent naming conventions, and documentation mismatches repeatedly interrupt comprehension.
Run 2
Code Structure: Methods are logically grouped within a single class, with useful separation of responsibilities. Nesting: Most methods are shallow, but cookie lookup methods contain several avoidable nested conditions. Clarity of intent: The main weakness is misleading method and variable names, such as add for retrieval, load for assignment, and size for a cookie name. Docstrings help, but often reference different method or parameter names, forcing readers to reconcile inconsistencies. Code length: Individual methods are generally concise, although repeated iteration patterns and lengthy boilerplate documentation increase overall length. Action granularity: Statements generally perform one action per line; the assignment expression adds minor complexity. Reading flow: Consistent formatting and type annotations support scanning, but inconsistent naming conventions, misplaced imports, and mismatches between documentation and implementation interrupt comprehension.
Run 3
Code Structure: Methods are separated logically within one class, but arbitrary naming obscures relationships between operations. Nesting: Most methods are shallow, although route and validateRequest contain three to four nested conditions that hinder scanning. Clarity of intent: The main weakness is misleading names such as add, removeRecord, and updateNode, plus generic parameters such as size, step, and flag. Docstrings explain cookie operations but frequently reference different method and parameter names, creating confusion. Code length: Individual methods are generally concise, though repetitive lookup logic and lengthy, partly inconsistent documentation add bulk. Action granularity: Most lines perform one action; the assignment expression in parseCount introduces only minor complexity. Reading flow: Consistent indentation, whitespace, and type annotations help, but mixed naming conventions, misplaced threading import, and mismatches between documentation and implementation disrupt natural reading.