Sample
pyint-79a8d982d386-I04
Replace names with deterministic minifier-style shortest identifiers
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0.001 | 0–1; higher is more readable |
| Dorn | 0.75 | 0–1; higher is more readable |
| Mi | 0.691 | 0–1; higher is more readable |
| LLOC | 27 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 9 | 0–20; mean of three runs |
| GPT-6.1 Sol | 16 | 0–20; mean of three runs |
| BTTF | 0.476 | 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. | 896.111 | −29.572 |
| Source linesThe number of non-empty source lines. | 49 | +19.6 |
| 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.172 | −6.258 |
Intercept 8.87 + feature contributions = -7.359 (log-odds).
Score = sigmoid(-7.359) = 0.001.
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. | 49 | −0.699 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 40 | +0.646 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 40 | −0.497 |
| 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.92 | +0.492 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.052 | +0.433 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 73.48 | +0.381 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 48.816 | +0.273 |
Intercept 0.07 + feature contributions = 1.099 (log-odds).
Score = sigmoid(1.099) = 0.75.
| Score | 0.691 |
|---|
| Score | 27 |
|---|
Run 1
The code has clear documentation and follows a logical structure with a class encapsulating annotation extraction. However, readability is hindered by several issues: the class name '_AnnotationExtractor' is reasonably descriptive, but method names 'a' and 'b' are meaningless and obscure intent. There is unnecessary repetition of 'import inspect' inside each method when it could be at module level or in __init__. Magic/private attributes like '_GenericAlias' and 'sig' reduce clarity. The code is relatively flat and concise, with one action per line mostly, but the vague method naming and redundant imports disrupt the natural reading flow. Clarity of intent is moderate due to docstrings, but poorly named methods force readers to examine implementations to understand purpose.
Run 2
The code has a clear purpose and some documentation, but suffers from poor naming (methods 'a' and 'b', class attribute 'sig'), short variable names, and unnecessary `import inspect` repeated inside methods. The structure is logical but the use of `__slots__`, mixed import styles, and terse expressions hurt clarity. Nesting is moderate. Reading flow is disrupted by unclear method names and ambiguous variable 'd'.
Run 3
This code is highly unreadable due to extremely poor naming choices. Methods named 'a' and 'b' completely obscure their intent, and the class name '_AnnotationExtractor' suggests this is internal tooling, but that doesn't excuse the lack of descriptive method names. The parameter 'c' is meaningless, and the repeated 'import inspect' inside methods despite being module-level compatible breaks Python conventions. While the code structure is somewhat logical and nesting is minimal, the action granularity is acceptable, but the overall reading flow is severely compromised by the cryptic identifiers. The code length is reasonable, but clarity of intent is nearly impossible to discern without reading every detail. The docstrings help somewhat, but the method names still violate the principle of self-documenting code. This appears to be intentionally obfuscated or auto-generated, not human-readable code that would pass any serious code review for maintainability.
Run 1
Code Structure: The class logically groups signature extraction and annotation access, though several unused imports add clutter. Nesting: Shallow conditionals and early returns keep complexity low. Clarity of intent: Docstrings explain the purpose, but method names a and b and variables c and d are vague; descriptive names would improve readability. Code length: Compact overall, although repeated local inspect imports and conversion of all parameters to a list add minor overhead to reading. Action granularity: Each statement performs a single clear action, with no compressed multi-action lines. Reading flow: Initialization followed by argument and return annotation access is natural. Consistent formatting and straightforward exception handling help, while the multiline condition slightly interrupts an otherwise smooth flow.
Run 2
Code Structure: The class logically groups signature inspection and annotation extraction, though unused top-level imports add clutter. Nesting: Shallow conditionals and early returns keep control flow simple. Clarity of intent: Docstrings explain the methods, but names such as a, b, c, and d obscure their roles; descriptive names would improve readability. Code length: The implementation is compact, although repeated local inspect imports and converting parameters to a list introduce minor verbosity. Action granularity: Each statement generally performs one action, making individual steps easy to follow. Reading flow: Initialization followed by argument and return annotation accessors is natural, and whitespace separates operations clearly. The multiline condition is readable but slightly disproportionate to its simplicity.
Run 3
Code Structure: The class logically groups signature inspection and annotation extraction, though unrelated imports add clutter. Nesting: Shallow conditionals and early returns keep complexity low. Clarity of intent: Docstrings clearly explain behavior, but method names a and b and variables c and d obscure meaning without consulting documentation. Code length: The implementation is reasonably concise, although repeated local inspect imports and a multiline condition introduce minor verbosity. Action granularity: Each statement performs a single action, making individual steps easy to follow. Reading flow: Initialization followed by argument and return annotation extraction creates a natural sequence; descriptive names and removing unused imports would improve readability.