Sample
int-6ad3385c28ff-I05
Rewrite eligible decimal integer literals in hexadecimal notation
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 | 16.67 | 0–20; mean of three runs |
| GPT-6.1 Sol | 17.67 | 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 is well-structured with clear separation of concerns: request handling, frame writing, and callback parameter validation are split into focused methods. Nesting is minimal—only one level of conditionals in handleRequestInternal, with debug logging kept short. Intent is explicit through descriptive method names and clear branching logic. Logging statements slightly lengthen the code but aid maintainability. Action granularity is mostly one action per line, though some method signatures and the getCallbackParam chain are multi-step. Reading flow follows a logical sequence from public handler to private helpers. Minor deductions: repeated logging blocks could be extracted, and getCallbackParam's query parsing is somewhat dense. Overall, highly readable with strong structure and clarity.
Run 2
The code is generally well-structured with clear separation of concerns and purposeful method decomposition. The handleRequest method establishes a clean flow, delegating to handleRequestInternal which uses a clear if-else chain for session states. Variable names are descriptive, and the comments explain non-obvious decisions (like the commented-out sockjs-client issue). However, there are some readability challenges: the handleRequestInternal method has repetitive logger.isDebugEnabled() checks that add noise, and the getCallbackParam method chains multiple operations in a somewhat dense manner, though each line remains focused. The abstract methods provide good extension points. The code slightly loses points for some nested logging conditions and the getCallbackParam method's compression of logic, but overall it demonstrates good practices with clear intent, reasonable line lengths, and logical organization.
Run 3
The code is well-structured with clear separation of concerns: a public handleRequest method sets content type before delegating to a protected internal handler. The internal method uses a flat if-else chain to handle session states, avoiding deep nesting. Logging statements are concise and conditional on proper log levels. Helper methods like writeFrame and getCallbackParam encapsulate single responsibilities. Each line generally performs one logical action, enhancing readability. The only minor issues are the commented-out code block and the somewhat long getCallbackParam method, but overall the code follows clean, maintainable patterns with clear naming and natural reading flow.
Run 1
Code Structure: Well-organized methods separate request dispatch, session-state handling, frame writing, and callback parsing; abstract hooks clearly mark extension points. Nesting: Shallow overall, with only logging checks nested inside state branches. Clarity of intent: Descriptive method names, explicit session predicates, and focused comments make the purpose clear, though the terse callback key "c" and commented-out protocol code add ambiguity. Code length: Appropriately concise, but repeated logging guards and obsolete comments introduce minor clutter. Action granularity: Most statements perform one action; the chained query parsing and frame encoding/writing expressions combine several operations but remain understandable. Reading flow: Request setup naturally leads into state handling and supporting helpers. Consistent formatting helps, although tightly packed imports, some extra blank lines, and long expressions slightly reduce scanability.
Run 2
Code Structure: Well-organized class with separate methods for request dispatch, frame writing, and callback parsing, plus clear abstract extension points. Nesting: Shallow overall; session-state branches contain only one additional logging conditional. Clarity of intent: Descriptive method and variable names, documentation, and explicit session-state checks make behavior clear, though the callback key "c" and commented-out protocol code need context. Code length: Appropriately concise, with minor repetition in logging guards and frame-format retrieval. Action granularity: Statements generally perform one action each; chained query parsing and the callback-validation ternary are slightly denser. Reading flow: Request setup naturally leads into state handling and supporting helpers. Consistent formatting helps, while tightly grouped imports and obsolete commented code slightly distract.
Run 3
Code Structure: Well-organized methods separate request dispatch, frame writing, callback parsing, and subclass customization. Nesting: Shallow overall; logging checks add only one level within straightforward session-state branches. Clarity of intent: Descriptive names, explicit state checks, and focused comments make behavior clear, though the callback key "c" and commented-out protocol code introduce minor ambiguity. Code length: Appropriately concise, with some repetitive logging guards and obsolete commented code. Action granularity: Most statements perform one clear action; the chained query-parsing expression packs several operations into one line. Reading flow: Request handling proceeds naturally into helper methods and extension points, supported by consistent formatting. Dense imports and a few long expressions slightly reduce scanability.