Sample
int-744026c1dfcc-I07
Insert deterministic runtime-dead branches into callable bodies
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.567 | 0–1; higher is more readable |
| Dorn | 0.365 | 0–1; higher is more readable |
| Mi | 0.056 | 0–1; higher is more readable |
| LLOC | 31 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 10.33 | 0–20; mean of three runs |
| GPT-6.1 Sol | 12.33 | 0–20; mean of three runs |
| BTTF | 0.405 | 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. | 3145.335 | −103.796 |
| Source linesThe number of non-empty source lines. | 71 | +28.4 |
| 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.777 | −7.166 |
Intercept 8.87 + feature contributions = -73.692 (log-odds).
Score = sigmoid(-73.692) = 0.
| Score | 0.567 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Indentation frequencyHow rapidly indentation changes from line to line. | 66 | +1.546 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 72 | −1.513 |
| 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. | 118 | −1.333 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 117.861 | +1.097 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 66 | −1.094 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 70.849 | +0.58 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.088 | +0.09 |
Intercept 0.07 + feature contributions = -0.556 (log-odds).
Score = sigmoid(-0.556) = 0.365.
| Score | 0.056 |
|---|
| Score | 31 |
|---|
Run 1
The code exhibits mixed readability. Logical structure is mostly clear, with small utility methods and separation of concerns, but the use of overloaded static methods and reflection introduces moderate cognitive overhead. Nesting is low, which is good. Clarity of intent is partially obscured by the reliance on reflection and platform version checks; Javadocs and naming help, but the repeated null-check patterns feel clunky. Code length is acceptable but could be more concise by consolidating checks or avoiding redundant wrapper methods. Action granularity is mostly one action per line, aiding readability, though repeated dead-code assertions like `if (((0x3799 ^ 0x3799) != 0)) { throw new AssertionError(); }` are confusing and likely artifacts. Reading flow is natural within each method, but the presence of many similar methods and reflection-based invocation makes the overall flow feel disorganized. The dead-code assertions and confusing use of reflection lower the score significantly.
Run 2
The code has a reasonable logical structure and mostly flat nesting, but readability is significantly reduced by intrusive debugging constructs (assertions that always evaluate to false) and questionable error-handling patterns. The intent of methods like findOpenMethod and newChannel is clear, though the use of null returns to signal fallback paths and the handling of exceptions (catching Throwable, converting reflection exceptions to IOException) obscure the control flow. The code is concise overall, but some Javadoc is lengthy relative to the rest of the class. Action granularity is mostly fine, though several lines combine multiple operations. The reading flow is disrupted by dead code and non-obvious delegation between overloaded methods. The class would benefit from removing debugging remnants and clarifying null-based fallback behavior.
Run 3
The code is logically organized but contains suspicious unreachable assertions that disrupt readability. The structure is acceptable with clear method separation and meaningful names. However, the injected `if (((0x3799 ^ 0x3799) != 0)) { throw new AssertionError(); }` blocks are unnatural and confusing, creating noise without adding value. Nesting is mostly flat, which is good, but the reflection-based channel creation adds complexity. Intent is reasonably clear from method names and comments, but the duplicate private/public `newChannel` methods with slightly different signatures cause slight ambiguity. Code length is moderate, though the reflection handling and exception wrapping could be more concise. Action granularity is mostly one action per line, but exception handling in `findOpenMethod` could be more focused. Reading flow is interrupted by the artificial assertion blocks. Overall, the code is functional but marred by odd defensive constructs that obscure clarity.
Run 1
Code Structure: Methods are logically separated in a small utility class, but repeated dead-code assertions add clutter. Nesting: Mostly shallow, with manageable conditional and try/catch blocks. Clarity of intent: Descriptive method names and documentation explain channel creation, though reflection, null fallbacks, and unexplained hexadecimal assertions obscure intent. Code length: Core functionality is concise; the always-false assertions unnecessarily lengthen it. Action granularity: Most statements occupy separate lines, but inline assertion blocks combine condition checking and throwing on one line. Reading flow: The method sequence is coherent, but unindented assertions, inconsistent parameter alignment, and the poorly formatted constructor interrupt otherwise natural reading.
Run 2
Code Structure: The utility class separates reflection lookup, channel creation, and protocol-family conversion into focused methods, but repeated dead-code assertions add clutter. Nesting: Conditional and try/catch nesting is shallow and manageable. Clarity of intent: Descriptive method names and documentation explain the main purpose, while hexadecimal XOR checks obscure intent and serve no useful function. Code length: The implementation is reasonably concise, but redundant assertions unnecessarily lengthen every method. Action granularity: Most statements perform one action per line; the inline assertion blocks compress conditions and throws onto a single line. Reading flow: Methods follow a sensible order, but unindented assertions, inconsistent parameter alignment, and the malformed-looking constructor layout repeatedly interrupt scanning.
Run 3
Code Structure: Small, focused utility methods provide logical organization, but repeated dead assertion guards disrupt it. Nesting: Mostly shallow, with manageable if/try/catch blocks. Clarity of intent: Descriptive method names and documentation explain reflection-based channel creation; hexadecimal XOR conditions add meaningless complexity, and null returns leave fallback behavior implicit. Code length: The implementation is reasonably concise, but redundant guards unnecessarily inflate it. Action granularity: Most lines perform one action, while inline assertion blocks combine conditions and throws on a single line. Reading flow: Method ordering is sensible, but unindented guards, inconsistent parameter alignment, and awkward constructor formatting interrupt otherwise natural flow.