Sample

Buse/49

Human rating uses the original dataset scale.

DatasetBuse
Human4.05
Lines10

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett0.9450–1; higher is more readable
93.9Δ 3.5
Scalabrino0.7720–1; higher is more readable
51.5Δ 38.9
Dorn0.6380–1; higher is more readable
56.6Δ 33.8
Mi0.6530–1; higher is more readable
66.7Δ 23.7
LLOC4Logical lines; fewer is more readable
59.6Δ 30.8
DeepSeek V4 Pro170–20; mean of three runs
87.4Δ 3.0
GPT-6.1 Sol12.330–20; mean of three runs
14.1Δ 76.3
BTTF0.6120–1; higher is more readable
76.8Δ 13.6
Human4.051–5; original rating
90.4

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)
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.97−5.955
Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones.123.19−4.065
Source linesThe number of non-empty source lines.10+4

Intercept 8.87 + feature contributions = 2.849 (log-odds).
Score = sigmoid(2.849) = 0.945.

Score0.772

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.66.727+0.839
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.0−0.804
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.10+0.682
Indentation frequencyHow rapidly indentation changes from line to line.9−0.426
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.1+0.398
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.9.941−0.271
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.089+0.078

Intercept 0.07 + feature contributions = 0.566 (log-odds).
Score = sigmoid(0.566) = 0.638.

Score0.653
Score4
Run 1

The code is well-structured with clear intent. It uses an early return guard clause to handle the already-closed state, avoiding unnecessary nesting. The single assignment `isClosed = true;` is concise and follows one action per line. The try block begins logically before potential exception-prone operations. The code is flat, readable, and the flow is natural: check state, set state, perform cleanup. Minor deductions for the incomplete snippet and lack of surrounding context (e.g., exception handling or resource cleanup details), but the visible portion is highly readable.

Run 2

The code is generally clear and readable. It uses flat nesting with a single early return, which is good. Each statement performs one logical action, and the intent is evident: close a resource if not already closed. The structure is logical, with a guard clause followed by state update and a try block. However, the snippet is incomplete, which slightly lowers confidence in overall flow and structure. The method is concise and avoids unnecessary complexity.

Run 3

The code is highly readable with clear structure and intent. It begins with an early return guard clause, avoiding unnecessary nesting and signaling a flat, logical flow. The state check and assignment are distinct, one-action-per-line steps. Naming is descriptive and intent is unambiguous: set result type before closing. The use of a try block suggests careful resource management. Overall, the code is concise, well-organized, and easy to follow.

Run 1

Code Structure: The visible statements are logically ordered, but the snippet ends inside an unclosed try block, leaving the method structurally incomplete. Nesting: Shallow nesting and an early return keep the visible control flow simple. Clarity of intent: The close method name and isClosed guard clearly indicate an idempotent closing operation, though the result update and remaining cleanup are not fully explained. Code length: The visible code is concise without unnecessary statements. Action granularity: Each statement performs one action. Reading flow: Spacing and indentation support a natural progression from checking state to marking closure and setting the disconnect result, but the abrupt ending prevents understanding the complete behavior and exception handling.

Run 2

Code Structure: The visible sequence is logical, with an early exit, state update, and result configuration, but the incomplete try block and missing closing braces limit readability. Nesting: Shallow nesting and a guard clause keep the flow simple. Clarity of intent: The close method and isClosed flag clearly suggest preventing repeated closure, though the remaining cleanup and exception handling are absent. Code length: The snippet is concise, with modest whitespace separating steps. Action granularity: Each statement performs one action. Reading flow: The visible flow is natural, but it ends abruptly before the operation is completed.

Run 3

Code Structure: The visible portion is logically organized, with an early return, state update, and disconnect setup, but the incomplete try block prevents evaluating the full structure. Nesting: Shallow nesting and the guard clause make the flow easy to follow. Clarity of intent: The close method, isClosed flag, and SQLDISCONNECT constant clearly suggest an idempotent disconnect operation. Code length: The snippet is concise, with no unnecessary statements. Action granularity: Each statement performs one action on its own line. Reading flow: Execution proceeds naturally from checking state to marking closure and configuring the result, but the abrupt ending and missing closing braces disrupt readability.