Sample
int-9ab9ef5c7e5f-I12
Inline all eligible single-use intermediate local variables
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.518 | 0–1; higher is more readable |
| Dorn | 0.287 | 0–1; higher is more readable |
| Mi | 0.57 | 0–1; higher is more readable |
| LLOC | 35 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 16.33 | 0–20; mean of three runs |
| GPT-6.1 Sol | 17 | 0–20; mean of three runs |
| BTTF | 0.424 | 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. | 4968.622 | −163.965 |
| Source linesThe number of non-empty source lines. | 109 | +43.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.1 | −7.651 |
Intercept 8.87 + feature contributions = -119.145 (log-odds).
Score = sigmoid(-119.145) = 0.
| Score | 0.518 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 110 | −2.858 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 99 | +2.687 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 99 | −1.851 |
| 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. | 113.945 | −1.161 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 108.93 | +1.113 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 113.991 | +1.035 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.091 | +0.055 |
Intercept 0.07 + feature contributions = -0.911 (log-odds).
Score = sigmoid(-0.911) = 0.287.
| Score | 0.57 |
|---|
| Score | 35 |
|---|
Run 1
The code is generally well-structured with clear class hierarchy, method separation, and JavaDoc. Methods are focused and each does a single task, with no deeply nested logic. The reading flow is logical, starting with request handling and moving to internal logic. However, readability is reduced by excessive debug logging blocks that interrupt the main logic flow, especially in handleRequestInternal. The commented-out lines and blank line in handleRequest add minor clutter. While the code is concise and follows clean coding principles, the repeated logger checks make the control flow harder to follow at a glance. Variable names are descriptive, and imports are organized. Action granularity is mostly one action per line. Overall, it's readable but could be improved by extracting logging or using more concise logging patterns.
Run 2
The code is well-structured, with clear separation of concerns: request handling, session state logic, frame writing, and utility methods. The main handleRequestInternal method uses a flat if-else chain with minimal nesting, making the session-state logic easy to follow. Each branch performs a single clear action (handling initial request, writing a close frame, etc.). Method names and logging statements clearly convey intent. The getCallbackParam method is appropriately concise and readable, with a logical validation flow. Minor deductions: a stray blank comment block in handleRequest and slight verbosity from repeated logger checks. Overall, the code demonstrates strong readability with clear boundaries and predictable flow.
Run 3
The code is generally well-structured and readable. It uses clear method names, follows Spring conventions, and has good separation of concerns. The handleRequestInternal method uses if-else branching with minimal nesting, though each branch contains a logging check that adds slight repetition. The writeFrame method is concise and single-purpose. However, there are a few issues: an unused commented-out line in handleRequest adds confusion, the getCallbackParam method chains multiple operations in a single expression making it harder to follow, and there's a blank line artifact that appears accidental. The code could benefit from extracting the logging pattern or simplifying the callback parameter parsing. Overall, the class has clear intent and maintains good readability, but minor improvements would enhance clarity.
Run 1
Code Structure: Well-organized methods separate request dispatch, session-state handling, frame writing, and callback validation. Nesting: Mostly shallow, with logging checks adding only one level inside the state branches. Clarity of intent: Descriptive names and explicit session-state checks communicate purpose, though the unexplained session cast, callback key "c", and obsolete commented-out code reduce clarity. Code length: Appropriately concise overall, with minor clutter from repeated logging guards and excess blank lines. Action granularity: Most statements perform one clear action; chained query parsing and inline frame conversion are slightly denser. Reading flow: Request setup naturally leads into state handling and helper methods, but inconsistent whitespace and stale comments interrupt an otherwise coherent flow.
Run 2
Code Structure: Responsibilities are logically separated into request handling, frame writing, and callback validation, with clear abstract extension points. Nesting: The session-state conditional chain is straightforward; nested logging checks add only modest depth. Clarity of intent: Descriptive method names, explicit session-state checks, and focused comments make the purpose clear, although the abbreviated callback key and commented-out protocol code introduce minor ambiguity. Code length: Methods are concise and appropriately scoped, but redundant blank lines and obsolete commented code add clutter. Action granularity: Most lines perform one action; the query-parsing chain and decode-validation expression are somewhat dense but manageable. Reading flow: Execution proceeds naturally from response setup through state handling to helper methods. Consistent formatting supports scanning, though the unexplained session cast and unused handler parameter slightly interrupt comprehension.
Run 3
Code Structure: Well-organized methods separate request dispatch, session-state handling, frame writing, and callback validation. Nesting: Mostly shallow, with logging guards adding only one extra level within state branches. Clarity of intent: Descriptive method names and explicit session checks make behavior clear; the terse callback key and obsolete commented-out code slightly obscure intent. Code length: Appropriately concise overall, though repeated logging guards and excess blank lines add clutter. Action granularity: Statements generally perform one action per line; the chained query parsing expression is somewhat dense. Reading flow: Request handling progresses naturally into focused helpers and extension points, but inconsistent whitespace, ungrouped imports, and stale comments interrupt an otherwise readable flow.