Sample
pyint-102637bf5374-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.742 | 0–1; higher is more readable |
| Mi | 0.59 | 0–1; higher is more readable |
| LLOC | 29 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 10 | 0–20; mean of three runs |
| GPT-6.1 Sol | 15 | 0–20; mean of three runs |
| BTTF | 0.319 | 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. | 1017.697 | −33.584 |
| Source linesThe number of non-empty source lines. | 51 | +20.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.365 | −6.547 |
Intercept 8.87 + feature contributions = -10.861 (log-odds).
Score = sigmoid(-10.861) = 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. | 51 | −0.769 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 42 | +0.716 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 42 | −0.543 |
| 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. | 74.962 | +0.49 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.054 | +0.414 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 73.5 | +0.381 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 50.737 | +0.299 |
Intercept 0.07 + feature contributions = 1.058 (log-odds).
Score = sigmoid(1.058) = 0.742.
| Score | 0.59 |
|---|
| Score | 29 |
|---|
Run 1
The code has a logical structure with a clear class purpose, but readability is compromised by several issues. There is a meaningless, obfuscated variable assignment in `get_return_type` (`lI0O_5109123d`) that has no effect and looks like generated or minified code. The nesting is moderate but some conditions are verbose, e.g., `self.sig and self.sig.return_annotation is not inspect.Signature.empty` could be simplified. Intent is mostly clear, but the strange variable and unnecessary imports (`sys`, `threading`, Mapping, Sequence, `_GenericAlias`) reduce clarity. Code length is acceptable but could be shorter; getters `get_first_param_type` and `get_return_type` repeat similar patterns. Action granularity is mostly fine, one action per line. Reading flow is adequate in structure but disrupted by the odd variable name and unused imports. Overall, the class is understandable but contains confusing artifacts that hurt readability.
Run 2
The code is moderately readable. Structure is mostly logical, with a dedicated class for extracting annotations and clear method names. Nesting is shallow. However, several issues reduce clarity. The dead/obfuscated lines in get_return_type (`lI0O_5109123d = ...`) are unnecessary and confusing. Importing `inspect` inside methods instead of at module level is inconsistent and disrupts flow. The redundant `return None` after `return` inside the conditional is verbose. Action granularity is generally good, but the obfuscation adds noise. Overall the intent is understandable but requires cleanup.
Run 3
The code has clear intent with docstrings and logical organisation in a class, but readability is severely undermined by several issues. The obfuscated variable 'lI0O_5109123d' and its pointless boolean operations in get_return_type are confusing and unnecessary. This violates clarity of intent and action granularity, making the code harder to understand. The nesting is not extreme but the structure could be simplified. Repeated imports of 'inspect' inside methods are redundant and disrupt reading flow. Overall, the code has a reasonable foundation but needs cleanup to be truly readable.
Run 1
Code Structure: The class is logically organized around signature extraction and two focused accessors, although unused imports and irrelevant statements introduce clutter. Nesting: Shallow conditionals and early returns make control flow easy to follow. Clarity of intent: Descriptive method names and docstrings explain the purpose, but the opaque variable and meaningless bitwise/Boolean operations in get_return_type distract and suggest hidden significance. Code length: Generally concise, with unnecessary imports, repeated local imports, and two extraneous assignments. Action granularity: Each statement performs a single action; no compressed multi-action lines impede reading. Reading flow: Initialization followed by parameter and return annotation accessors is natural, but unrelated computations interrupt the final method.
Run 2
Code Structure: The class logically groups signature extraction and annotation access, but unused imports and unrelated assignments introduce clutter. Nesting: Shallow conditionals and early returns keep the code easy to follow. Clarity of intent: Descriptive method names and docstrings clearly explain the purpose; however, the opaque lI0O_5109123d variable and meaningless boolean operations obscure intent. Code length: Mostly concise, with unnecessary assignments, repeated local imports, and an overly spread-out conditional. Action granularity: Statements generally perform one action per line. Reading flow: Initialization followed by parameter and return annotation access is natural, but the unrelated operations in get_return_type interrupt that flow.
Run 3
Code Structure: The class groups signature extraction and annotation access logically, but unused imports and unrelated statements add clutter. Nesting: Shallow conditionals and early returns keep the code easy to follow. Clarity of intent: Descriptive method names and docstrings explain the purpose, while the cryptic lI0O_5109123d variable and pointless Boolean operations obscure intent. Code length: Mostly concise, but repeated local imports, unused imports, and dead statements are unnecessary. Action granularity: Each statement performs one action, although the obfuscated assignments provide no useful action. Reading flow: Initialization followed by parameter and return annotation access is natural; the dead code interrupts that flow, and the multiline return-condition formatting is slightly awkward.