Sample
int-775ef13e65f8-SRC
Unmodified source class
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.509 | 0–1; higher is more readable |
| Dorn | 0.289 | 0–1; higher is more readable |
| Mi | 0.57 | 0–1; higher is more readable |
| LLOC | 36 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 17.67 | 0–20; mean of three runs |
| GPT-6.1 Sol | 18 | 0–20; mean of three runs |
| BTTF | 0.428 | 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. | 4989.917 | −164.667 |
| 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.097 | −7.645 |
Intercept 8.87 + feature contributions = -119.842 (log-odds).
Score = sigmoid(-119.842) = 0.
| Score | 0.509 |
|---|
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.936 | −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.09 | +0.067 |
Intercept 0.07 + feature contributions = -0.898 (log-odds).
Score = sigmoid(-0.898) = 0.289.
| Score | 0.57 |
|---|
| Score | 36 |
|---|
Run 1
The code demonstrates excellent readability. The class is well-structured with clear inheritance and implementation, logically organized methods, and good use of constants. Each method has a single responsibility: handleRequest sets up content type, handleRequestInternal delegates to session methods based on state, writeFrame handles frame transmission, and getCallbackParam validates and extracts a parameter. Nesting is minimal—the if/else blocks are flat and readable. Although each conditional contains a logging check, the pattern is consistent and idiomatic Spring. Action granularity is appropriate, with most lines performing one clear operation, though the getCallbackParam method chains several calls into a single line that is a bit dense. Reading flow is natural and the protected abstract methods clearly communicate the extension contract. Minor deductions: some multi-line method signatures are slightly long, and the commented-out line in handleRequest is unnecessary noise. Overall, the code is highly maintainable and self-documenting.
Run 2
The code demonstrates strong readability through clear structure, minimal nesting, and explicit method naming. Each branch in handleRequestInternal handles one distinct session state with a clear log message, making intent evident. Methods are concise and follow single-responsibility principles: handleRequest sets headers, handleRequestInternal delegates, writeFrame formats and writes, getCallbackParam validates and decodes. Action granularity is generally good, though the single-line ternary in getCallbackParam slightly compresses logic. Reading flow is natural, progressing from entry point to delegation, with helper methods placed near their callers. The commented-out code block and repeated logging conditionals are minor noise but don't significantly reduce clarity. Import organization is standard. The code balances conciseness with clarity — no excessive abstraction or verbose boilerplate beyond typical Spring style. Overall, it's highly readable with only trivial style nitpicks.
Run 3
The code is highly readable with clear structure and intent. It uses a flat conditional structure in handleRequestInternal that avoids deep nesting while maintaining logical order. Each method has a single responsibility and action granularity is appropriate - one primary operation per line, with debug logging properly contained in conditionals. The reading flow is natural, moving from the public entry point to internal handling then to utility methods. Variable and method names are descriptive without being verbose. Comments are minimal but useful, explaining the commented-out code reference and non-obvious decisions. The only slight complexity is getCallbackParam's query parsing chain, but it's still clear. Formatting and line breaks follow Java conventions consistently.
Run 1
Code Structure: Responsibilities are cleanly separated into request dispatch, frame writing, callback validation, and abstract formatting hooks. Nesting: The session-state conditional is straightforward, with only shallow logging checks inside each branch. Clarity of intent: Descriptive method names, types, and the class documentation make the purpose clear; the terse callback key "c" and obsolete commented-out code slightly reduce clarity. Code length: Methods are compact and appropriately scoped, although repeated logging guards add some verbosity. Action granularity: Most statements perform one clear action; query parsing and frame encoding use chained operations that remain understandable but are relatively dense. Reading flow: Execution proceeds naturally from setup to state handling and supporting helpers, with consistent formatting and whitespace. Overall, the code is highly readable, with minor distractions from historical comments and a few long expressions.
Run 2
Code Structure: Well-organized methods separate request routing, frame writing, callback validation, and subclass extension points. Nesting: Shallow session-state branching with only one additional level for logging checks. Clarity of intent: Descriptive method names, explicit session-state checks, and focused comments make the purpose clear; the abbreviated callback key and commented-out protocol code slightly detract. Code length: Appropriately concise overall, though repeated logging guards add some verbosity. Action granularity: Statements generally perform one action per line; the chained query-parsing expression packs several operations into one statement. Reading flow: Request setup naturally leads into state handling and supporting helpers, with consistent formatting. Dense imports, long expressions, and obsolete commented-out code are minor readability weaknesses.
Run 3
Code Structure: Well-organized methods separate request dispatch, frame writing, callback validation, and subclass customization. Nesting: Shallow overall; logging checks add only one level within the session-state branches. Clarity of intent: Descriptive method and variable names, documentation, and explicit session-state checks make the purpose clear, though the callback key "c" requires domain knowledge. Code length: Appropriately concise, with minor clutter from repeated logging guards and commented-out legacy code. Action granularity: Statements generally perform one action per line; the chained query parsing expression is slightly dense. Reading flow: Request handling proceeds naturally from setup to state-specific behavior, followed by focused helpers. Consistent formatting supports readability, although extra blank lines and obsolete comments slightly interrupt the flow.