Sample
JetBrains/i54
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 65.3Δ 17.8 |
| Scalabrino | 0.448 | 0–1; higher is more readable | 28.8Δ 18.6 |
| Dorn | 0.683 | 0–1; higher is more readable | 81.4Δ 33.9 |
| Mi | 0.509 | 0–1; higher is more readable | 55.1Δ 7.6 |
| LLOC | 13 | Logical lines; fewer is more readable | 52.1Δ 4.7 |
| DeepSeek V4 Pro | 13 | 0–20; mean of three runs | 23.3Δ 24.2 |
| GPT-6.1 Sol | 16 | 0–20; mean of three runs | 26.7Δ 20.8 |
| BTTF | 0.363 | 0–1; higher is more readable | 22.0Δ 25.4 |
| Human | 0.72 | 0–1; original rating | 47.5 |
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. | 574.768 | −18.967 |
| Source linesThe number of non-empty source lines. | 19 | +7.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. | 3.772 | −5.658 |
Intercept 8.87 + feature contributions = -8.155 (log-odds).
Score = sigmoid(-8.155) = 0.
| Score | 0.448 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 88.947 | +0.631 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 10 | −0.391 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 19 | +0.364 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 10 | +0.191 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.08 | +0.167 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 17.789 | −0.161 |
| 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. | 88.947 | −0.102 |
Intercept 0.07 + feature contributions = 0.768 (log-odds).
Score = sigmoid(0.768) = 0.683.
| Score | 0.509 |
|---|
| Score | 13 |
|---|
Run 1
The code has a clear overall structure and its intent is partially communicated through comments, but several issues limit readability. There are multiple actions per line, particularly in the loop, with print, count, and index updates mixed together. The Kolakoski sequence generation logic is fundamentally flawed as it prints the first 1000 elements instead of generating them, suggesting misleading intent. Nesting is relatively flat with only one if statement, which helps, but the comment placement interrupts natural reading flow. Variable names are descriptive but the algorithm logic is unclear because the sequence should be generated dynamically rather than hardcoded. Code length is concise, but this conciseness comes at the cost of clarity — the relationship between index, count, and sequence generation isn't obvious. The loop condition and update logic require careful mental tracking. Overall, readable enough to understand basic structure, but the algorithm implementation needs better organization and more meaningful comments to explain the sequence generation logic.
Run 2
The code is mostly readable due to its simple structure, comments, and mostly flat nesting. Each action is on its own line, and the intent is clear: generate a Kolakoski-like sequence by cycling through an array based on run counts. However, several issues reduce clarity. The loop condition is misleading—it states 'print first 1000 elements', but the actual behavior depends on the cyclic count logic, producing exactly 1000 outputs without bounds-checking index. The variable names are generic ('index', 'count'), and comments sometimes state the obvious rather than explaining non-obvious logic. The algorithm itself is unclear from the code without external context. Overall, it is approachable but not highly clear.
Run 3
The code is fairly short and simple, with mostly clear variable names and comments explaining each step. However, it contains bugs that reduce clarity: it never actually generates the Kolakoski sequence beyond the initial three elements, and the loop just cycles through the fixed array {1, 2, 2} repeatedly. This makes the intent misleading. Structure is logical but flat, and nesting is minimal. Action granularity is good, with one main action per line. Reading flow is natural due to comments, but the comments sometimes state the obvious. Overall, the code is readable in terms of syntax and style, but the logic does not match the supposed algorithm, which lowers the score.
Run 1
Code Structure: A single method with initialization followed by one loop is logically organized. Nesting: Two nested conditionals inside the loop add modest complexity but remain easy to follow. Clarity of intent: Variable names and comments explain the mechanics, but the relationship between these mechanics and generating a Kolakoski sequence is unclear; the fixed array and index reset suggest repetition rather than sequence generation. Code length: Compact, though several comments merely restate the code. Action granularity: Each statement performs one action, making state changes easy to track. Reading flow: Initialization, boundary handling, printing, and decrementing follow a natural order, although tracking both index and count requires some mental effort.
Run 2
Code Structure: Initialization and iteration are logically organized within a short main method. Nesting: Two nested conditionals inside the loop are manageable, though index wrapping could be simpler. Clarity of intent: Variable names and comments explain the local operations, but the class name suggests generating a Kolakoski sequence while the implementation cycles through a fixed array, making the overall purpose misleading. Code length: Concise, although several comments merely repeat the code. Action granularity: Each statement performs one clear action. Reading flow: The progression from checking the count to updating the index, printing, and decrementing is easy to follow.
Run 3
Code Structure: Initialization and iteration are logically organized within a small main method. Nesting: A loop containing two nested conditionals is manageable, though the index-reset logic slightly interrupts the flow. Clarity of intent: Variable names and comments explain the local operations, but the class name suggests generating a Kolakoski sequence while the code merely cycles through a fixed array, making the broader purpose misleading. Code length: The implementation is concise, although several comments restate obvious operations. Action granularity: Each statement performs one action, making state changes easy to track. Reading flow: Execution proceeds naturally from initialization to index adjustment, printing, and decrementing; however, understanding how index and count interact requires some attention.