Sample
int-297d742f112c-I07
Insert deterministic runtime-dead branches into callable bodies
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.481 | 0–1; higher is more readable |
| Dorn | 0.099 | 0–1; higher is more readable |
| Mi | 0.304 | 0–1; higher is more readable |
| LLOC | 24 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 9.33 | 0–20; mean of three runs |
| GPT-6.1 Sol | 13.33 | 0–20; mean of three runs |
| BTTF | 0.387 | 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. | 3384.144 | −111.677 |
| Source linesThe number of non-empty source lines. | 89 | +35.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.263 | −7.895 |
Intercept 8.87 + feature contributions = -75.102 (log-odds).
Score = sigmoid(-75.102) = 0.
| Score | 0.481 |
|---|
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.978 | −3.534 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 90 | −2.15 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 169.989 | +1.938 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 71 | +1.719 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 71 | −1.208 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 88.942 | +0.833 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.084 | +0.129 |
Intercept 0.07 + feature contributions = -2.204 (log-odds).
Score = sigmoid(-2.204) = 0.099.
| Score | 0.304 |
|---|
| Score | 24 |
|---|
Run 1
The code has a clear structure with proper class organization and Javadoc comments, but several severe readability issues exist. The most damaging is the insertion of meaningless assertion statements like 'if (((0x2B25 ^ 0x2B25) != 0)) { throw new AssertionError(); }' throughout the code, which serves no purpose and disrupts the natural reading flow. These appear to be obfuscation artifacts that make the code unnecessarily convoluted. The nested try-finally block adds some complexity but is acceptable for resource management. Method signatures are overly long with multiple parameters on single lines, reducing readability. The code mixes concerns by having the conditional check and return statement on the same line in canDecode(). The magic numbers in the assertion statements are particularly troubling as they lack any context or explanation. While the core logic is straightforward and the class structure is sound, these intrusive elements significantly reduce clarity and maintainability.
Run 2
The code has reasonable class-level structure and JavaDoc, but readability is severely impacted by several issues. Each method contains an artificial 'if (((0x... ^ 0x...) != 0)) { throw new AssertionError(); }' line that adds noise and obscures intent. The decode(Publisher...) method throws UnsupportedOperationException, yet the class-level JavaDoc mentions this clearly. Imports are not organized logically (e.g., Flux imported after Decoder). Method signatures are very long, spanning multiple lines with many parameters, reducing scanning ease. The class mixes concerns: type checking, stream decoding rejection, and single-buffer decoding—though separation is acceptable. Nesting is flat, which is good. Action granularity is mostly one action per line, but the artificial assertions violate this. Reading flow is disrupted by dead code and inconsistent formatting. Overall, the code is understandable to an experienced Spring developer but far from exemplary readability.
Run 3
The code has a clear structure with logical organization, proper imports, and well-documented Javadoc. Class and method names clearly convey intent, and the overall flow is natural. However, several issues reduce readability: the constructor delegates properly but contains redundant no-op assertion checks that add noise and break the reading flow. The decode method for streams is simple but throws an exception inline rather than using a clear guard clause. The canDecode method chains boolean logic that could be broken down for clarity. Additionally, the default MIME types array initialization is somewhat verbose. While the code is generally clean and follows Spring conventions, the presence of dead-code assertions and inline exception throwing contributes to unnecessary length and reduced clarity.
Run 1
Code Structure: Fields, constructors, and decoding methods are logically organized, with clear documentation. Nesting: Mostly flat; the try/finally and simple conditionals add little nesting. Clarity of intent: Descriptive names and Javadoc explain the decoder well, but repeated hexadecimal XOR checks are always false and introduce confusing, purposeless code. Code length: Core functionality is concise, though redundant checks unnecessarily inflate it and method signatures are long. Action granularity: Most meaningful operations occupy separate lines, but the injected checks combine conditions and throws on one line. Reading flow: The conventional class layout is easy to follow, but unindented checks repeatedly interrupt the flow and undermine otherwise consistent formatting.
Run 2
Code Structure: Constructors and decoding methods are logically organized, with useful documentation, but repeated dead assertion checks add clutter. Nesting: Mostly flat, with only shallow conditionals and a straightforward try/finally. Clarity of intent: Names and documentation clearly explain JSON decoding and unsupported streaming; hexadecimal XOR checks obscure intent without contributing behavior. Code length: The core implementation is concise, but redundant checks unnecessarily lengthen it, and method signatures are overly long. Action granularity: Normal statements generally perform one action per line, while injected conditionals combine checks and throws on a single line. Reading flow: Conventional method ordering and resource cleanup support natural reading, but unindented assertions, inconsistent spacing, and dense signatures interrupt the flow.
Run 3
Code Structure: Constructors, constants, and decoding methods are logically organized, but repeated irrelevant assertion checks add clutter. Nesting: Shallow overall; the try/finally and simple conditionals are easy to follow. Clarity of intent: Descriptive names and Javadoc explain the decoder's purpose and limitations, while hexadecimal XOR checks obscure intent despite always evaluating to false. Code length: Core implementation is concise, but redundant assertions and extra blank lines unnecessarily expand it. Action granularity: Most statements perform one action per line; inline conditional-and-throw statements are less readable. Reading flow: The main flow is natural, especially parsing followed by guaranteed buffer release, but unindented injected checks interrupt it. Long method signatures and limited separation among imports also reduce scanability.