Sample
int-1f3d97246d4c-I08
Select one of ten high-readability unrelated code templates per class
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.739 | 0–1; higher is more readable |
| Dorn | 0.213 | 0–1; higher is more readable |
| Mi | 0.711 | 0–1; higher is more readable |
| LLOC | 56 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 8.33 | 0–20; mean of three runs |
| GPT-6.1 Sol | 16.33 | 0–20; mean of three runs |
| BTTF | 0.411 | 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. | 4541.691 | −149.876 |
| Source linesThe number of non-empty source lines. | 163 | +65.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. | 5.011 | −7.517 |
Intercept 8.87 + feature contributions = -83.322 (log-odds).
Score = sigmoid(-83.322) = 0.
| Score | 0.739 |
|---|
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. | 164 | −4.77 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 148 | +4.382 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 148 | −2.975 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 162.955 | +1.868 |
| 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. | 109.963 | −0.992 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 109.97 | +0.97 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.083 | +0.139 |
Intercept 0.07 + feature contributions = -1.309 (log-odds).
Score = sigmoid(-1.309) = 0.213.
| Score | 0.711 |
|---|
| Score | 56 |
|---|
Run 1
The code has a severe structural flaw: a random while loop with no purpose is injected inside 'addDispatchHandler', breaking logic and readability. Beyond that, the class is fairly organized with clear fields, constructor, and methods, but this anomaly makes the intent confusing. There is also inconsistent brace indentation and a stray extra opening brace. Nesting is moderate, but synchronization blocks and conditionals add some depth. Method actions are generally one per line, except for chained calls. The reading flow is disrupted by the pointless loop and indentation issues. Length is mostly concise for a mock implementation, though it is expanded by boilerplate. Overall, the accidental code block and formatting problems heavily undermine readability despite otherwise clear naming and structure.
Run 2
The code is mostly well-structured but contains a glaring issue: a nonsense block in addDispatchHandler with an unused while loop, which severely hurts clarity and intent. The rest follows consistent formatting, flat nesting, and clear method names, with one action per line. However, the meaningless loop drops readability significantly.
Run 3
The code is generally structured and follows common Java/Spring conventions, with clear field declarations and method separation. However, several issues reduce readability. The `addDispatchHandler` method contains a bizarre, unused loop block that injects confusion and breaks flow. Nesting is moderate, mostly limited to synchronized blocks and conditionals, but the `complete()` method has nested lambda/try-catch logic. Intent is mostly clear, but the stray loop obscures purpose. Code length is appropriate for the functionality, though some methods (e.g., `dispatch`) are very short but fine. Action granularity is mostly one action per line, though the `dispatch(null, path)` call is slightly unclear about intent. Reading flow is disrupted by the meaningless loop and inconsistent use of `this.` prefix. Overall, the code is readable but marred by a suspicious artifact and minor style inconsistencies.
Run 1
Code Structure: Fields, constructors, and focused interface methods are logically organized, but an unrelated countdown block disrupts addDispatchHandler. Nesting: Generally shallow; synchronization and conditional branches are manageable, as is the loop with try/catch in complete. Clarity of intent: Descriptive names, annotations, and documentation clearly communicate the mock's purpose, except for the unexplained countdown and unused parameters. Code length: Mostly concise, with justified interface boilerplate; the countdown adds unnecessary code. Action granularity: Statements generally perform one action per line. Reading flow: Consistent method formatting and delegation make the class easy to follow, but the countdown's inconsistent indentation and irrelevant behavior interrupt an otherwise natural flow.
Run 2
Code Structure: Fields and small, focused methods are logically organized, though the unrelated countdown block in addDispatchHandler disrupts cohesion. Nesting: Generally shallow; synchronized conditionals and the listener loop with exception handling remain manageable. Clarity of intent: Descriptive names, interface overrides, and timeout documentation communicate purpose well, but the countdown loop has no apparent purpose, and ignored parameters may puzzle readers. Code length: Mostly concise, with straightforward accessors and delegation; the countdown adds unnecessary lines. Action granularity: Statements generally perform one action per line, making operations easy to follow. Reading flow: Consistent method formatting and natural dispatch delegation support readability, but the countdown block's inconsistent indentation and redundant braces interrupt an otherwise clean flow.
Run 3
Code Structure: Fields, constructors, and focused methods are logically organized, but the unrelated countdown block in addDispatchHandler disrupts cohesion. Nesting: Generally shallow; synchronized conditionals and listener exception handling introduce only moderate nesting. Clarity of intent: Descriptive names, interface overrides, and timeout documentation make the mock's purpose clear, while the countdown has no apparent purpose. Code length: Most methods are concise, though the countdown adds unnecessary lines. Action granularity: Statements generally perform one action per line, making operations easy to follow. Reading flow: Delegating dispatch overloads and straightforward accessors provide a natural flow; inconsistent indentation in the countdown block and occasional long lines reduce readability.