Sample
JetBrains/e60
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 9.3Δ 5.1 |
| Scalabrino | 0.65 | 0–1; higher is more readable | 49.2Δ 44.9 |
| Dorn | 0.536 | 0–1; higher is more readable | 54.2Δ 50.0 |
| Mi | 0.589 | 0–1; higher is more readable | 71.2Δ 66.9 |
| LLOC | 21 | Logical lines; fewer is more readable | 19.5Δ 15.3 |
| DeepSeek V4 Pro | 7.67 | 0–20; mean of three runs | 5.9Δ 1.7 |
| GPT-6.1 Sol | 12.67 | 0–20; mean of three runs | 5.1Δ 0.8 |
| BTTF | 0.376 | 0–1; higher is more readable | 24.6Δ 20.3 |
| Human | 0.35 | 0–1; original rating | 4.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. | 1440.796 | −47.546 |
| Source linesThe number of non-empty source lines. | 32 | +12.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.695 | −5.543 |
Intercept 8.87 + feature contributions = -31.419 (log-odds).
Score = sigmoid(-31.419) = 0.
| Score | 0.65 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 85 | +0.567 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.149 | −0.507 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 29 | +0.266 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 29 | −0.245 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 32 | −0.097 |
| 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. | 84.875 | +0.07 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 30.721 | +0.02 |
Intercept 0.07 + feature contributions = 0.145 (log-odds).
Score = sigmoid(0.145) = 0.536.
| Score | 0.589 |
|---|
| Score | 21 |
|---|
Run 1
The code has a clear overall structure with a main method and a helper for counting neighbors, but it has several readability issues. The neighbor-counting logic uses nested loops and multiple boundary conditions on a single line, making it dense and harder to parse. The Game of Life rules are expressed with a compound boolean condition that lacks parentheses, increasing ambiguity and potential for logical errors. The assignment statements use '==' instead of '=', so the logic would not even update the grid correctly. The initialization and printing are missing, so the example is incomplete. Lines perform multiple operations, and the nesting depth (four levels in the counting method) exceeds comfortable readability. While the general intent is recognizable, the implementation is error-prone and not maintainable without clearer separation and simplification.
Run 2
The code has a clear structure with separate methods for main logic and neighbor counting, but it contains significant correctness and readability issues. The boolean logic in the survival/death rules lacks parentheses, making operator precedence ambiguous and error-prone. Critical bugs exist: using '==' instead of '=' for assignment and mutating the grid in-place while counting neighbors, which corrupts the simulation. The grid initialization and printing are omitted. Loops are reasonably flat but lack comments explaining the Game of Life rules. Magic numbers (32) are scattered throughout instead of named constants. Variable names are generally clear, but the mixed indentation and missing braces on single-line if statements reduce readability. Overall, the intent is understandable for experienced developers, but the code would not compile correctly and obscures key game logic.
Run 3
The code has a clear structure with separate methods for main logic and neighbor counting, but several issues harm readability. The Game of Life update logic incorrectly uses '==' for assignment in both branches, making the code non-functional and ambiguous in intent. Boolean conditions lack parentheses, leading to potential operator precedence confusion (&& vs ||). The grid size is hardcoded multiple times instead of using constants or the array's length. Nesting is moderate but acceptable. There is no separation between current and next generation states, making the simulation logically flawed and hard to follow. Action granularity is reasonable, with one action per line in most cases, but the main loop mixes boundary checking and state transitions. Overall, the structure shows potential, but logical errors, missing constants, and unclear state management significantly reduce readability.
Run 1
1. Code Structure: Main simulation and neighbor counting are sensibly separated, but initialization and printing are only placeholders. 2. Nesting: Main has moderate nesting; neighbor counting reaches four levels and could combine its conditions. 3. Clarity of intent: Descriptive names convey Game of Life, but mixed &&/|| without parentheses obscures the rule. The attempted updates use invalid == statements instead of assignment, and in-place updates obscure simultaneous-generation behavior. 4. Code length: Compact overall, though repeated hard-coded dimensions reduce maintainability. 5. Action granularity: Mostly one action per line, with conventional loop headers. 6. Reading flow: The sequence is natural, but cramped operator spacing and dense boundary checks slow reading.
Run 2
Code Structure: The main update loop and separate neighbor-counting helper provide logical organization. Nesting: Double loops plus nested conditionals, especially in the helper, moderately hinder scanning. Clarity of intent: Names and cell symbols communicate Game of Life, but missing initialization/output, invalid use of == instead of assignment, and an unparenthesized mixed &&/|| condition obscure the intended behavior. In-place updates also blur simultaneous generation semantics. Code length: Compact overall, though repeated hard-coded dimensions and boundary checks could be simplified. Action granularity: Most lines perform one action; loop headers conventionally combine control operations. Reading flow: Execution proceeds naturally from grid creation to updates and neighbor counting, but dense operator spacing and the long boundary condition reduce readability.
Run 3
Code Structure: The main method and separate neighbor-counting helper provide logical organization. Nesting: Nested loops are natural for grid traversal, but the helper reaches four levels of nesting and could flatten its conditions. Clarity of intent: GameOfLife and countLiveNeighbors clearly communicate purpose, but hard-coded dimensions, placeholder comments, and an unparenthesized mixed boolean condition weaken clarity. The use of == instead of assignment in update statements makes the code invalid, and in-place updates obscure the intended simultaneous generation transition. Code length: The snippet is concise without substantial repetition beyond fixed dimensions. Action granularity: Statements generally perform one action per line. Reading flow: Traversal, neighbor counting, and rule application follow a natural sequence, though cramped operator spacing and incomplete initialization/output interrupt readability.