Sample
JetBrains/i59
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 44.1Δ 25.8 |
| Scalabrino | 0.508 | 0–1; higher is more readable | 33.1Δ 14.8 |
| Dorn | 0.789 | 0–1; higher is more readable | 97.5Δ 79.2 |
| Mi | 0.648 | 0–1; higher is more readable | 86.4Δ 68.2 |
| LLOC | 16 | Logical lines; fewer is more readable | 38.6Δ 20.3 |
| DeepSeek V4 Pro | 15 | 0–20; mean of three runs | 43.6Δ 25.4 |
| GPT-6.1 Sol | 17 | 0–20; mean of three runs | 46.2Δ 28.0 |
| BTTF | 0.41 | 0–1; higher is more readable | 28.8Δ 10.6 |
| Human | 0.5 | 0–1; original rating | 18.2 |
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. | 787.278 | −25.98 |
| Source linesThe number of non-empty source lines. | 22 | +8.8 |
| 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.249 | −4.874 |
Intercept 8.87 + feature contributions = -13.184 (log-odds).
Score = sigmoid(-13.184) = 0.
| Score | 0.508 |
|---|
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. | 48.955 | +1.592 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 1 | +1.001 |
| 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.134 | −0.362 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 20.76 | −0.12 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 22 | −0.084 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 22 | +0.024 |
Intercept 0.07 + feature contributions = 1.317 (log-odds).
Score = sigmoid(1.317) = 0.789.
| Score | 0.648 |
|---|
| Score | 16 |
|---|
Run 1
The code is logically structured with clear variable names (seq, last, prev) and simple loops, making it easy to follow. Nesting is only two levels deep, which is acceptable. The intent is mostly clear—generate the Van Eck sequence—but the inner search loop could be more self-explanatory. Code length is concise for the task. Action granularity is mixed: variable declarations and assignments are mostly one per line, but the System.out.println inside the loop may be a side effect that reduces clarity. Reading flow is natural overall, but the search for the previous occurrence could be refactored into a separate method with a descriptive name to improve clarity of intent and structure.
Run 2
The code is concise and follows a straightforward structure, with a single class and method. The nested loops are logically organized and the use of 'break' avoids unnecessary iteration. Variables are somewhat clear, though 'prev' could be more descriptive. The logic is understandable but assumes familiarity with the Van Eck sequence; a brief comment would improve clarity. The code is flat, with only two nested loops, and each line performs a single action, aiding readability. However, the inner loop and conditional block could be extracted for improved clarity. Overall, it is readable and efficient, but could benefit from minor naming improvements and comments.
Run 3
The code is generally readable and well-structured. The class and method structure are clear, and the algorithm is implemented with straightforward logic. The nesting is shallow (2 levels), and the intent is fairly clear for someone familiar with the Van Eck sequence concept. Variable names like 'last' and 'prev' are meaningful. However, there are minor readability issues: the 'prev' variable uses -1 as a sentinel value without explanation, and the inner loop's purpose could be clarified with a comment or helper method. The code is concise but slightly terse. The action granularity is mostly one action per line, and the reading flow is natural. Overall, it's a solid implementation that would benefit from brief comments.
Run 1
Code Structure: Logically organized into initialization, sequence generation, backward search, and output. Nesting: Moderate nesting from two loops and a conditional remains easy to follow. Clarity of intent: The class name identifies the sequence, and variable names are reasonable, though the recurrence and -1 sentinel would benefit from brief explanation. Code length: Concise, with no unnecessary abstractions or repetition. Action granularity: Each statement performs a single clear action. Reading flow: Execution proceeds naturally, but missing spaces around arithmetic operators and no separation between logical stages slightly reduce readability. Printing begins at index 1, leaving the initialized first element unprinted, which makes the output intent slightly unclear.
Run 2
Code Structure: Logically organized into initialization, sequence generation, backward search, and output. Nesting: Moderate nesting from two loops and a conditional, but easy to follow. Clarity of intent: The class name identifies the sequence, and variable names are understandable, though the recurrence and -1 sentinel could benefit from explanation. Code length: Concise, with no unnecessary machinery. Action granularity: Statements generally perform one action per line. Reading flow: Natural top-to-bottom progression, although missing spaces around arithmetic operators slightly reduce readability. Printing starts at the second term while the first term is initialized silently, which leaves the intended output somewhat unclear.
Run 3
Code Structure: The sequence generation is logically organized into initialization, backward search, value calculation, and output. Nesting: The nested loop and conditional introduce moderate depth, but remain easy to follow. Clarity of intent: The class name identifies the sequence, and the algorithm is understandable, though abbreviated variable names and the unexplained -1 sentinel require some interpretation. Code length: The implementation is concise without unnecessary machinery. Action granularity: Each statement performs a single action, making execution straightforward to trace. Reading flow: Control flow is natural and sequential; consistent spacing around arithmetic operators and a brief algorithm comment would improve readability. Printing within the generation loop slightly mixes responsibilities, and omitting the initial element from output may make the intended output less clear.