Sample

Scalabrio195

Human rating uses the original dataset scale.

DatasetScalabrino
Human3.33
Lines34

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett00–1; higher is more readable
35.2Δ 0.3
Scalabrino0.2060–1; higher is more readable
15.6Δ 19.3
Dorn0.2580–1; higher is more readable
34.2Δ 0.8
Mi0.5880–1; higher is more readable
80.9Δ 46.0
LLOC16Logical lines; fewer is more readable
40.2Δ 5.3
DeepSeek V4 Pro15.330–20; mean of three runs
66.6Δ 31.7
GPT-6.1 Sol170–20; mean of three runs
58.5Δ 23.6
BTTF0.4890–1; higher is more readable
35.2Δ 0.3
Human3.331–5; original rating
34.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.1072.41−35.39
Source linesThe number of non-empty source lines.34+13.6
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.792−7.188

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

Score0.206

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.137−2.138
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
Indentation frequencyHow rapidly indentation changes from line to line.34+0.439
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.1+0.398
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.104−0.068
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.32.696+0.047

Intercept 0.07 + feature contributions = -1.055 (log-odds).
Score = sigmoid(-1.055) = 0.258.

Score0.588
Score16
Run 1

The code is well-structured and readable. It has a clear linear flow: collect existing values, check for defined schema/catalog, and conditionally add defaults. Nesting is minimal, with no deep indentation. Clarity of intent is strong, as variable names clearly convey purpose (e.g., schemaDefined, catalogDefined). Code length is appropriate—it avoids unnecessary verbosity. Action granularity is mostly good, with one logical action per line, though the AnnotationValue.createStringValue call spans multiple lines (which is acceptable for readability). Reading flow is natural and easy to follow. Improvements could include extracting duplicate 'annotationInstance.value(x) != null' checks into a helper, but overall this is highly readable.

Run 2

The code is generally well-structured with clear intent and reasonable modularity, but its readability is slightly reduced by verbose handling of flags and conditional checks. The nesting is flat, and each major action is separated logically, which is good. However, the use of two boolean flags for schema/catalog detection adds unnecessary lines and could be simplified by using direct checks. The helper method names and formatting are clear, but the construction of the annotation instance list is somewhat verbose. Overall, the method is easy to follow but not maximally concise.

Run 3

The code is generally readable with clear intent and logical structure. It follows a straightforward flow: collect values, check for schema/catalog, apply defaults if needed, return the result. Nesting is minimal, and each action is mostly on its own line, maintaining good granularity. However, some areas could be improved: the initial checks for 'schema' and 'catalog' are repetitive and could be simplified using a helper method or direct boolean assignment. The repeated string literals ('schema', 'catalog') introduce slight ambiguity and potential for typos if reused. Additionally, the method name is long but descriptive. Overall, the code is maintainable and easy to follow, though minor refactoring would enhance clarity.

Run 1

Code Structure: Logically organized into checking existing values, applying defaults, and rebuilding the annotation, though copying values before the early return is unnecessary. Nesting: Shallow conditionals and an early return keep complexity low. Clarity of intent: Descriptive names make the purpose clear, although 'override' is slightly misleading because existing values are preserved. Code length: Reasonably concise, but boolean flags could be initialized directly from the null checks, and the list could be constructed from existing values. Action granularity: Each statement performs a single clear action. Reading flow: Sequential and easy to follow; repetitive schema/catalog checks and heavily wrapped method calls slightly interrupt the flow.

Run 2

Code Structure: Logically organized into copying values, checking existing settings, applying defaults, and returning the result. Nesting: Shallow conditionals and an early return keep control flow simple. Clarity of intent: Descriptive identifiers make the purpose clear, though the method name could better convey that defaults fill missing values rather than override existing ones. Code length: Slightly verbose; boolean flags could be initialized directly from null checks, and the list could be constructed from existing values. Action granularity: Each statement performs one clear action. Reading flow: Sequential and easy to follow, although heavily split method calls interrupt the flow slightly, and copying the list before the early return adds unnecessary work.

Run 3

Code Structure: Logically organized into copying values, checking existing settings, applying defaults, and constructing the result. Nesting: Shallow conditionals and an early return keep control flow simple. Clarity of intent: Descriptive names make the purpose clear, although 'override' is slightly misleading because existing values are preserved. Code length: Some unnecessary verbosity comes from initializing boolean flags and then setting them in separate conditionals; direct boolean expressions would be clearer. The list could also be initialized directly from existing values. Action granularity: Each statement performs one clear action. Reading flow: The catalog and schema checks follow a predictable, parallel pattern, though heavily split method calls slightly interrupt scanning. Overall, readable and straightforward with minor opportunities for simplification.