Sample
int-b34e8cdfaac4-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.487 | 0–1; higher is more readable |
| Dorn | 0.189 | 0–1; higher is more readable |
| Mi | 0.008 | 0–1; higher is more readable |
| LLOC | 44 | 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.273 | 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. | 4869.167 | −160.682 |
| Source linesThe number of non-empty source lines. | 78 | +31.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. | 4.827 | −7.241 |
Intercept 8.87 + feature contributions = -127.854 (log-odds).
Score = sigmoid(-127.854) = 0.
| Score | 0.487 |
|---|
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. | 202.975 | −4.932 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 203 | +2.471 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 79 | −1.761 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 65 | +1.511 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 77.917 | +0.679 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.086 | +0.11 |
Intercept 0.07 + feature contributions = -1.454 (log-odds).
Score = sigmoid(-1.454) = 0.189.
| Score | 0.008 |
|---|
| Score | 44 |
|---|
Run 1
The code has poor readability despite functional logic. The structure is tangled with multiple statements on single lines, making it difficult to scan. Nested try-catch blocks are acceptable but formatting makes them hard to follow. Intent is somewhat clear through comments but the implementation is obscured by poor formatting. The code is unnecessarily long due to line compression rather than logical verbosity. Action granularity is violated with multiple import statements and method declarations on the same line. Reading flow is disrupted by inconsistent indentation, mixed line breaks, and compacted method bodies. While the class purpose is understandable, the layout significantly impacts readability.
Run 2
The code is highly unreadable due to severe formatting issues and poor structure. Multiple declarations are crammed onto single lines, including the class header and field declarations, making it difficult to parse visually. Method bodies are compressed into one line in several places, violating the one-action-per-line principle and making control flow nearly impossible to follow. The import statements are also run together, reducing readability. While the code's intent as a number converter is somewhat discernible through naming and comments, the execution is chaotic. Nesting depth is acceptable when formatted properly, but the current layout obscures this. The code's logical organization is sound, but the physical presentation destroys its readability. It needs complete reformatting to become maintainable.
Run 3
The code has several readability issues. Class structure is acceptable, but many imports and class-level fields are compressed onto single lines, hurting the reading flow. Some methods and field declarations are collapsed into one line, violating the 'one action per line' principle. The nesting is shallow, which is good, but the try-catch blocks and method bodies are inconsistently formatted, making the logic harder to scan. Intent is mostly clear due to descriptive method names, but the mixture of compressed lines and normal formatting creates visual noise. Some null checks are done via assertions, which may not be ideal for production code clarity. Overall, the code would benefit significantly from consistent line breaks between imports, fields, and method bodies.
Run 1
Code Structure: Responsibilities are logically separated into construction, configuration, conversion, header delegation, and cleanup, but compressed formatting obscures method boundaries. Nesting: Shallow control flow and simple try/catch blocks keep complexity low. Clarity of intent: Descriptive names, documentation, and explicit exception messages clearly communicate the converter's purpose. Code length: The implementation is reasonably concise, with useful delegation and little redundant logic. Action granularity: Multiple imports, field declarations, assertions, calls, and method boundaries share lines, making individual actions difficult to scan. Reading flow: Inconsistent line breaks and crowded annotations, braces, and exception handlers repeatedly interrupt otherwise natural organization. Overall, the logic is understandable, but poor formatting substantially reduces readability.
Run 2
Code Structure: Responsibilities are logically separated into constructor, configuration, conversion, header delegation, and cleanup methods, but compressed formatting obscures boundaries. Nesting: Shallow control flow and simple try/catch blocks keep complexity low. Clarity of intent: Descriptive method and field names, standard interfaces, and documentation make the converter's purpose clear. Code length: The implementation is reasonably concise without substantial redundant logic, though excessive line compression harms readability rather than improving concision. Action granularity: Multiple imports, declarations, assertions, method calls, and even method boundaries share lines, making individual actions difficult to scan. Reading flow: The overall method order is natural, but inconsistent line breaks, inline annotations, and crowded braces repeatedly interrupt reading.
Run 3
1. Code Structure: Responsibilities are logically separated into configuration, conversion, header delegation, and cleanup methods, but compressed formatting obscures boundaries. 2. Nesting: Shallow nesting and simple try/catch blocks keep control flow manageable. 3. Clarity of intent: Descriptive names, standard interfaces, and useful documentation clearly communicate the converter's purpose. 4. Code length: The implementation is reasonably concise without unnecessary logic; however, excessive line compression reduces readability rather than improving concision. 5. Action granularity: Multiple imports, declarations, assignments, assertions, and calls share lines, making individual actions harder to scan. 6. Reading flow: Inconsistent line breaks, annotations attached to preceding braces, and inline method bodies disrupt natural top-to-bottom reading. Overall, clear design and straightforward logic are substantially undermined by poor formatting.