Sample
pyint-37e6e605cc34-I03
Replace names with length-matched meaningful but unrelated identifiers
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Dorn | 0.191 | 0–1; higher is more readable |
| Mi | 0.425 | 0–1; higher is more readable |
| LLOC | 78 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 7.67 | 0–20; mean of three runs |
| GPT-6.1 Sol | 11 | 0–20; mean of three runs |
| BTTF | 0.442 | 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. | 5483.526 | −180.956 |
| Source linesThe number of non-empty source lines. | 170 | +68 |
| 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.509 | −6.763 |
Intercept 8.87 + feature contributions = -110.85 (log-odds).
Score = sigmoid(-110.85) = 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. | 171 | −5.018 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 136 | +3.967 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 136 | −2.7 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 169.732 | +1.963 |
| 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. | 110.982 | −1.036 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 110.959 | +0.986 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.063 | +0.326 |
Intercept 0.07 + feature contributions = -1.443 (log-odds).
Score = sigmoid(-1.443) = 0.191.
| Score | 0.425 |
|---|
| Score | 78 |
|---|
Run 1
The code is moderately readable but suffers from poor naming and inconsistent abstraction. Structure is organized into logical sections (constructor, session transaction, request building, context management), but method names like 'validateMessage', 'refreshStatus', 'validateAccount', and 'load' are misleading and do not clearly communicate their actual purpose (session transaction, environment enrichment, request building, and request execution). Parameter names such as 'mode', 'target', 'step', 'window', 'node', 'option', 'nextData', 'primarySession', 'nextNode', 'operation', and 'map' further obscure intent. Nesting is acceptable, and long lines are generally broken reasonably, but dense branching in the 'load' method hampers readability. Action granularity is mostly one action per line, which helps. The docstrings are helpful but use inconsistent terminology compared to the renamed methods. Overall, the code has a logical skeleton but is obfuscated by non-standard naming conventions.
Run 2
The code is poorly readable due to several factors. Obscure variable names (e.g., 'mode', 'target', 'step', 'window', 'group', 'node', 'nextNode') replace Flask's standard/conventional names, making intent ambiguous. The naming of methods (e.g., `validateMessage` for session transaction, `refreshStatus` for environ base, `validateAccount` for request builder, `load` for open) obscures their actual functionality. The logic in `load` is tangled with nested conditionals, type checks, and clever context management, reducing clarity. Multiple actions are packed into single lines (e.g., dictionary construction, response handling). The reading flow is unnatural due to generic names and fragmented logic. While the structure is preserved, naming and granularity significantly hurt readability.
Run 3
The code is significantly undermined by meaningless, misleading names like 'validateMessage' for session transactions, 'refreshStatus' for environment updates, and 'load' for making requests. Single-letter variables such as 'key' and 'date' are used for critical objects (request context, session), obscuring intent. The logic in 'validateMessage' and 'load' is tangled and handles multiple type-branches densely, with several lines performing multiple actions. 'load' has deep nesting and mixed responsibilities (context management, request building, response handling). The natural flow is disrupted by obscure identifiers and inconsistent naming. Structure is loosely organized, but readability is poor due to lack of clarity and excessive complexity concentrated in a few methods.
Run 1
Code Structure: Methods separate session management, request preparation, and context cleanup logically. Nesting: Mostly shallow, with a manageable nested conditional in load. Clarity of intent: Severely weakened by misleading names such as validateMessage, validateAccount, date, and primarySession; map also shadows a built-in. The session_transaction example does not match the actual method name, and some comments reference nonexistent variables. Code length: Generally appropriate, though the lengthy docstring and repeated request-construction branches add reading overhead. Action granularity: Most lines perform one action, but chained calls and a long dictionary assignment require extra parsing. Reading flow: Context-management operations follow a coherent sequence, aided by comments and type hints, but inconsistent naming conventions and types not defined or imported in the snippet interrupt comprehension.
Run 2
Code Structure: Methods separate initialization, session handling, request construction, and context cleanup logically. Nesting: Mostly shallow, with manageable conditional branching in load. Clarity of intent: The main weakness is misleading names such as validateMessage, validateAccount, date, map, and primarySession, which obscure actual session and request operations. Docstrings and comments reference names absent from the implementation, increasing confusion. Code length: Reasonably concise for the functionality, although the long session docstring contrasts with unclear naming. Action granularity: Generally one action per line, with a few dense expressions and long calls. Reading flow: Method boundaries, early exits, and cleanup blocks support sequential reading, but inconsistent naming conventions and undefined-in-snippet types and helpers interrupt comprehension. Overall, sound structural organization is substantially undermined by ambiguous identifiers and documentation mismatches.
Run 3
Code Structure: Methods separate session management, request construction, and context cleanup logically. Nesting: Mostly shallow, with manageable branching in load. Clarity of intent: The main weakness is misleading names such as validateMessage, validateAccount, date, map, and primarySession; these obscure session and request operations. Docstrings and comments help, but references to session_transaction and args do not match the renamed code. Code length: Generally proportionate to the functionality, although lengthy documentation contrasts with unclear identifiers. Action granularity: Most lines perform one action, making individual statements easy to follow. Reading flow: Execution is reasonably sequential, and cleanup patterns are explicit, but inconsistent naming conventions, long expressions, and types or helpers not defined in the excerpt interrupt comprehension.