Sample
JetBrains/b59
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 46.6Δ 4.2 |
| Scalabrino | 0.745 | 0–1; higher is more readable | 60.2Δ 17.8 |
| Dorn | 0.589 | 0–1; higher is more readable | 66.9Δ 24.6 |
| Mi | 0.51 | 0–1; higher is more readable | 55.9Δ 13.6 |
| LLOC | 17 | Logical lines; fewer is more readable | 34.3Δ 8.1 |
| DeepSeek V4 Pro | 13.33 | 0–20; mean of three runs | 28.0Δ 14.4 |
| GPT-6.1 Sol | 17 | 0–20; mean of three runs | 46.2Δ 3.8 |
| BTTF | 0.35 | 0–1; higher is more readable | 20.3Δ 22.0 |
| Human | 0.7 | 0–1; original rating | 42.4 |
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. | 798.063 | −26.336 |
| Source linesThe number of non-empty source lines. | 24 | +9.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.304 | −4.956 |
Intercept 8.87 + feature contributions = -12.822 (log-odds).
Score = sigmoid(-12.822) = 0.
| Score | 0.745 |
|---|
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. | 56.917 | +1.254 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 0 | −0.804 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.123 | −0.254 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 23 | +0.222 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 24 | −0.13 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 24 | +0.093 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 22.897 | −0.09 |
Intercept 0.07 + feature contributions = 0.362 (log-odds).
Score = sigmoid(0.362) = 0.589.
| Score | 0.51 |
|---|
| Score | 17 |
|---|
Run 1
The code is logically structured and readable in a general sense, but lacks clarity of intent and uses an inner loop with a boolean flag to emulate a 'find last occurrence' operation. The nested loops add complexity, and the purpose of the index calculation `i - j - 1` is not immediately obvious. Variable names are not descriptive (e.g., `i`, `j`, `sequence` is acceptable but generic). The action granularity is mostly one action per line, which helps, but the reading flow is interrupted by the `isNew` flag pattern. Overall, it is moderately readable but could be improved with a helper method or comment clarifying the Van Eck rule and better variable naming.
Run 2
The code is generally well-structured and readable. It uses clear variable names, simple loops, and one main action per line. The logic for generating the Van Eck sequence is understandable, though the inner loop's purpose could be more explicit. The use of a boolean flag (`isNew`) helps clarify intent. However, the code lacks comments explaining the sequence's rule, and the hard-coded array size (1000) and magic number for backtracking (`i - j - 1`) reduce clarity. Nesting is only two levels deep, which is acceptable. Overall, the structure is logical and the flow is natural, but a few comments and named constants would improve readability.
Run 3
The code is relatively readable due to its simple structure, consistent indentation, and clear use of loops. However, intent is not obvious without domain knowledge: the variable names are too generic (`i`, `j`, `isNew`) and do not explain the Van Eck sequence logic. The inner search loop and the conditional flag create moderate nesting, making the flow slightly harder to follow. Action granularity is good—most lines perform one action. Code length is appropriate for the task. Overall, it is understandable but not highly self-documenting.
Run 1
Code Structure: Clearly separates initialization, sequence generation, and output. Nesting: The generation uses two nested loops and a conditional, but the depth is manageable and the break limits complexity. Clarity of intent: The class and sequence variable identify the purpose; however, the backward search and distance calculation would benefit from a brief explanation. Code length: Concise, with little unnecessary code, though repeated 1000 literals could be replaced by sequence.length or a named constant. Action granularity: Each statement performs one action, making updates easy to follow. Reading flow: Execution proceeds naturally from setup through computation to printing, with consistent formatting and useful whitespace.
Run 2
Code Structure: Initialization, sequence generation, and output are logically separated. Nesting: The nested search loop and conditional add moderate depth, but remain easy to follow. Clarity of intent: The class and variable names convey the purpose, though the backward search and distance calculation would benefit from a brief explanation. Code length: Compact and appropriate, with minor repetition of the constant 1000. Action granularity: Each statement performs a single action, making updates and control flow clear. Reading flow: Execution proceeds naturally from setup to computation to printing; the isNew flag and break make the search outcome understandable.
Run 3
Code Structure: Initialization, sequence generation, and output are logically separated. Nesting: The nested search loop and conditional introduce moderate depth, but remain easy to follow. Clarity of intent: The class name and sequence variable establish the purpose; however, the backward search and distance calculation would benefit from a brief explanation of the Van Eck rule. Code length: Compact and appropriately sized, though repeated use of 1000 could be replaced with a named constant or sequence.length. Action granularity: Each statement performs a single clear action. Reading flow: Execution proceeds naturally from setup to generation to printing, with useful whitespace. Overall, readable code with minor opportunities to clarify the algorithm and eliminate magic numbers.