Sample

Scalabrio153

Human rating uses the original dataset scale.

DatasetScalabrino
Human4.33
Lines22

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett00–1; higher is more readable
72.4Δ 15.6
Scalabrino0.6920–1; higher is more readable
69.8Δ 18.1
Dorn0.820–1; higher is more readable
94.5Δ 6.5
Mi0.6650–1; higher is more readable
88.9Δ 1.0
LLOC6Logical lines; fewer is more readable
86.9Δ 1.0
DeepSeek V4 Pro15.670–20; mean of three runs
72.9Δ 15.1
GPT-6.1 Sol160–20; mean of three runs
34.7Δ 53.3
BTTF0.5740–1; higher is more readable
65.3Δ 22.6
Human4.331–5; original rating
87.9

Views

Download official ZIP ↗

Select the downloaded ZIP or its extracted folder. Files stay in your browser.

Loading feature diagnosis…

Source regions

Feature contributions

Feature contributions

FeatureValueContribution
(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.645−21.285
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.156−4.734

Intercept 8.87 + feature contributions = -8.349 (log-odds).
Score = sigmoid(-8.349) = 0.

Score0.692

Feature contributions

FeatureValueContribution
(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.46.909+1.678
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.115−0.18
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.20.917−0.117
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.20−0.045

Intercept 0.07 + feature contributions = 1.518 (log-odds).
Score = sigmoid(1.518) = 0.82.

Score0.665
Score6
Run 1

The method is short and logically organized, with clear variable names and consistent formatting. It defines arrays of x and y coordinates representing key points around a rectangle, then delegates to a helper method. Nesting is minimal, and the intent is fairly clear—finding the closest of these points to another point. However, readability is reduced by the hardcoded array length (5) and the implicit relationship between the coordinate arrays, which requires the reader to mentally map them. The arrays are also vertically aligned but somewhat redundant, making the logic feel a bit mechanical. Overall, the code is readable but could be improved by using an array of Point objects or a named constant for the length.

Run 2

The code is generally clear and concise, with a logical structure: it defines a rectangle, constructs arrays of points approximating the rectangle's perimeter, and delegates the actual calculation. Arrays align in an obvious pattern. However, readability suffers from unexplained magic values (the repeated `r.x + r.width / 2`, `r.y + r.height / 2`, and especially the literal `5` for the array length). The formatting is slightly inconsistent, with a trailing comma in `xs` and the variable `p` introduced unnecessarily. Overall, the intent is understandable but could benefit from named constants or a clearer approach.

Run 3

The code is fairly readable: it has a clear purpose, flat nesting, and one action per line. The arrays `xs` and `ys` are logically organized, though the pattern of coordinates (center, right, center, left, center) is not immediately obvious without domain knowledge. The method is concise, and the call to `Geometry.ptClosestTo` clearly delegates the core logic. Minor issues: the extra trailing comma in `xs` is slightly unusual but not harmful, and the magic number `5` reduces clarity—it should be a named constant or derived from the array length. Overall, the structure supports easy understanding, with only small improvements needed for intent expression.

Run 1

Code Structure: Logically organized into bounds retrieval, coordinate construction, closest-point calculation, and return. Nesting: Flat, with no nested control flow. Clarity of intent: The method and helper names convey the purpose, but parallel arrays and terse names obscure the rectangle-edge representation; the repeated first point and literal 5 are unexplained. Code length: Short overall, though the temporary return variable and heavily split helper call add unnecessary lines. Action granularity: Each statement performs one clear action. Reading flow: Natural top-to-bottom progression, slightly disrupted by unusual array formatting and the need to mentally pair xs and ys.

Run 2

Code Structure: Logically organized into bounds retrieval, coordinate construction, closest-point calculation, and return. Nesting: Flat, with no branches or loops. Clarity of intent: The method and geometry helper names communicate the purpose, but paired xs/ys arrays obscure the boundary shape, and the repeated first point and literal 5 lack explanation. Code length: Short overall, though the multiline helper call and temporary return variable add unnecessary verbosity. Action granularity: Each statement performs one clear action. Reading flow: The sequence is natural, but unusual array formatting and excessive line breaks slightly interrupt scanning.

Run 3

Code Structure: Logically organized into bounds retrieval, coordinate construction, closest-point calculation, and return. Nesting: Flat, with no nested control flow. Clarity of intent: The method name and geometry call communicate the purpose, but short variable names, parallel coordinate arrays, the repeated starting point, and the literal 5 require interpretation. Code length: Reasonably concise, though the temporary result variable and heavily split function call add unnecessary lines. Action granularity: Statements each perform one clear action. Reading flow: Natural top-to-bottom progression, slightly interrupted by verbose array formatting and the need to mentally pair xs and ys.