Sample

Buse/59

Human rating uses the original dataset scale.

DatasetBuse
Human3.83
Lines7

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett0.4330–1; higher is more readable
60.6Δ 15.2
Scalabrino0.650–1; higher is more readable
37.9Δ 37.9
Dorn0.6140–1; higher is more readable
51.5Δ 24.2
Mi0.6920–1; higher is more readable
81.8Δ 6.1
LLOC4Logical lines; fewer is more readable
59.6Δ 16.2
DeepSeek V4 Pro16.670–20; mean of three runs
81.8Δ 6.1
GPT-6.1 Sol17.330–20; mean of three runs
71.7Δ 4.0
BTTF0.4890–1; higher is more readable
45.5Δ 30.3
Human3.831–5; original rating
75.8

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.4.782−7.174
Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones.144.43−4.766
Source linesThe number of non-empty source lines.7+2.8

Intercept 8.87 + feature contributions = -0.27 (log-odds).
Score = sigmoid(-0.27) = 0.433.

Score0.65

Feature contributions

FeatureValueContribution
(log-odds)
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.5+0.859
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.0−0.804
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.69+0.743
Indentation frequencyHow rapidly indentation changes from line to line.5−0.564
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.6.857−0.314
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.089+0.076

Intercept 0.07 + feature contributions = 0.463 (log-odds).
Score = sigmoid(0.463) = 0.614.

Score0.692
Score4
Run 1

The code demonstrates good structure with a single-purpose method that is easy to follow. Nesting is flat with no conditional blocks or loops, contributing to clarity. The intent is clear: retrieve a read-only attribute, convert it to boolean, and return it. The method is concise at 3 functional lines plus method signature and braces. Action granularity is appropriate—each line performs one logical operation sequentially. Reading flow is natural: get attribute, extract boolean value, return result. Minor deductions: the method name slightly conflicts with its side effect of setting an instance variable 'isReadOnly', and the attribute name read directly as text ("INFO_CONNECTION_READONLY") is awkward. Additionally, storing the result in an instance variable before returning it suggests possible state management issues. Overall, very readable with only minor improvements possible.

Run 2

The method is concise and straightforward: it retrieves a connection attribute, casts it to Boolean, extracts the primitive value, stores it in a field, and returns it. Each line performs a single logical action, and the flow is natural—fetch, convert, assign, return. Nesting is flat, and the intent is clear. Minor readability improvements could include removing the redundant instance field assignment (returning the value directly) or adding a null check for 'info', as a null would cause a NullPointerException rather than a clear HsqlException. Overall, the code is easy to follow and well-structured.

Run 3

The method is well-structured and easy to read. It has a clear purpose: retrieve a connection read-only attribute, cast it, store it, and return it. The code is flat with no nesting, and each statement performs a single action, aligning with the action granularity criterion. The method length is concise—only three statements plus a return. However, there is a minor redundancy: the method both assigns to a field `isReadOnly` and returns the same value, which slightly obscures whether the field assignment is a side effect or necessary caching. Variable naming is clear, and the intent is unambiguous. The exception declaration is appropriate for the context. Overall, the code is highly readable, with only a small structural ambiguity regarding the field assignment.

Run 1

Code Structure: The method follows a simple, logical sequence, though the missing closing brace makes the snippet incomplete. Nesting: There is no nested control flow. Clarity of intent: The method name and attribute constant clearly communicate that it retrieves the connection's read-only status; assigning that status to a field adds a less obvious side effect. Code length: The code is concise, although the temporary Object variable and explicit Boolean conversion add some verbosity. Action granularity: Each statement performs one primary action. Reading flow: Retrieval, conversion and assignment, then return form a natural progression; the extra blank lines are slightly excessive for such a short method.

Run 2

Code Structure: The method follows a simple, logical sequence, but the shown snippet lacks a closing brace. Nesting: No nested control flow makes it easy to scan. Clarity of intent: The method name and attribute constant clearly indicate a read-only status check, though updating a field within a query method introduces a less obvious side effect. Code length: Short and focused, with slightly excessive blank spacing. Action granularity: Retrieval, conversion/assignment, and return are separated into individual statements. Reading flow: Execution proceeds naturally from fetching the attribute to converting and returning its value.

Run 3

Code Structure: Logically organized into attribute retrieval, conversion, and return, though the closing brace is missing. Nesting: Flat, with no nested control flow. Clarity of intent: The method name and attribute constant clearly indicate a read-only status query; the generic variable name 'info' and implicit field update slightly reduce clarity. Code length: Short and appropriately concise. Action granularity: Each statement performs one distinct step. Reading flow: Natural top-to-bottom progression, with whitespace separating the steps.