Sample
Scalabrio62
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 64.8Δ 29.9 |
| Scalabrino | 0.771 | 0–1; higher is more readable | 80.4Δ 45.5 |
| Dorn | 0.447 | 0–1; higher is more readable | 49.7Δ 14.8 |
| Mi | 0.021 | 0–1; higher is more readable | 11.6Δ 23.4 |
| LLOC | 11 | Logical lines; fewer is more readable | 63.1Δ 28.1 |
| DeepSeek V4 Pro | 6.33 | 0–20; mean of three runs | 3.0Δ 31.9 |
| GPT-6.1 Sol | 13.67 | 0–20; mean of three runs | 7.5Δ 27.4 |
| BTTF | 0.48 | 0–1; higher is more readable | 33.2Δ 1.8 |
| Human | 3.33 | 1–5; original rating | 34.9 |
Views
Select the downloaded ZIP or its extracted folder. Files stay in your browser.
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. | 610.372 | −20.142 |
| Source linesThe number of non-empty source lines. | 21 | +8.4 |
| 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.887 | −7.33 |
Intercept 8.87 + feature contributions = -10.202 (log-odds).
Score = sigmoid(-10.202) = 0.
| Score | 0.771 |
|---|
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. | 133 | −1.968 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 132.952 | +1.341 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 21 | +0.293 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 13 | −0.287 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 19.888 | −0.132 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.089 | +0.073 |
Intercept 0.07 + feature contributions = -0.213 (log-odds).
Score = sigmoid(-0.213) = 0.447.
| Score | 0.021 |
|---|
| Score | 11 |
|---|
Run 1
The code is dense and difficult to read. The structure is tangled, with complex multi-line for loops performing CAS operations that are hard to parse. Nesting is limited but the for loops pack multiple conditions, evaluations, and side effects into single lines, violating action granularity. Intent is somewhat documented (locking rationale) but the actual update logic is ambiguous without deep Java concurrency knowledge. Length is concise but at the cost of clarity. Reading flow is disrupted by extended single-line loops. The lock/unlock region is clear, but the core updates are not quickly understandable.
Run 2
The code has some readability issues. While it uses a try/finally for lock management and includes brief comments, several factors reduce clarity. The for loops for atomic updates are overly compact and difficult to parse, combining multiple operations per line. The method's purpose is conveyed through comments, but the implementation obscures it. Deep conceptual nesting from the atomic operations and lock handling makes the flow harder to follow. The code could be significantly clearer with helper methods or clearer loop construction.
Run 3
The code has a clear basic purpose and uses proper try/finally for lock management. However, readability is significantly impacted by several issues. The one-line atomic update loops are dense, doing multiple actions per line and using complex loop constructs without braces, making them hard to parse. The inner logic of the CAS loops is not immediately intuitive, requiring mental unpacking to understand the intent (updating min/max execution times). While the lock usage is documented, the comment about 'less chances for a context switch' is vague. The method is concise, but the compactness comes at the cost of clarity and flow; line lengths are extreme and force horizontal scrolling. Structure is decent, but nesting and action granularity suffer due to the complex loop headers. Overall, the code is syntactically valid but not easily readable.
Run 1
Code Structure: Logically organized around acquiring a lock, updating statistics, and reliably releasing the lock. Nesting: Shallow, with a straightforward try/finally block. Clarity of intent: Method documentation and descriptive field names explain the purpose, but empty-body compare-and-set loops and awkward lock commentary require extra interpretation. Code length: Concise overall, although the long loop headers sacrifice readability for compactness. Action granularity: Most updates occupy separate lines, but each loop header combines initialization, comparison, atomic update, and retry logic. Reading flow: The lock/update/unlock sequence is natural; however, trailing-semicolon loops interrupt that flow and can easily be mistaken for accidental empty statements.
Run 2
Code Structure: Statistics updates are logically grouped within a clear lock/try/finally pattern. Nesting: Shallow nesting makes the method easy to follow. Clarity of intent: Descriptive counter names and documentation explain the purpose, but the empty-body compare-and-set loops require careful interpretation, and the locking comment is awkwardly phrased. Code length: The method is concise, though compressing each retry loop onto one line sacrifices readability. Action granularity: Most updates occupy separate lines, but the loop headers combine initialization, comparison, atomic update, and refresh. Reading flow: Lock acquisition, updates, and guaranteed unlocking form a natural sequence; however, dense loop conditions and trailing semicolons interrupt that flow.
Run 3
Code Structure: The method logically groups locking, statistics updates, and guaranteed unlocking. Nesting: Shallow try/finally nesting is easy to follow. Clarity of intent: Descriptive field names and documentation clarify the purpose, but empty-body compare-and-set loops and awkward concurrency comments require careful interpretation. Code length: Compact overall, though the two long loop statements sacrifice readability for brevity. Action granularity: Counter updates each occupy a separate line, but each loop combines initialization, comparison, atomic mutation, and retry refresh in one statement. Reading flow: The lock-update-unlock sequence is natural; however, trailing semicolons make the retry loops easy to misread, and the context-switch comment does not clearly explain their implementation.