Sample
int-3d876f6087b2-I03
Replace method, parameter, and local names with length-matched, meaningful but unrelated names
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.63 | 0–1; higher is more readable |
| Dorn | 0.231 | 0–1; higher is more readable |
| Mi | 0.125 | 0–1; higher is more readable |
| LLOC | 22 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 11.67 | 0–20; mean of three runs |
| GPT-6.1 Sol | 14 | 0–20; mean of three runs |
| BTTF | 0.489 | 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. | 2125.153 | −70.13 |
| 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.69 | −7.034 |
Intercept 8.87 + feature contributions = -43.095 (log-odds).
Score = sigmoid(-43.095) = 0.
| Score | 0.63 |
|---|
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.795 | +0.468 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.075 | +0.214 |
Intercept 0.07 + feature contributions = -1.202 (log-odds).
Score = sigmoid(-1.202) = 0.231.
| Score | 0.125 |
|---|
| Score | 22 |
|---|
Run 1
The code is generally readable due to clear Javadoc comments and consistent formatting, but several issues lower the score. The naming is misleading: parameters like 'localUser' (used as timeoutMs), 'channel' (used as futures), 'defaultSession' (used as pending futures), and 'version' (used as count) obscure intent despite the explanatory comments. The constructor takes a 'localUser' parameter but immediately assigns it to timeoutMs, suggesting either a design flaw or poor naming. The class has decent structure with short methods, but the logic in removeEvent and saveResult could be clearer. Nesting is minimal and reading flow is reasonable. However, the semantic mismatch between parameter names and their usage significantly impacts clarity of intent, making the code harder to understand than necessary.
Run 2
The code has significant readability issues. The constructor parameter naming is confusing: 'localUser' is used for both timeout and super constructor, while 'channel' and 'currentMessage' don't reflect their actual roles as futures list and response callback. Variable names like 'version' and 'defaultSession' are misleading—they actually represent pending future counts. The timeoutMs field is redundant since localUser is already stored. The class extends DelayedOperation but the relationship to the futures isn't clear from naming. The saveResult method does multiple things: filters futures, times out pending ones, and invokes callback. Method names like removeEvent, saveResult, and createBuffer don't clearly communicate their purpose. Documentation exists but doesn't compensate for poor naming choices. The code structure is relatively flat but the semantic confusion makes it hard to follow the actual logic flow.
Run 3
The code is generally clear and well-structured, with good use of Javadoc and straightforward method decomposition. However, several issues reduce readability: confusing parameter names in the constructor ('localUser' used for timeoutMs, 'channel' for futures, 'currentMessage' for responseCallback), misleading variable names like 'version' and 'defaultSession' for counts and lists of pending futures, and unnecessary use of a stream to count pending futures when a simple loop would be clearer. The nesting is flat and methods are concise, but the semantic mismatch between names and intent creates ambiguity. Action granularity is adequate. Overall, the code is readable but would benefit significantly from better naming and minor simplification.
Run 1
Code Structure: Fields, constructor, and lifecycle methods are logically organized, with each method serving a distinct role. Nesting: Minimal nesting and straightforward stream operations make control flow easy to follow. Clarity of intent: Comments and logging explain completion and timeout behavior, but misleading names such as localUser, channel, currentMessage, version, and defaultSession obscure their actual meanings. Method names removeEvent, saveResult, and createBuffer also poorly communicate their responsibilities. Code length: Generally concise, though the empty method repeats its documentation and the else after an early return is unnecessary. Action granularity: Most lines perform one action, but the long exceptional-completion lambda combines filtering-related context, exception construction, and completion in a visually dense statement. Reading flow: The class progresses naturally from initialization to completion checks and cleanup, but inconsistent terminology and the reference to onComplete() rather than the shown method names interrupt comprehension.
Run 2
Code Structure: The class is logically organized into fields, constructor, and lifecycle methods. Nesting: Minimal nesting makes control flow easy to follow, although the else after a return is unnecessary. Clarity of intent: Comments and descriptive fields explain the purpose, but names such as localUser, channel, currentMessage, version, defaultSession, removeEvent, saveResult, and createBuffer obscure their actual roles. Code length: Mostly concise, with a redundant comment in the empty method and some lengthy stream expressions. Action granularity: Statements generally perform one action each; stream chains combine filtering and aggregation or collection in conventional ways. Reading flow: The progression from initialization to completion checking and timeout handling is natural, but misleading identifiers, tightly packed imports, and the comment referring to onComplete rather than the visible method names interrupt understanding.
Run 3
Code Structure: Fields, constructor, and lifecycle methods are logically organized with focused responsibilities. Nesting: Very shallow; only one simple conditional, with stream operations avoiding nested loops. Clarity of intent: Comments explain the overall purpose, but names such as localUser, channel, currentMessage, version, and defaultSession obscure timeout and future-related roles. Method names removeEvent, saveResult, and createBuffer do not clearly describe their behavior, and the onComplete reference does not match the visible method names. Code length: Mostly concise, though the empty method repeats its documentation and the else after an early return is unnecessary. Action granularity: Generally one action per line, but the long exceptional-completion lambda combines filtering-related context, exception construction, and completion in a dense expression. Reading flow: The progression from initialization to completion checking and timeout handling is natural, but misleading identifiers and long stream lines interrupt comprehension.