Sample
int-4f6e089d96ee-I12
Inline all eligible single-use intermediate local variables
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.643 | 0–1; higher is more readable |
| Dorn | 0.231 | 0–1; higher is more readable |
| Mi | 0.121 | 0–1; higher is more readable |
| LLOC | 22 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 18 | 0–20; mean of three runs |
| GPT-6.1 Sol | 18 | 0–20; mean of three runs |
| BTTF | 0.532 | 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. | 2108.69 | −69.587 |
| Source linesThe number of non-empty source lines. | 63 | +25.2 |
| 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.685 | −7.027 |
Intercept 8.87 + feature contributions = -42.544 (log-odds).
Score = sigmoid(-42.544) = 0.
| Score | 0.643 |
|---|
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.984 | −2.688 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 149.953 | +1.615 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 62 | −1.159 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 51 | +1.027 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 51 | −0.749 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 62.775 | +0.468 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.075 | +0.216 |
Intercept 0.07 + feature contributions = -1.201 (log-odds).
Score = sigmoid(-1.201) = 0.231.
| Score | 0.121 |
|---|
| Score | 22 |
|---|
Run 1
The code is well-structured with clear separation of concerns across methods. Nesting is minimal, using stream operations to avoid deep indentation. Intent is clearly documented with Javadoc and in-method logs that explain state transitions. Code length is appropriate — no excessive verbosity. Action granularity is mostly one action per line, though some stream pipelines condense logic but remain readable. Reading flow is natural: constructor, tryComplete, onComplete, onExpiration follow logical lifecycle order. Minor deductions: the repeated `futures.stream().filter(...)` pattern could be extracted for reuse, and `onExpiration()` contains only a redundant comment, but these do not significantly harm readability.
Run 2
The code is highly readable with clear structure and intent. The class has a single responsibility and is well-organized with logical method ordering. Nesting is minimal - only one level inside methods. Each method has a clear purpose reflected in its name and Javadoc. Code length is appropriate without unnecessary verbosity. Action granularity is good, though the stream operations in tryComplete() and onComplete() combine multiple actions per line. The reading flow is natural: constructor, then tryComplete, onComplete, onExpiration. Logging statements enhance clarity. Minor deductions: the onExpiration() method is redundant (could be omitted entirely), and the stream filter operations compress logic that could be slightly more explicit. The timeoutMs field duplicates the parent class's timeout value, which is a minor design redundancy.
Run 3
The code is highly readable with a clear, logical structure. Each class is well-documented with purpose, and methods are concise with single responsibilities. Nesting is minimal, with only one level in the stream operations. Intent is evident from method names and comments, making the purpose of each component clear. Code length is appropriate — no unnecessary verbosity. Action granularity is well-maintained, with each statement focusing on a single logical step. Reading flow is natural: imports, class documentation, fields, constructor, then overridden methods in logical order. The only minor deductions are due to slightly repetitive logging and the empty onExpiration method, which could be simplified or omitted with a note in the base class, but these do not significantly impact overall readability.
Run 1
Code Structure: Fields, constructor, and lifecycle methods are logically organized with clear responsibilities. Nesting: Minimal nesting; only a simple if/else appears, while stream operations remain straightforward. Clarity of intent: Descriptive names and documentation explain completion, timeout handling, and callback execution; understanding lifecycle ordering requires some superclass context. Code length: Concise overall, though the empty expiration method repeats its documentation and the else after a return is unnecessary. Action granularity: Statements generally perform one action each, but the long lambda combines exception construction and future completion, making that line denser. Reading flow: Natural progression from initialization to completion checks and finalization; long stream and timeout lines slightly hinder scanning.
Run 2
Code Structure: Fields, constructor, and lifecycle methods are logically organized with clear responsibilities. Nesting: Only one shallow if/else block; stream operations avoid nested loops. Clarity of intent: Descriptive names, documentation, and logging explain completion and timeout behavior, though lifecycle ordering depends on the superclass. Code length: Concise overall, with minor redundancy in the else after a return and duplicated documentation for onExpiration. Action granularity: Statements generally perform one action each; the long exceptional-completion lambda combines filtering-related context, exception creation, and completion in a visually dense line. Reading flow: Natural progression from initialization to completion checks and cleanup, slightly weakened by long lines and the lack of separation between package and import groups.
Run 3
Code Structure: Fields, constructor, and lifecycle methods are logically organized with focused responsibilities. Nesting: Only one shallow conditional; stream operations avoid nested loops. Clarity of intent: Descriptive names, documentation, and logging clearly explain completion and timeout behavior, though the superclass lifecycle must be understood externally. Code length: Compact overall, with minor redundancy in the empty expiration method's documentation and an unnecessary else after a return. Action granularity: Statements generally perform one clear action; the long exceptional-completion lambda combines exception construction and completion but remains understandable. Reading flow: Natural progression from initialization to completion checks, completion handling, and expiration. Long stream/lambda lines and tightly packed imports slightly reduce scanability.