Sample
pyint-b91d7b161c37-I11
Split eligible integer literals into pairs of short-named intermediate variables
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Dorn | 0.623 | 0–1; higher is more readable |
| Mi | 0.467 | 0–1; higher is more readable |
| LLOC | 23 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 16.67 | 0–20; mean of three runs |
| GPT-6.1 Sol | 19 | 0–20; mean of three runs |
| BTTF | 0.641 | 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. | 1173.778 | −38.735 |
| Source linesThe number of non-empty source lines. | 31 | +12.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.692 | −7.038 |
Intercept 8.87 + feature contributions = -24.503 (log-odds).
Score = sigmoid(-24.503) = 0.
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 0 | −0.804 |
| 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. | 69.906 | +0.704 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 26 | +0.116 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 24 | +0.093 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.106 | −0.091 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 30.563 | +0.017 |
Intercept 0.07 + feature contributions = 0.503 (log-odds).
Score = sigmoid(0.503) = 0.623.
| Score | 0.467 |
|---|
| Score | 23 |
|---|
Run 1
The code is simple and easy to understand. The class follows a clear structure: constructor and cache methods aligned with the base interface. Nesting is flat, with no conditionals or loops. Each method has a clear purpose, and action granularity is good—one action per line. The repeated validation call is concise but could be considered redundant; a helper or comment might clarify intent. Method names match the standard cache API, which improves reading flow for familiar Django developers. The constructor is minimal but currently ignores the 'host' parameter, which is slightly ambiguous. Overall, the code is clean and readable, though not self-documenting regarding the dummy behavior.
Run 2
The code is highly readable due to its clear, logical structure and minimal nesting. Each method has a single responsibility and follows a consistent pattern, making intent obvious: it's a dummy cache implementation that validates keys but performs no actual caching. The methods are concise, with one action per line, and the reading flow is natural. Minor deductions: the unused 'host' parameter and redundant 'return False' in delete/touch (where None would be equally clear) slightly reduce clarity. Overall, the code is well-structured and easy to understand.
Run 3
The code is clean and highly readable. It follows a consistent structure with each method performing one logical action, and the class purpose is immediately clear. Nesting is minimal, and the flat structure aids comprehension. Naming is standard for Django cache backends, making intent obvious to developers familiar with the framework. While some methods are very short, their inclusion is necessary to meet the interface contract, so the length is appropriate. The only minor issues are the redundant `host` parameter in __init__ (not used) and the lack of docstrings or comments explaining that this is a no-op cache for testing or development, which slightly reduces clarity. Overall, the reading flow is natural and the code is easy to scan.
Run 1
Code Structure: A single, logically organized class groups standard cache operations into clearly separated methods. Nesting: Flat method bodies contain no nested control flow. Clarity of intent: DummyCache and familiar method names communicate a no-op cache implementation, though a brief docstring could explain the return conventions and unused parameters. Code length: Concise, with minimal implementation; repeated key validation makes each method independently understandable. Action granularity: Each line performs one action. Reading flow: Consistent signatures and validation-first bodies make the code predictable and easy to scan.
Run 2
Code Structure: A single, logically organized class groups standard cache operations into distinct methods. Nesting: Methods are flat, with no nested control flow. Clarity of intent: The DummyCache name and predictable return values communicate a no-op cache, though a short docstring would clarify why keys are validated but values are never stored and why host is unused. Code length: The implementation is concise; repeated validation calls are reasonable for independent interface methods. Action granularity: Each line performs one clear action. Reading flow: Consistent signatures, spacing, and method patterns make the code easy to scan and understand.
Run 3
Code Structure: A single, logically organized class separates cache operations into small methods. Nesting: Flat method bodies have no nested control flow. Clarity of intent: DummyCache and familiar cache method names clearly suggest a no-op backend, though a brief docstring could explain key validation and unused parameters. Code length: Concise, with minimal implementation and reasonable repetition required by the interface. Action granularity: Each line performs one action, keeping validation and return values distinct. Reading flow: Consistent signatures, spacing, and method patterns make the code easy to scan and follow.