Sample
int-9446b5adce8e-I05
Rewrite eligible decimal integer literals in hexadecimal notation
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.57 | 0–1; higher is more readable |
| Dorn | 0.271 | 0–1; higher is more readable |
| Mi | 0.494 | 0–1; higher is more readable |
| LLOC | 24 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 16.33 | 0–20; mean of three runs |
| GPT-6.1 Sol | 17 | 0–20; mean of three runs |
| BTTF | 0.516 | 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. | 2355.469 | −77.73 |
| Source linesThe number of non-empty source lines. | 55 | +22 |
| 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.492 | −6.738 |
Intercept 8.87 + feature contributions = -53.598 (log-odds).
Score = sigmoid(-53.598) = 0.
| Score | 0.57 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Indentation frequencyHow rapidly indentation changes from line to line. | 55 | +1.165 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 55 | −0.911 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 55 | −0.841 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 0 | −0.804 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 54.907 | +0.358 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.107 | −0.095 |
| 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. | 84.911 | +0.069 |
Intercept 0.07 + feature contributions = -0.989 (log-odds).
Score = sigmoid(-0.989) = 0.271.
| Score | 0.494 |
|---|
| Score | 24 |
|---|
Run 1
The code is well-structured with clear separation of concerns and logical organization. It handles HTTP responses and content in flat, easily readable blocks with minimal nesting. Intent is clear from descriptive method and variable names. The code is concise and avoids unnecessary length. Each line generally performs one action, contributing to readability. The reading flow is natural, following the HTTP message processing sequence. Minor improvements could include extracting repeated System.err.println calls or using string formatting, but overall the code is highly readable for a Netty handler implementation.
Run 2
The code is generally readable with clear structure and intent. It separates response handling from content handling using two distinct if blocks, which keeps the logic straightforward. Nesting is moderate—loops for headers add one level but remain manageable. Action granularity is good, with most lines performing a single operation. The flow follows a logical order: status/version, headers, content type, content body, then end-of-content handling. However, readability could improve by extracting the header-printing logic into a helper method and using early returns to flatten the nested loops. The use of System.err is consistent but slightly verbose. Overall, the code is concise, purposeful, and easy to follow for its domain, though minor refactoring would enhance clarity further.
Run 3
The code is generally readable with a clear, logical structure. It separates HttpResponse and HttpContent handling into distinct blocks with simple if statements, maintaining flat nesting. Each action (printing status, version, headers, content) is on its own line, which aids comprehension. The intent—logging HTTP response details—is evident. However, minor improvements could be made: the method name 'channelRead0' is somewhat cryptic without context, and the repeated use of System.err.println with string concatenation is slightly verbose. The nested for-loops for headers add a bit of complexity, but remain understandable. Overall, the code reads naturally and would be easy for a developer to follow.
Run 1
Code Structure: Logically separates response metadata, content handling, and exception handling. Nesting: Mostly shallow, though header printing uses nested loops within two conditionals. Clarity of intent: Descriptive class, method, and variable names make the HTTP logging purpose clear. Code length: Compact and appropriate, with minor repetition in output statements. Action granularity: Each statement performs one clear action, making execution easy to follow. Reading flow: Naturally progresses from status and headers to content and connection closure; whitespace separates logical sections. Extracting header printing into a helper could reduce nesting and improve scanability.
Run 2
Code Structure: Logically separates response metadata, content handling, and exception handling. Nesting: Mostly shallow, though header iteration reaches four control-flow levels and slightly slows scanning. Clarity of intent: Descriptive class, method, and variable names plus explicit output labels make the diagnostic purpose clear. Code length: Compact and appropriate for a small handler, with minimal repetition. Action granularity: Each statement performs one clear action on its own line. Reading flow: Follows the natural progression from response status and headers to body content and connection closure, with useful whitespace. Minor drawbacks include tightly packed imports, the nested header block, and no explanation that the two independent type checks intentionally allow one message to be processed as both a response and content.
Run 3
Code Structure: Logically separates response metadata, content processing, and exception handling. Nesting: Mostly shallow, though header printing introduces three nested levels. Clarity of intent: Descriptive class, method, and variable names, along with explicit output labels, make the diagnostic purpose clear. Code length: Compact and appropriate for a small example; repeated print calls are justified by the output format. Action granularity: Each statement generally performs one action, making execution easy to follow. Reading flow: Naturally progresses from status and headers to content and completion. Minor weaknesses include tightly packed imports, limited visual separation between the two main processing blocks, and header-loop nesting.