Sample
int-d008501f10aa-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.781 | 0–1; higher is more readable |
| Dorn | 0.126 | 0–1; higher is more readable |
| Mi | 0.268 | 0–1; higher is more readable |
| LLOC | 31 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 7.67 | 0–20; mean of three runs |
| GPT-6.1 Sol | 12.33 | 0–20; mean of three runs |
| BTTF | 0.514 | 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. | 2136.485 | −70.504 |
| Source linesThe number of non-empty source lines. | 110 | +44 |
| 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.62 | −6.93 |
Intercept 8.87 + feature contributions = -24.564 (log-odds).
Score = sigmoid(-24.564) = 0.
| Score | 0.781 |
|---|
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. | 111 | −2.894 |
| 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. | 147.991 | −2.603 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 147.991 | +1.583 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 109.906 | +1.126 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 40 | +0.646 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.032 | +0.631 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 40 | −0.497 |
Intercept 0.07 + feature contributions = -1.937 (log-odds).
Score = sigmoid(-1.937) = 0.126.
| Score | 0.268 |
|---|
| Score | 31 |
|---|
Run 1
The code has a logical structure and clear intent overall, with good Javadoc documentation. However, readability is significantly reduced by inconsistent formatting. Many lines contain multiple statements (e.g., field declarations, constructor logic, method returns) that should be separated onto individual lines. Braces and method bodies are often collapsed onto single lines, disrupting the natural reading flow and violating one-action-per-line granularity. While nesting depth is low and the core logic is concise, the compact layout makes the code feel tangled and harder to scan than it should be. The structure is fundamentally sound, but poor formatting undermines clarity.
Run 2
The code is functional but suffers from poor formatting and structure. Import statements are collapsed onto single lines, multiple statements appear on the same line, and closing braces are attached to other code, making it difficult to scan. While the class has a clear purpose and the logic is not deeply nested, the physical layout forces the reader to parse dense blocks. Javadoc is thorough and helpful, but comments are sometimes embedded awkwardly between statements. The method and field order is logical, but the disorganized presentation significantly reduces readability. Overall, the intent is clear, but the implementation is visually tangled and unnecessarily hard to follow.
Run 3
The code has reasonable high-level organization and intent, but readability is severely degraded by formatting. Multiple statements are packed onto single lines (constructors, loops, conditionals), violating action granularity and disrupting reading flow. Indentation is inconsistent and braces are often inline, making block boundaries hard to follow. Javadocs are present and helpful, but the compressed code layout undermines clarity. Nesting is shallow, which is positive, but the visual clutter negates that benefit. Variable names are meaningful, yet the lack of separation between actions and inconsistent whitespace makes the logic hard to scan. Overall, the code's structure and documentation are good, but its formatting makes it unnecessarily difficult to read.
Run 1
Code Structure: Fields, constructors, and escaping methods are logically organized, but compressed formatting obscures their boundaries. Nesting: Shallow loops and conditionals are easy to follow, with at most two nested control-flow levels. Clarity of intent: Descriptive names and thorough documentation clearly explain replacement lookup, safe ranges, and fallback escaping. Code length: Implementation is reasonably concise, though constructor documentation is repetitive and dominates the snippet. Action granularity: Multiple imports, assignments, conditionals, and closing braces share lines, reducing scanability; some trailing comments appear to describe the next field rather than the current one. Reading flow: The algorithm follows a natural sequence, but inconsistent spacing, inline method bodies, and documentation immediately following closing braces repeatedly interrupt reading.
Run 2
Code Structure: Fields, constructors, and escaping methods are logically organized, but compressed formatting obscures their boundaries. Nesting: Shallow loops and conditionals keep complexity manageable; early returns simplify control flow. Clarity of intent: Descriptive names and detailed documentation explain replacement lookup, safe ranges, and subclass responsibilities. Code length: Implementation is concise, though repeated constructor documentation adds bulk. Action granularity: Several lines combine imports, assignments, conditionals, and closing braces, making individual operations harder to distinguish. Reading flow: The algorithm follows a natural sequence, but inconsistent spacing, misplaced inline comments, and documentation starting immediately after closing braces interrupt scanning. Overall, clear semantics and modest complexity are undermined by poor layout.
Run 3
Code Structure: Fields, constructors, and escaping methods are logically organized, but compressed formatting obscures their boundaries. Nesting: Shallow loops and conditionals keep control flow manageable. Clarity of intent: Descriptive names and thorough documentation clearly explain replacement lookup, safe ranges, and fallback escaping. Code length: Implementation is concise; extensive, partly repetitive documentation adds reading overhead but provides useful context. Action granularity: Multiple imports, assignments, conditionals, and closing braces share lines, reducing scanability and violating one-action-per-line conventions. Reading flow: Inconsistent spacing, misplaced inline comments, and documentation beginning immediately after closing braces interrupt otherwise natural progression. Overall, the logic is understandable, but formatting significantly weakens readability.