Sample
int-211655843774-I10
Remove about 40% of line-break groups while retaining structure
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.689 | 0–1; higher is more readable |
| Dorn | 0.147 | 0–1; higher is more readable |
| Mi | 0.015 | 0–1; higher is more readable |
| LLOC | 53 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 6.67 | 0–20; mean of three runs |
| GPT-6.1 Sol | 10 | 0–20; mean of three runs |
| BTTF | 0.369 | 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. | 4371.314 | −144.253 |
| Source linesThe number of non-empty source lines. | 95 | +38 |
| 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.995 | −7.493 |
Intercept 8.87 + feature contributions = -104.876 (log-odds).
Score = sigmoid(-104.876) = 0.
| Score | 0.689 |
|---|
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. | 152.958 | −2.814 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 96 | −2.363 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 80 | +2.03 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 152.99 | +1.664 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 80 | −1.415 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 94.883 | +0.916 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.081 | +0.151 |
Intercept 0.07 + feature contributions = -1.76 (log-odds).
Score = sigmoid(-1.76) = 0.147.
| Score | 0.015 |
|---|
| Score | 53 |
|---|
Run 1
The code is largely unreadable due to severe formatting problems. Multiple statements are crammed onto single lines (e.g., field declarations, method signatures, and bodies), making the code dense and difficult to scan. The inconsistent indentation and line breaks break visual hierarchy, so methods don't stand out. While method names and logic are relatively clear, the tangled presentation obscures intent. Nesting is minimal, which is a positive, but action granularity fails badly because many lines combine multiple actions. The reading flow is disorganized, forcing the reader to mentally unpack every line. Although the underlying logic is straightforward, the formatting makes it unnecessarily hard to navigate. To improve, each field declaration, method, and statement should appear on its own line with consistent indentation.
Run 2
The code suffers from severe readability issues primarily due to formatting. Imports are crammed onto single lines, and multiple actions or declarations frequently share one line, violating the 'one action per line' principle. This makes the code visually dense and disrupts reading flow. While the class structure itself is logical and method names are clear, the inconsistent spacing and inline braces make the code appear tangled. Nesting is generally flat, but the formatting undermines clarity of intent. The code length is not excessive, but the lack of line breaks makes it feel longer and harder to scan. Overall, the structure and intent are sound, but poor formatting drastically reduces readability.
Run 3
The code is difficult to read due to multiple formatting problems. Imports are collapsed onto single lines, and method declarations frequently share lines with other code, violating one-action-per-line. Many opening braces are placed on the same line as the preceding statement rather than on their own line, disrupting visual structure. Some method bodies are crammed together without spacing, and there are inconsistencies in brace style and indentation. While the class has a clear purpose and logical organization at a high level, the lack of consistent formatting significantly increases cognitive load. Nested structures like synchronized blocks and loops are not visually delineated well. The Javadoc is present but embedded in a way that hurts readability. Overall, the code would benefit from consistent line breaks, properly placed braces, and one statement per line.
Run 1
Code Structure: Fields and methods are logically grouped within a focused class, but compressed declarations and method boundaries obscure that organization. Nesting: Mostly shallow; synchronization, conditionals, and listener exception handling introduce manageable nesting. Clarity of intent: Descriptive names, interface overrides, and documentation make the mock async behavior understandable. Code length: Methods are appropriately short, with little unnecessary logic; compression saves lines rather than improving readability. Action granularity: Multiple imports, field declarations, assignments, and entire methods share lines, making individual actions harder to distinguish. Reading flow: Inconsistent indentation, crowded braces, and annotations or comments attached to preceding statements repeatedly interrupt scanning. The underlying implementation is straightforward, but poor formatting substantially reduces readability.
Run 2
Code Structure: Fields and methods form a logically organized mock implementation, but merged declarations and method boundaries obscure that organization. Nesting: Generally shallow; synchronization, conditionals, and listener exception handling introduce only moderate nesting. Clarity of intent: Descriptive names, interface overrides, and documentation make behavior mostly clear. Code length: Methods are concise, with little unnecessary code, although excessive line compression harms readability. Action granularity: Multiple imports, field declarations, assignments, and method definitions share lines, making individual actions harder to distinguish. Reading flow: Inconsistent indentation, crowded braces, and annotations attached to preceding methods repeatedly interrupt scanning. The underlying design is readable, but formatting substantially reduces accessibility.
Run 3
Code Structure: Fields and methods have sensible responsibilities, but compressed declarations and inconsistent formatting obscure their boundaries. Nesting: Mostly shallow; synchronization, conditionals, and exception handling introduce only moderate nesting. Clarity of intent: Descriptive names, standard interface methods, and documentation make the mock asynchronous behavior understandable. Code length: Implementation is reasonably concise, with little unnecessary logic, although excessive compression sacrifices readability. Action granularity: Multiple imports, assignments, declarations, and method boundaries share lines, making individual actions harder to distinguish. Reading flow: Irregular indentation, crowded annotations, and closing braces attached to subsequent methods repeatedly interrupt scanning. The underlying design is readable, but presentation substantially reduces accessibility.