Sample
int-653a8390b4b6-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.393 | 0–1; higher is more readable |
| Dorn | 0.074 | 0–1; higher is more readable |
| Mi | 0.017 | 0–1; higher is more readable |
| LLOC | 30 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 9.33 | 0–20; mean of three runs |
| GPT-6.1 Sol | 11.67 | 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. | 2195.46 | −72.45 |
| Source linesThe number of non-empty source lines. | 84 | +33.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. | 4.576 | −6.864 |
Intercept 8.87 + feature contributions = -36.844 (log-odds).
Score = sigmoid(-36.844) = 0.
| Score | 0.393 |
|---|
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. | 187.965 | −4.296 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 188 | +2.229 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 84 | −1.938 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 83.725 | +0.76 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 40 | +0.646 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 40 | −0.497 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.046 | +0.496 |
Intercept 0.07 + feature contributions = -2.529 (log-odds).
Score = sigmoid(-2.529) = 0.074.
| Score | 0.017 |
|---|
| Score | 30 |
|---|
Run 1
The code is generally understandable, but its readability is compromised by inconsistent formatting and documentation style. Comments are often misplaced (e.g., trailing after code, or obscure functional intent). The class's purpose is documented, but method-level explanations are verbose or insufficient in places. Nesting is acceptable, though there is some logical duplication in 'updateState' and 'findRedundantOffset' around maintaining min offsets. 'updateState' performs several operations (setting min, putting data, optionally removing) in one method, reducing action granularity. The one-liner constructor and other compressed code hinder scanning. Javadoc and inline comments are inconsistently placed and sometimes poorly describe the logic. Overall, the code could be much clearer with better formatting, clearer comments, and more granular method extraction.
Run 2
The code has logical structure and reasonable method separation, but readability is significantly hampered by formatting issues. Multiple statements are compressed onto single lines, particularly in the constructor, updateState method, and closing braces, violating 'one action per line.' Javadoc comments are inconsistently placed and sometimes misaligned with their corresponding code. Import statements are run together without spacing. While nesting is minimal and action granularity is mostly acceptable, the poor formatting disrupts reading flow and forces readers to parse densely packed lines. The class purpose is clear, and the algorithm logic is understandable, but the presentation undermines clarity. With proper line breaks and formatting, this code would be significantly more readable.
Run 3
The code is poorly structured and difficult to read. Several methods are compressed into single lines with multiple statements (e.g., updateState and lastRedundantOffset), violating action granularity and reading flow. Imports are collapsed onto one line, and some comments are inline or misplaced, disrupting logical organization. Nesting is shallow, which is good, but clarity of intent suffers due to dense formatting, minimal whitespace, and unclear separation of concerns. The findRedundantOffset method contains a long explanation inside a loop that breaks flow. While the class-level comments are helpful, the inconsistent formatting and lack of structure make the code significantly harder to scan and maintain. Overall, the code is functional but visually cluttered and unnecessarily dense, reducing readability.
Run 1
Code Structure: Responsibilities are sensibly separated into initialization, state updates, minimum-offset calculation, and accessors, but inconsistent formatting obscures those boundaries. Nesting: Shallow loops and conditionals with early returns keep complexity low. Clarity of intent: Descriptive class and method names plus explanatory comments establish the purpose, although 'soFar' is vague and redundant-versus-necessary offset terminology requires careful interpretation. Code length: The implementation is compact, but lengthy comments and compressed methods make its presentation uneven. Action granularity: Several imports, assignments, conditionals, and returns share lines, reducing scanability. Reading flow: Logical method order helps, but comments attached to unrelated declarations, inline braces, and collapsed methods interrupt natural reading. Overall, the logic is approachable, while formatting substantially weakens readability.
Run 2
Code Structure: Fields and focused methods provide logical organization, but inconsistent formatting obscures boundaries. Nesting: Mostly shallow, with straightforward conditionals and one loop. Clarity of intent: Descriptive names and explanatory comments communicate offset tracking, although redundant-offset terminology and deletion ordering require careful reading. Code length: The implementation is reasonably concise, but lengthy comments and repetitive documentation add reading overhead. Action granularity: Several imports, assignments, conditionals, and returns share lines, making individual operations harder to distinguish. Reading flow: The overall progression from initialization to updates, calculation, and accessors is natural, but cramped method declarations, misplaced inline comments, and same-line closing braces repeatedly interrupt scanning.
Run 3
Code Structure: Fields and focused methods provide logical organization, but inconsistent formatting blurs boundaries. Nesting: Mostly shallow, with a straightforward loop and simple conditionals. Clarity of intent: Descriptive names and documentation explain offset tracking and snapshot behavior, although redundant versus necessary offset terminology requires careful reading. Code length: The implementation is reasonably concise, but lengthy comments and repetitive documentation interrupt it. Action granularity: Multiple imports, constructor operations, conditionals, and returns share lines, making individual actions harder to scan. Reading flow: The overall sequence is sensible, but inline comments, compressed method declarations, and misplaced closing braces disrupt natural reading. Consistent formatting and more focused comments would substantially improve readability.