Sample
int-4361084e6a5f-I05
Rewrite eligible decimal integer literals in hexadecimal notation
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0.998 | 0–1; higher is more readable |
| Scalabrino | 0.791 | 0–1; higher is more readable |
| Dorn | 0.795 | 0–1; higher is more readable |
| Mi | 0.296 | 0–1; higher is more readable |
| LLOC | 2 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 15.33 | 0–20; mean of three runs |
| GPT-6.1 Sol | 19 | 0–20; mean of three runs |
| BTTF | 0.272 | 0–1; higher is more readable |
Views
Loading feature diagnosis…
Source regions
Feature contributions
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Source linesThe number of non-empty source lines. | 29 | +11.6 |
| Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones. | 213.751 | −7.054 |
| 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.663 | −6.995 |
Intercept 8.87 + feature contributions = 6.421 (log-odds).
Score = sigmoid(6.421) = 0.998.
| Score | 0.791 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| 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. | 117.967 | −1.331 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 114.167 | +1.038 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 1 | +1.001 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.02 | +0.75 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 13 | −0.287 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 13 | +0.123 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 28.815 | −0.007 |
Intercept 0.07 + feature contributions = 1.355 (log-odds).
Score = sigmoid(1.355) = 0.795.
| Score | 0.296 |
|---|
| Score | 2 |
|---|
Run 1
The code is well-structured and highly readable. It defines a small, focused interface with a clear purpose: managing priority queue node indices. The structure is logical, with a constant, a getter, and a setter. Nesting is essentially flat. Clarity of intent is excellent—Javadoc explains each member, including edge cases like 'undefined behavior.' Code length is concise and appropriate for the task. Each declaration is on its own line, maintaining clean action granularity. Reading flow is natural, moving from constant to getter to setter. Minor deductions: some Javadoc phrasing is slightly verbose, and the constant's hex notation (-0x1) could be written as -1 for simplicity. Overall, this is exemplary interface documentation and organization.
Run 2
The code is a simple interface with clear Javadoc, but its readability is limited for a general Java context. It has a logical structure and flat nesting, making the intent relatively clear for its purpose. However, the code is very minimal, and the method names and parameters are somewhat opaque without understanding DefaultPriorityQueue internals. The constant name is slightly confusing (-0x1 is just -1), adding unnecessary obscurity. Action granularity is fine, but the reading flow relies heavily on external context. Concise but not self-explanatory.
Run 3
The code is highly readable due to its clear structure as a simple interface with well-organized Javadoc comments. It maintains a flat hierarchy with no nesting, making it easy to follow. Each method and constant has a clear, single purpose: one retrieves an index, one sets it, and the constant is for initialization. The code is concise, avoiding unnecessary complexity. Each action is on its own line, enhancing clarity. The reading flow is natural, starting with the constant, then the getter, then the setter. Minor points: could be slightly improved with an @link to the setter in the getter's doc, but overall it is well-documented and maintains good separation of concerns.
Run 1
Code Structure: A logically organized interface containing one constant and two closely related methods. Nesting: Flat declarations with no nested control flow. Clarity of intent: Descriptive interface and method names, supported by Javadoc explaining queue-specific state and exception constraints. Code length: Concise, with documentation proportionate to the small API. Action granularity: Each declaration occupies its own line; no combined actions. Reading flow: Natural progression from interface purpose to initialization constant, getter, and setter. Minor readability drawbacks are the unconventional hexadecimal -0x1 instead of -1 and the terse setter parameter name i.
Run 2
Code Structure: The interface logically groups a sentinel constant with related index getter and setter methods. Nesting: There is no nested logic, making the declaration easy to scan. Clarity of intent: Descriptive names and Javadoc clearly explain queue-specific state and usage restrictions; the parameter name 'i' and hexadecimal '-0x1' are slightly less clear than 'index' and '-1'. Code length: The interface is concise, with documentation proportionate to its contract. Action granularity: Each declaration occupies its own line, with no combined operations. Reading flow: The progression from interface purpose to initialization constant, getter, and setter is natural and consistent.
Run 3
Code Structure: The interface logically groups a sentinel constant with index getter and setter methods. Nesting: No nested control flow; declarations are flat and easy to scan. Clarity of intent: Descriptive interface and method names, Javadoc links, and exception warnings clearly explain the internal queue-state contract. Minor drawbacks are the terse parameter name 'i' and the less conventional '-0x1' notation instead of '-1'. Code length: Concise, with documentation proportionate to the API. Action granularity: Each declaration occupies its own line and represents a single responsibility. Reading flow: The progression from interface purpose to initialization constant, getter, and setter is natural and consistent.