Sample
int-318d39398d68-I07
Insert deterministic runtime-dead branches into callable bodies
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.591 | 0–1; higher is more readable |
| Dorn | 0.201 | 0–1; higher is more readable |
| Mi | 0.255 | 0–1; higher is more readable |
| LLOC | 30 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 13 | 0–20; mean of three runs |
| GPT-6.1 Sol | 14 | 0–20; mean of three runs |
| BTTF | 0.377 | 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. | 2784.793 | −91.898 |
| 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.799 | −7.198 |
Intercept 8.87 + feature contributions = -61.826 (log-odds).
Score = sigmoid(-61.826) = 0.
| Score | 0.591 |
|---|
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. | 149.972 | −2.687 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 150 | +1.616 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 70 | −1.442 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 59 | +1.304 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 58 | −0.91 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 70.748 | +0.579 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.087 | +0.094 |
Intercept 0.07 + feature contributions = -1.377 (log-odds).
Score = sigmoid(-1.377) = 0.201.
| Score | 0.255 |
|---|
| Score | 30 |
|---|
Run 1
The code is well-structured with clear class purpose and Javadoc comments that explain intent. Methods are logically organized and concise. Nesting is minimal, with only one level of indentation in tryComplete() and onComplete(). Each method performs a single action sequence, with most lines containing one logical operation. The reading flow is natural, progressing from construction to completion attempts to timeout handling. However, the code loses points due to the presence of meaningless assertions like 'if (((0x77F7 ^ 0x77F7) != 0)) { throw new AssertionError(); }' which appear to be artifacts or obfuscation and add unnecessary noise. The empty onExpiration() method with only a comment could be improved with clearer documentation or removal if unnecessary. Overall, this is highly readable production-quality code with minor blemishes that slightly reduce clarity.
Run 2
The code is generally structured with clear intent and moderate readability, but it contains several issues that detract from its quality. The class has a logical organization with a constructor and overridden methods, and the Javadoc comments help clarify purpose. Nesting is mostly flat, with only one level of indentation in the tryComplete method. However, the presence of meaningless assertion statements (e.g., 'if (((0x77F7 ^ 0x77F7) != 0)) { throw new AssertionError(); }') is confusing and appears to be obfuscated code or debugging artifacts. Action granularity is mostly one action per line, but some lines are long (e.g., pendingFutures.forEach with a lambda and string concatenation). The reading flow is natural for the most part, but the assertion checks interrupt it. Code length is reasonable, though the streaming and lambda expressions could be slightly more concise or extracted for clarity. Overall, the code is understandable but would benefit from removing the assertion artifacts and improving line lengths.
Run 3
The code has a clear class structure and purpose, with Javadoc explaining the intent. However, readability is severely hurt by numerous pointless 'if (((0x... ^ 0x...) != 0)) { throw new AssertionError(); }' lines scattered throughout methods. These lines add noise, break reading flow, and make the code unnecessarily long. The core logic is relatively flat and concise, but the obfuscated assertions dominate the view. Method names like tryComplete, onComplete, and onExpiration are conventional, but the extra noise undermines clarity. The code would be significantly more readable with these dead code lines removed.
Run 1
Code Structure: Fields, constructor, and lifecycle methods are logically organized, but repeated dead assertion guards add clutter. Nesting: Shallow conditionals and simple stream operations keep nesting minimal. Clarity of intent: Descriptive names and documentation explain future completion and timeout handling; unexplained hexadecimal XOR checks obscure intent. Code length: Mostly concise, though redundant guards and duplicated expiration commentary are unnecessary. Action granularity: Most statements perform one action per line, but inline assertion blocks compress control flow and throwing into a single line. Reading flow: Method order is natural and logging supports comprehension, but unindented guards interrupt the visual flow, and the long exceptional-completion lambda is harder to scan.
Run 2
Code Structure: Fields, constructor, and lifecycle methods are logically organized, but irrelevant assertion checks clutter every method. Nesting: Shallow conditionals and simple stream operations keep nesting manageable. Clarity of intent: Descriptive names, documentation, and logging clearly explain future completion and timeout handling; opaque hexadecimal expressions obscure intent, especially in the otherwise empty onExpiration method. Code length: Mostly concise, though redundant checks and repeated expiration commentary add unnecessary length. Action granularity: Most statements perform one action per line, but inline assertion blocks compress condition checking and throwing, while the long exceptional-completion lambda is harder to scan. Reading flow: The lifecycle sequence is natural, but unindented assertion lines interrupt consistent formatting and force readers to distinguish meaningful logic from dead code.
Run 3
Code Structure: Fields, constructor, and lifecycle methods are logically organized, but irrelevant assertion checks clutter each method. Nesting: Shallow conditionals and simple stream operations keep complexity low. Clarity of intent: Descriptive names, logging, and documentation explain future completion and timeout handling; hexadecimal XOR checks obscure intent despite always being false. Code length: Mostly concise, with unnecessary checks and a duplicated expiration comment. Action granularity: Most statements perform one action, but inline assertion blocks compress control flow and throwing onto one line, while the timeout lambda is lengthy. Reading flow: Lifecycle ordering is natural, but unindented checks interrupt the otherwise consistent formatting and force readers to inspect meaningless expressions.