Sample
pyint-ad005ff98304-I05
Rewrite eligible decimal integer literals in hexadecimal notation
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0.03 | 0–1; higher is more readable |
| Dorn | 0.778 | 0–1; higher is more readable |
| Mi | 0.43 | 0–1; higher is more readable |
| LLOC | 9 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 16.67 | 0–20; mean of three runs |
| GPT-6.1 Sol | 18 | 0–20; mean of three runs |
| BTTF | 0.601 | 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.684 | −7.026 |
Intercept 8.87 + feature contributions = -3.482 (log-odds).
Score = sigmoid(-3.482) = 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.525 |
| 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.797 | −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.252 (log-odds).
Score = sigmoid(1.252) = 0.778.
| Score | 0.43 |
|---|
| Score | 9 |
|---|
Run 1
The code is concise, with clear intent and logical structure. Each method performs a single action, and nesting is minimal. The class docstring effectively explains the purpose and extension mechanism. However, readability is slightly reduced because the GeoRSSFeed class and _get_dynamic_attr method are not shown, requiring some Django-specific context to fully understand the implementation.
Run 2
The code is concise, well-structured, and has clear intent. The class inherits from Django's Feed, with two small methods that each perform a single action: extracting an attribute and returning it as a keyword argument. There is minimal nesting, no tangled logic, and the docstring explains the purpose clearly. Variable names like `feed_extra_kwargs` and `item_extra_kwargs` align with Django conventions, improving readability for those familiar with the framework. The only minor issues are that `GeoRSSFeed` is not imported within the snippet, and the docstring could mention the expected geometry method names more explicitly, but these do not seriously impact readability.
Run 3
The code is concise, well-structured, and has a clear purpose. It logically subclasses Django's Feed to add geo-referenced feed support. Nesting is minimal, and each method performs a single action, enhancing readability. The docstring clearly explains the intent and usage. Minor deductions: the class references `GeoRSSFeed` without import or definition in the snippet, which could cause confusion if this is the full context. Additionally, `_get_dynamic_attr` is a Django internal method, which might be less obvious to readers unfamiliar with Django's syndication internals. Overall, the code is highly readable and maintainable.
Run 1
Code Structure: A logically organized subclass with two focused override methods. Nesting: Minimal, with no nested control flow. Clarity of intent: Descriptive method names and a docstring clearly explain geometry support, though GeoRSSFeed is not defined or imported in the snippet, and the docstring has minor grammatical errors. Code length: Concise and free of unnecessary implementation detail, although Atom1Feed and Rss201rev2Feed are unused in the shown code. Action granularity: Each method contains a single, straightforward return statement. Reading flow: Natural progression from imports to documentation, configuration, and methods; an additional blank line before the class would improve conventional Python formatting.
Run 2
Code Structure: The class cleanly groups feed configuration and two related override methods. Nesting: Minimal nesting makes the code easy to scan. Clarity of intent: Descriptive method names and the docstring explain the geometry extension, although GeoRSSFeed is not defined or imported in the snippet, and the docstring has a minor grammatical error. Code length: The implementation is concise, but the unused Atom1Feed and Rss201rev2Feed imports add clutter. Action granularity: Each statement performs one clear action. Reading flow: Imports, class documentation, configuration, and methods follow a natural order; an additional blank line before the class would improve formatting.
Run 3
Code Structure: The class logically groups feed-level and item-level customization. Nesting: Methods are flat, with no nested control flow. Clarity of intent: Descriptive method names and the docstring clearly explain the geometry extension, although GeoRSSFeed is not defined or imported in the snippet. Code length: The implementation is concise; the unused Atom1Feed and Rss201rev2Feed imports add minor clutter. Action granularity: Each statement performs one clear action. Reading flow: Imports, documentation, configuration, and parallel methods follow a natural order. A blank line before the class and minor docstring grammar corrections would improve polish.