Sample
int-343c75913829-SRC
Unmodified source class
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 | 17.33 | 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 a well-structured interface with clear purpose and documentation. It is flat with no nesting, uses concise methods, and maintains a natural reading flow. Javadocs explain each method's intent, though minor verbosity in comments slightly reduces efficiency.
Run 2
The code is well-structured with clear separation between interface definition and a default implementation. It has minimal nesting and uses concise, descriptive method names that clearly convey intent. The Javadoc comments are thorough and helpful, adding to clarity. However, the interface name is slightly verbose and the code is somewhat lengthy for the simple functionality it provides. Reading flow is natural, starting with the interface and moving into the default state implementation.
Run 3
The code is highly readable with a clear, logical structure. The interface defines a state contract with well-named methods (started, receivedFinalHeaders, terminated) that concisely express their intent. The anonymous inner class implementing NO_STATE is straightforward and flat, with no nesting issues. Each method contains a single action, maintaining clean action granularity. Javadoc comments are informative without being verbose, explaining the purpose of the interface and each method. The reading flow is natural, starting with the interface declaration, then the NO_STATE implementation, and finally the method declarations. Minor deduction: the Javadoc could reference RFC more consistently, and the NO_STATE implementation could arguably be a separate class for clarity, but these are very minor given the overall quality.
Run 1
Code Structure: The interface logically groups three state queries and a clearly identified stateless implementation. Nesting: Minimal; the anonymous implementation adds only one level, with trivial method bodies. Clarity of intent: Descriptive method names and Javadoc explain the stream lifecycle, although receivedFinalHeaders() sounds receive-specific despite documenting both sending and receiving. Code length: Compact overall, but repeated Javadoc descriptions and false-returning methods add minor verbosity. Action granularity: Each method performs a single action, with no combined statements. Reading flow: Consistent formatting and method ordering make the code easy to scan; placing NO_STATE before the query declarations is reasonable. Minor grammatical issues in the documentation slightly reduce polish.
Run 2
Code Structure: The interface logically groups three state queries and a clearly identified no-state implementation. Nesting: Minimal nesting, limited to the anonymous implementation and its short methods. Clarity of intent: Descriptive method names and Javadoc explain the stream lifecycle, although receivedFinalHeaders() uses received terminology while its documentation covers both sending and receiving. Code length: Compact implementation; Javadoc repeats some descriptions in return tags. Action granularity: Each method performs a single action, with no combined statements. Reading flow: Consistent formatting and method ordering make the code easy to follow. Minor documentation wording issues slightly reduce polish.
Run 3
Code Structure: The interface logically groups three state queries and a clearly identified stateless implementation. Nesting: Only the anonymous implementation introduces nesting; its methods remain simple and flat. Clarity of intent: Descriptive method names and Javadoc clearly explain stream states, although receivedFinalHeaders() sounds receive-only despite documenting both sending and receiving. Code length: The implementation is concise, but repeated descriptions in the Javadoc add minor verbosity. Action granularity: Each method performs a single action, with one return statement per line. Reading flow: Consistent formatting and method ordering make the code easy to scan; the anonymous implementation preceding the documented declarations introduces only a minor interruption.