Sample
int-dc6a00461111-SRC
Unmodified source class
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.511 | 0–1; higher is more readable |
| Dorn | 0.356 | 0–1; higher is more readable |
| Mi | 0.281 | 0–1; higher is more readable |
| LLOC | 14 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 17.33 | 0–20; mean of three runs |
| GPT-6.1 Sol | 18 | 0–20; mean of three runs |
| BTTF | 0.618 | 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.158 | −7.737 |
Intercept 8.87 + feature contributions = -50.807 (log-odds).
Score = sigmoid(-50.807) = 0.
| Score | 0.511 |
|---|
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 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 170 | +1.938 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 80 | −1.796 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 61 | +1.373 |
| 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.07 | +0.265 |
Intercept 0.07 + feature contributions = -0.593 (log-odds).
Score = sigmoid(-0.593) = 0.356.
| Score | 0.281 |
|---|
| Score | 14 |
|---|
Run 1
The code is well-structured with clear separation between constructors, overridden methods, and field declarations. Nesting is minimal, with only a try-finally block in the decode method. Each method has a single, obvious purpose, and names accurately reflect their behavior. The class-level Javadoc thoroughly explains the Gson decoder's use case and limitations. Imports are organized and specific. Action granularity is appropriate—each logical operation occupies a single line, such as the buffer release in the finally block and the fromJson call. Reading flow is natural: fields, constructors, then overrides. Minor deductions: the decode method combining Gson parsing and buffer release in one method slightly reduces separation of concerns, and exception stack traces could benefit from a message. Overall, highly readable production-quality Spring Framework code.
Run 2
The code is highly readable with clear structure and logical organization. Class responsibilities are well-defined, documentation is thorough, and methods are concise with single responsibilities. Nesting is minimal—only one try-finally block exists. Intent is immediately apparent through descriptive method names and Javadoc. Constructors are properly chained, and the private MIME type array is clearly separated. The decode method efficiently handles resource cleanup in a finally block, demonstrating good action granularity. Reading flow is natural: fields, constructors, then overridden methods in logical order. Minor deductions for the long canDecode condition and the somewhat abrupt UnsupportedOperationException without explanatory message.
Run 3
The code is well-structured and readable. It follows a logical class organization with clear constructors, overridden methods, and concise documentation. The nesting is minimal, and each method performs a single clear action. The intent is easy to understand—decoding JSON using Gson while enforcing Mono-only support. The class length is appropriate, and the flow is natural. Minor deductions: the `decode` method combines Gson invocation with stream handling in one line, slightly reducing action granularity, and the unsupported `Flux` decoding method adds a bit of redundancy. Overall, highly readable with minor room for improvement.
Run 1
Code Structure: Logical organization separates constants, state, constructors, capability checks, and decoding methods. Nesting: Minimal nesting, with only a straightforward try/finally block. Clarity of intent: Descriptive names and useful Javadoc clearly explain Gson decoding and the unsupported streaming operation. Code length: Concise implementation; documentation adds useful context rather than unnecessary bulk. Action granularity: Statements generally perform one action each, although the nested reader construction in fromJson slightly compresses several operations. Reading flow: Methods follow a natural progression, and buffer cleanup is easy to identify. Minor readability drawbacks include long method signatures, ungrouped imports, and slightly inconsistent blank-line spacing.
Run 2
Code Structure: Fields, constructors, and overridden methods are logically organized, with decoding and resource cleanup clearly separated. Nesting: Minimal nesting; the only block structure of note is a straightforward try/finally. Clarity of intent: Descriptive names and useful Javadoc explain Gson integration, supported MIME types, and the streaming limitation. Code length: The implementation is concise, although long method signatures reduce scanability. Action granularity: Statements generally perform one action each; the nested reader construction in the parsing call remains understandable. Reading flow: The class progresses naturally from configuration to capability checks and decoding. Import grouping and wrapping lengthy signatures would improve visual readability.
Run 3
Code Structure: Logically organized into constants, state, constructors, capability checks, and decoding methods. Nesting: Minimal; the only control structure is a straightforward try/finally. Clarity of intent: Descriptive names and useful Javadoc clearly explain Gson decoding and unsupported streaming. Code length: Concise implementation with proportionate documentation, though method signatures are long. Action granularity: Most lines perform one action; the nested reader creation and deserialization expression slightly compress distinct operations. Reading flow: Natural progression and consistent formatting make the class easy to follow, although tightly packed imports and unwrapped signatures reduce visual readability.