Sample
int-5a155803b265-I01
Remove line comments, block comments, and Javadoc
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.464 | 0–1; higher is more readable |
| Dorn | 0.047 | 0–1; higher is more readable |
| Mi | 0.562 | 0–1; higher is more readable |
| LLOC | 14 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 16 | 0–20; mean of three runs |
| GPT-6.1 Sol | 17 | 0–20; mean of three runs |
| BTTF | 0.565 | 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. | 2531.532 | −83.541 |
| Source linesThe number of non-empty source lines. | 79 | +31.6 |
| Byte entropyHow varied the bytes in the source text are. Repeated bytes give a lower value; a more even mixture gives a higher value. | 5.162 | −7.742 |
Intercept 8.87 + feature contributions = -50.813 (log-odds).
Score = sigmoid(-50.813) = 0.
| Score | 0.464 |
|---|
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. | 169.988 | −3.535 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 79 | +1.995 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 80 | −1.796 |
| 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. | 78.924 | +0.693 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.1 | −0.029 |
Intercept 0.07 + feature contributions = -3.008 (log-odds).
Score = sigmoid(-3.008) = 0.047.
| Score | 0.562 |
|---|
| Score | 14 |
|---|
Run 1
The code is generally well-structured and readable. It follows a clean class layout with fields, constructors, and overridden methods, and each method is concise with a single clear responsibility. Nesting is minimal, and intent is mostly clear. However, readability is slightly reduced by a long decode method chain, long parameter lists on decode methods, and a mildly convoluted canDecode condition. Overall, it is a short, focused class with only minor style issues.
Run 2
The code is generally well-structured and readable. It follows Spring framework conventions, with clear class and method organization. Imports are ordered and the class has a single responsibility. The constructor delegation is clean and the `canDecode` method is concise with clear intent. However, there are minor readability issues: several blank lines of irregular length between members (e.g., 5–10 empty lines) disrupt reading flow, and the `decode` method combining `fromJson` with `InputStreamReader` on one line slightly reduces action granularity. Nesting is minimal (only one try-finally), and naming is clear. The unsupported stream decode method explicitly throws an exception, which is good for clarity. Overall, the code is readable but could be improved by consistent spacing and splitting the Gson parsing expression into a separate line for clarity.
Run 3
The code is generally well-structured and readable. It has clear class organization, minimal nesting, and explicit method intents. Imports are grouped, fields are logically placed, and constructors are straightforward. However, readability is slightly reduced by the overly long method signatures in decode() and canDecode(), which exceed comfortable line lengths and contain multiple parameters. The unsupported stream decoding method throws an exception but its purpose is clear. Action granularity is mostly one-per-line, though the gson.fromJson call combines multiple nested operations. Overall, the code is concise and maintainable but could benefit from line wrapping on long signatures.
Run 1
Code Structure: Constants, state, constructors, and overridden methods are logically organized. Nesting: Minimal nesting, with only a straightforward try/finally block. Clarity of intent: Descriptive names and familiar decoder methods make the purpose clear; the unsupported streaming operation is explicitly identified. Code length: Implementation is concise, but excessive blank lines add unnecessary visual length, and long method signatures reduce scanability. Action granularity: Each statement performs a single clear action; the inline reader construction remains easy to understand. Reading flow: Initialization, capability checking, and decoding follow a natural sequence, with buffer cleanup clearly separated. Inconsistent whitespace and unwrapped signatures slightly disrupt an otherwise readable implementation.
Run 2
Code Structure: Constants, state, constructors, and decoding methods are logically organized. Nesting: Minimal nesting, with a straightforward try/finally block. Clarity of intent: Descriptive names and standard overrides make the decoder's purpose clear; the exception explicitly identifies unsupported streaming. Code length: Implementation is concise, but excessive blank lines add unnecessary visual length. Action granularity: Most lines perform one action, though the JSON parsing expression combines stream access, reader construction, type resolution, and deserialization. Reading flow: Method order is natural and resource release is easy to follow, but long signatures, ungrouped imports, and irregular whitespace interrupt scanning.
Run 3
Code Structure: Logically organized into configuration, constructors, capability checking, and decoding methods. Nesting: Minimal; only a straightforward try/finally block. Clarity of intent: Descriptive names and explicit exceptions make behavior clear, though the distinction between unsupported stream decoding and supported buffer decoding could benefit from documentation. Code length: Implementation is concise, but excessive blank lines add unnecessary visual length. Action granularity: Generally one action per line; the nested reader construction and deserialization expression remain understandable. Reading flow: Method ordering is natural, but long signatures, sparse import grouping, and irregular whitespace interrupt scanning.