Sample
int-9d208137ef93-I11
Split eligible integer literals into pairs of short-named intermediate variables
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 structure: a package declaration, imports (implied), a well-documented interface, and a constant implementing it. The nesting is minimal, with only one anonymous class. Intent is clearly communicated through descriptive method names (started, receivedFinalHeaders, terminated) and thorough Javadoc comments. Code length is appropriate for the functionality, avoiding unnecessary verbosity. Each method in the anonymous class performs a single action. The reading flow is natural, from interface definition to its constant implementation.
Run 3
The code is highly readable. The interface is logically structured with clear, well-documented methods. Nesting is minimal, limited to a single anonymous class implementation. Intent is clearly stated through the interface name, method names, and comprehensive Javadoc comments. Code length is appropriate for the abstraction being defined, with no unnecessary verbosity. Each method performs a single action and returns a boolean. The reading flow is natural, following a logical progression from state definition to state query methods. The inclusion of a NO_STATE default implementation is a good pattern that improves clarity.
Run 1
Code Structure: The interface logically groups a stateless default implementation and three state-query methods. Nesting: Minimal; the anonymous implementation adds only one straightforward level. Clarity of intent: Descriptive method names and Javadoc explain the stream lifecycle, although receivedFinalHeaders() sounds receive-only despite documenting both sending and receiving. Code length: Appropriately short, with some redundant wording between descriptions and return documentation. Action granularity: Each statement performs a single action, and each implementation method simply returns false. Reading flow: Consistent formatting and method ordering make the code easy to scan; placing NO_STATE before the method declarations slightly delays discovery of the interface contract. Minor grammatical issues in the documentation do not substantially hinder readability.
Run 2
Code Structure: The interface logically groups three state queries and a clearly identified stateless implementation. Nesting: Minimal nesting, limited to the anonymous implementation and its methods. Clarity of intent: Descriptive method names and Javadoc explain the stream lifecycle, though receivedFinalHeaders() is slightly inconsistent with documentation covering both sending and receiving. Code length: Compact implementation, with some redundant wording between Javadoc descriptions and return documentation. Action granularity: Each method performs a single, simple action, and declarations are cleanly separated. Reading flow: Consistent formatting and spacing make the code easy to scan; the default implementation appearing before the query declarations causes only a minor interruption.
Run 3
Code Structure: The interface is logically organized, with a no-state implementation followed by three clearly documented state queries. Nesting: Minimal nesting; the anonymous implementation adds only a shallow level. Clarity of intent: Descriptive method names and Javadoc make the purpose clear, although receivedFinalHeaders() is named for receiving while its documentation also covers sending. Code length: Concise implementation, with slightly repetitive Javadoc descriptions and return documentation. Action granularity: Each method performs one simple action, and statements occupy separate lines. Reading flow: Consistent formatting, spacing, and method ordering make the code easy to scan and understand.