Sample
JetBrains/i57
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 33.1Δ 24.6 |
| Scalabrino | 0.831 | 0–1; higher is more readable | 80.5Δ 72.0 |
| Dorn | 0.547 | 0–1; higher is more readable | 57.6Δ 49.2 |
| Mi | 0.412 | 0–1; higher is more readable | 38.1Δ 29.7 |
| LLOC | 17 | Logical lines; fewer is more readable | 34.3Δ 25.8 |
| DeepSeek V4 Pro | 7 | 0–20; mean of three runs | 3.4Δ 5.1 |
| GPT-6.1 Sol | 12.67 | 0–20; mean of three runs | 5.1Δ 3.4 |
| BTTF | 0.378 | 0–1; higher is more readable | 25.4Δ 16.9 |
| Human | 0.41 | 0–1; original rating | 8.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. | 900.806 | −29.727 |
| Source linesThe number of non-empty source lines. | 25 | +10 |
| 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.363 | −5.044 |
Intercept 8.87 + feature contributions = -15.9 (log-odds).
Score = sigmoid(-15.9) = 0.
| Score | 0.831 |
|---|
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. | 67 | +0.827 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 1 | −0.703 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 67 | +0.277 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.125 | −0.271 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 25 | +0.151 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 22 | −0.084 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 23.75 | −0.078 |
Intercept 0.07 + feature contributions = 0.19 (log-odds).
Score = sigmoid(0.19) = 0.547.
| Score | 0.412 |
|---|
| Score | 17 |
|---|
Run 1
The code has a simple overall structure with separate initialization, sieving, and printing phases, but the sieving logic is unclear and contains a bug: every iteration shifts the array left, but the index is never reset before reuse, and the sieve condition does not actually test divisibility by the lucky number. Loop variables are reused in confusing ways, and the meaning of 'k', 'j', and 'index' is not self-evident. The code is compact and not deeply nested, but multiple actions are packed into single lines, and the reading flow is disrupted by the incorrect sieve implementation and lack of defensive code or comments. Variable names like 'a' are too generic, and the stated goal (printing first 1000 terms) is not matched by the algorithm's logic. Overall, the code is moderately readable at a syntactic level, but semantically opaque.
Run 2
The code structure is mostly linear and straightforward, but it has several readability issues. The variable names 'a', 'k', 'i', 'j' are not descriptive, and the logic of the sieve process is unclear without domain knowledge of lucky numbers. The nested loops create some depth, though not extreme. The biggest problem is clarity of intent: the algorithm's purpose and mechanics are obscure, with no method extraction or comments explaining the sieve step. The array sizing and loop bounds use magic numbers (1000, 2) without explanation. Action granularity is mostly one action per line, but some lines combine multiple operations (e.g., 'a[index++] = a[i]'). Reading flow is hindered because the sieve operation is not intuitively obvious. The initialization comment is helpful, but the overall code lacks segmentation into meaningful methods or variables that express what is happening.
Run 3
The code has a clear three-step structure (initialize, sieve, print) but lacks explanatory comments or method decomposition. The main method is overloaded with logic, making intent ambiguous. The first loop is readable, but the sieve loop is confusing: variables like k, index, i, and j have unclear roles, and the array size is hard-coded. The sieve appears to repeatedly compact the array, but the interaction between k and the loop bounds is non-obvious. Nesting is moderate (two levels), but the logic inside is dense—multiple actions occur per line with complex conditions. Reading flow suffers from single-letter variables and magic numbers. Concise but not self-documenting; the algorithm’s purpose (lucky numbers) is not evident without external context. Overall, the code works but requires significant mental effort to understand.
Run 1
Code Structure: Initialization, sieving, and output are logically ordered and separated by comments, but all logic resides in main. Nesting: The sieve has moderately nested loops and an if/else, making it harder to follow than the other sections. Clarity of intent: The class name and comments convey the overall purpose, but terse names such as a, j, and k obscure algorithmic roles; the unchanged array length after compaction also makes the intended sieve behavior unclear. Code length: The implementation is concise without excessive boilerplate. Action granularity: Most lines contain one action, although loop headers combine variable updates and a[index++] combines assignment with index advancement. Reading flow: The three phases read naturally, but magic constants and unexplained counter/reset behavior require careful tracing.
Run 2
Code Structure: Clearly separates initialization, sieving, and output, but keeps everything in main rather than named methods. Nesting: Moderate loop-and-conditional nesting is manageable. Clarity of intent: The class name and comments communicate the broad goal, but terse variables, the fixed sieve bound, and in-place array updates obscure the algorithm. The code does not track the active array length after filtering, making the claimed output harder to understand or trust. Code length: Compact, with little unnecessary code. Action granularity: Most lines perform one action, although loop headers update multiple variables and a[index++] combines assignment with incrementing. Reading flow: Proceeds naturally from setup to processing to printing, but understanding the sieve requires careful tracing.
Run 3
Code Structure: Initialization, sieving, and output are logically ordered and separated by comments, but all logic resides in main. Nesting: The sieve uses a nested loop with an if/else, creating moderate depth. Clarity of intent: The class name and comments convey the overall goal, but terse variables (a, k, i, j) obscure the sieve mechanics; the unchanged array length also makes the intended handling of removed elements unclear. Code length: Compact without substantial repetition, though named helpers could improve comprehension. Action granularity: Most statements perform one action, but loop headers combine variable initialization and updates, and a[index++] combines assignment with an increment. Reading flow: Formatting and sequential phases are easy to follow, but understanding the filtering logic requires careful tracking of counters and array mutation.