Sample
pyint-dc6a7d313abe-I03
Replace names with length-matched meaningful but unrelated identifiers
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0.03 | 0–1; higher is more readable |
| Dorn | 0.777 | 0–1; higher is more readable |
| Mi | 0.469 | 0–1; higher is more readable |
| LLOC | 9 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 15.67 | 0–20; mean of three runs |
| GPT-6.1 Sol | 15 | 0–20; mean of three runs |
| BTTF | 0.529 | 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. | 379.567 | −12.526 |
| Source linesThe number of non-empty source lines. | 18 | +7.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.679 | −7.019 |
Intercept 8.87 + feature contributions = -3.475 (log-odds).
Score = sigmoid(-3.475) = 0.03.
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.043 | +0.522 |
| 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. | 77.947 | +0.364 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 19 | +0.364 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 13 | −0.287 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 65.737 | +0.256 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 17.81 | −0.161 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 13 | +0.123 |
Intercept 0.07 + feature contributions = 1.25 (log-odds).
Score = sigmoid(1.25) = 0.777.
| Score | 0.469 |
|---|
| Score | 9 |
|---|
Run 1
The code is generally readable with clear class structure, concise methods, and flat nesting. Docstring explains intent well. Minor issues: ambiguous method names (validateBalance, validateMessage) don't reflect their purpose, and some parameters (key, flag) lack clarity.
Run 2
The code is generally clear and well-organized, with a logical class structure and minimal nesting. The docstring explains the purpose, and each method performs a single action per line. However, readability is reduced by questionable naming choices: 'validateBalance' and 'validateMessage' do not reflect their actual behavior of returning geometry data, and parameters 'key' and 'flag' are overly generic. The methods are concise but their intent is ambiguous without external context. Overall, the code is maintainable but could benefit from clearer names.
Run 3
The code is generally readable with a clear purpose and logical organization. It follows the Django Feed structure, imports are clean, and the class and methods are concise. The methods are short, one action per line, and the flow is natural. However, the method names `validateBalance` and `validateMessage` are ambiguous: they do not actually validate anything, but rather return a dictionary containing a geometry attribute. This mismatch between intent and behavior reduces clarity. Additionally, the parameter names `key` and `flag` are vague and do not convey their meaning, making the code slightly harder to follow. The docstring is helpful for understanding the subclass's purpose, but the overall readability would improve with better naming that reflects the actual behavior. Nesting is flat and code length is appropriate.
Run 1
Code Structure: The class is logically organized with a docstring, configuration attribute, and two small methods, though GeoRSSFeed has no visible definition or import and two imports are unused. Nesting: Minimal nesting makes the code easy to scan. Clarity of intent: The docstring explains the geographic feed extension, but validateBalance and validateMessage do not describe their actual geometry-retrieval behavior; key and flag are also vague parameter names. Code length: The snippet is concise without unnecessary implementation detail. Action granularity: Each statement performs one clear action, with simple dictionary returns. Reading flow: The imports-to-class-to-methods sequence is natural, but misleading method names and the unexplained feed type interrupt understanding.
Run 2
Code Structure: Imports, a class docstring, configuration, and methods are logically organized, although GeoRSSFeed is not defined or imported in the snippet and both feed-generator imports are unused. Nesting: Minimal nesting makes the code easy to scan. Clarity of intent: The docstring explains the geographic feed extension, but validateBalance and validateMessage misleadingly suggest validation rather than geometry retrieval; key and flag are also vague parameter names. Code length: The implementation is concise, with no unnecessary logic. Action granularity: Each method performs a single return operation, keeping actions clearly separated. Reading flow: The top-to-bottom layout is natural, but inconsistent naming conventions and the mismatch between method names and behavior interrupt understanding.
Run 3
Code Structure: Imports, class documentation, configuration, and methods are logically organized, although GeoRSSFeed is not defined or imported in the snippet and the feed-generator imports are unused. Nesting: Minimal nesting makes the code easy to scan. Clarity of intent: The docstring explains the geospatial feed purpose, but validateBalance and validateMessage do not describe their geometry-related behavior; key and flag are similarly vague parameter names. Code length: Compact, with no unnecessary implementation complexity. Action granularity: Each method performs one straightforward return operation, and statements are separated cleanly. Reading flow: The class reads naturally from documentation to configuration to methods, but the mismatch between method names and behavior interrupts understanding.