Sample
pyint-244ce8f577f0-I03
Replace names with length-matched meaningful but unrelated identifiers
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Dorn | 0.438 | 0–1; higher is more readable |
| Mi | 0.491 | 0–1; higher is more readable |
| LLOC | 99 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 7 | 0–20; mean of three runs |
| GPT-6.1 Sol | 11 | 0–20; mean of three runs |
| BTTF | 0.427 | 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. | 5739.682 | −189.41 |
| Source linesThe number of non-empty source lines. | 326 | +130.4 |
| 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.386 | −6.579 |
Intercept 8.87 + feature contributions = -56.719 (log-odds).
Score = sigmoid(-56.719) = 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. | 326 | −10.506 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 147 | +4.347 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 325.741 | +4.143 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.03 | +0.652 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 83.18 | +0.538 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| 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. | 83.945 | +0.11 |
Intercept 0.07 + feature contributions = -0.249 (log-odds).
Score = sigmoid(-0.249) = 0.438.
| Score | 0.491 |
|---|
| Score | 99 |
|---|
Run 1
The code has a logical class structure and each method follows a similar pattern, but it is severely undermined by confusing naming. Methods like readMessage, validateRequest, saveAddress, fetchConfig, fetchItem, refreshValue, and refreshRecord have names that do not clearly indicate what they do (e.g., saveAddress reads a Python config file). Parameter names (backupMessage, customer, window, age, request, map, mode) are equally opaque, making the control flow hard to follow without reading the docstrings. The docstrings are detailed but describe original names, not the renamed ones, increasing confusion. Nesting is low, which is good, and lines are generally one action each, but the odd variable reuse (e.g., reassigning customer, map) and mixed conceptual roles reduce clarity. The code is not unreadable in terms of structure, but the pervasive naming inconsistency significantly harms intent clarity and reading flow.
Run 2
The code is poorly readable due to misleading naming (readMessage, saveAddress, validateRequest) that obscures the actual Flask config-file functionality. Docstrings reference different parameters than the signatures, creating confusion. Nesting is moderate but traversal logic in validateRequest and refreshRecord is tangled. Variable names like 'map', 'mode', 'age', 'request' are cryptic and reused inconsistently. Some methods are long and mix setup, I/O, error handling, and logic. The reading flow is disrupted by generic type aliases and deprecated patterns. While some structure exists, the intent is ambiguous, and action granularity is uneven.
Run 3
The code shows significant readability problems despite some structural elements being in place. The most critical issue is the misleading naming: methods like 'readMessage', 'validateRequest', 'saveAddress', 'fetchConfig', and 'refreshValue' have no clear relationship to their actual functionality (loading env vars, config files, etc.), making intent extremely ambiguous. Parameter names are equally confusing ('backupMessage' for env var name, 'customer' for filename, 'age' for object, 'map' for key, 'cachedEvent' for file handle). The docstrings describe different parameter names than those actually used, further obscuring understanding. While the code has reasonable flat structure and one-action-per-line granularity, the severe naming mismatches force readers to constantly cross-reference documentation and mentally map between intended and actual names. The class inherits from dict but overrides methods in ways that suggest obfuscation rather than clear design. Technical operations like file loading and env parsing are correct but hidden behind nonsensical abstractions.
Run 1
Code Structure: Methods separate configuration-loading responsibilities logically, with little tangled logic. Nesting: Mostly shallow; early returns and continue statements keep loops manageable, although nested dictionary traversal adds complexity. Clarity of intent: The main weakness is misleading method and variable names such as saveAddress, age, and primaryAccount. Docstrings describe configuration behavior but reference different method and parameter names, creating confusion. The silent keyword passed to saveAddress also conflicts with its window parameter. Code length: Implementations are reasonably concise, but lengthy, outdated docstrings dominate the file and impede scanning. Action granularity: Most lines express one action; the nested compile/exec expression is denser but localized. Reading flow: Consistent formatting, type hints, and conventional control flow help, but arbitrary naming, reused variables, shadowing of map, and documentation mismatches repeatedly interrupt comprehension.
Run 2
1. Code Structure: Well-separated methods organize configuration-loading operations logically. 2. Nesting: Generally shallow; early returns and continue statements keep control flow manageable, although nested environment-key handling adds complexity. 3. Clarity of intent: The main weakness is misleading method and variable names such as saveAddress, age, and primaryAccount. Docstrings reference different method and parameter names, making the interface confusing. The silent keyword passed to saveAddress also conflicts with its window parameter. 4. Code length: Implementation bodies are reasonably concise, but extensive, outdated documentation substantially increases reading effort. 5. Action granularity: Most lines perform one clear operation; the combined read, compile, and exec expression is comparatively dense. 6. Reading flow: Consistent indentation, type hints, and conventional exception handling support readability, but unrelated naming, shadowing the built-in map, and documentation mismatches repeatedly interrupt comprehension.
Run 3
Code Structure: Well-separated methods organize configuration loading, filtering, and extraction logically. Nesting: Mostly shallow, with early returns and continue statements limiting complexity; nested environment traversal remains manageable. Clarity of intent: Severely weakened by misleading names such as saveAddress, age, and primaryAccount. Docstrings reference different method and parameter names, forcing readers to reconcile documentation with implementation. The silent keyword passed to saveAddress also conflicts with its window parameter. Code length: Implementations are reasonably concise, but lengthy, outdated docstrings dominate the listing and increase reading effort. Action granularity: Generally one action per line, although the combined read, compile, and exec expression is comparatively dense. Reading flow: Consistent formatting, type hints, and localized error handling help, but arbitrary naming, reuse of variables for different roles, and shadowing map disrupt comprehension. Overall, sound structural organization is undermined by poor semantic naming and documentation inconsistencies.