Sample
int-bf03fed57907-I05
Rewrite eligible decimal integer literals in hexadecimal notation
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 1 | 0–1; higher is more readable |
| Scalabrino | 0.972 | 0–1; higher is more readable |
| Dorn | 0.684 | 0–1; higher is more readable |
| Mi | 0.37 | 0–1; higher is more readable |
| LLOC | 9 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 18 | 0–20; mean of three runs |
| GPT-6.1 Sol | 18.67 | 0–20; mean of three runs |
| BTTF | 0.761 | 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. | 51 | +20.4 |
| Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones. | 339.002 | −11.187 |
| 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.52 | −6.78 |
Intercept 8.87 + feature contributions = 11.303 (log-odds).
Score = sigmoid(11.303) = 1.
| Score | 0.972 |
|---|
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. | 116.981 | −1.29 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 116.962 | +1.083 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 52 | −0.805 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.027 | +0.682 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 31 | +0.335 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 50.864 | +0.301 |
Intercept 0.07 + feature contributions = 0.774 (log-odds).
Score = sigmoid(0.774) = 0.684.
| Score | 0.37 |
|---|
| Score | 9 |
|---|
Run 1
The code is highly readable. It uses a clean interface with clear, well-documented methods that describe HTTP/3 stream state. The structure is logical: a constant NO_STATE provides an immutable no-op implementation, and the three state-checking methods are purpose-driven and concise. Nesting is minimal—only one anonymous inner class with flat method overrides. Each method has a single clear action and Javadoc explains intent and edge cases. Reading flow is natural, moving from interface purpose to a default implementation to query methods. Minor deductions: the anonymous class adds slight verbosity, and the Javadoc references could be simplified, but overall the code is nearly ideal in clarity and structure.
Run 2
The code is highly readable. It has a clear, logical structure with a well-documented interface and a simple NO_STATE implementation. Nesting is minimal and flat. The intent is explicit through descriptive method names and thorough Javadoc comments. Code length is concise and appropriate for the task. Each method is a single action, contributing to clear action granularity. The reading flow is natural, starting with the interface declaration, followed by the NO_STATE constant, and then the method definitions with documentation.
Run 3
The code demonstrates excellent readability through clear documentation and simple interface design. The Javadoc comments effectively explain the purpose of each method and the interface itself, with references to relevant specifications. The structure is logical, organizing the interface methods around the three key states (started, receivedFinalHeaders, terminated). The NO_STATE implementation is concise and properly placed as a nested anonymous class. Nesting is minimal, with flat method declarations. Each method has a single clear responsibility and returns a simple boolean. The lines are well-formatted and within reasonable length. Minor deductions: the interface could potentially be an enum for better type safety, and the method names could be slightly more descriptive (e.g., hasStarted() vs started()). Overall, this is a well-documented, cleanly organized interface that clearly communicates its intent and purpose.
Run 1
Code Structure: The interface is logically organized, with a stateless implementation followed by three related state queries. Nesting: Minimal nesting; the anonymous implementation is straightforward and contains no branching. Clarity of intent: Descriptive method names and Javadoc clearly explain stream lifecycle states, though receivedFinalHeaders() is slightly inconsistent with documentation covering both receiving and sending. Code length: The code is compact, but Javadoc repeats descriptions in return tags and the constant repeats three trivial implementations. Action granularity: Each declaration and return occupies its own line, making individual operations easy to identify. Reading flow: Consistent formatting and method ordering provide a natural progression from started to final headers to terminated. Minor grammatical awkwardness in 'that managed no state' slightly reduces polish.
Run 2
Code Structure: The interface cleanly groups a stateless implementation and three related state queries. Nesting: Only the anonymous implementation adds nesting; its methods are simple and flat. Clarity of intent: Descriptive names and Javadoc make the HTTP/3 stream-state purpose clear, although receivedFinalHeaders() sounds receive-only despite covering sent frames too. Code length: The implementation is concise, but Javadoc descriptions and return explanations repeat information. Action granularity: Each method performs a single action, with no compressed statements. Reading flow: Consistent formatting, spacing, and documentation create a natural progression from the default implementation to the interface contract. Minor documentation wording issues slightly reduce polish.
Run 3
Code Structure: The interface logically groups a stateless implementation and three related state queries. Nesting: Only the anonymous implementation introduces nesting; its methods are shallow and straightforward. Clarity of intent: Descriptive names and Javadoc clearly communicate stream-state semantics, although receivedFinalHeaders() sounds receive-specific while its documentation also covers sending. Code length: The implementation is concise, but repeated descriptions in Javadoc return tags add minor verbosity. Action granularity: Each method performs a single action, with one return statement per line. Reading flow: Consistent formatting and method order make the code easy to follow. Minor documentation issues, including 'managed no state,' slightly reduce polish.