Sample

Scalabrio18

Human rating uses the original dataset scale.

DatasetScalabrino
Human4
Lines28

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett00–1; higher is more readable
9.0Δ 64.3
Scalabrino0.6890–1; higher is more readable
69.3Δ 4.0
Dorn0.4640–1; higher is more readable
52.3Δ 21.1
Mi0.090–1; higher is more readable
33.2Δ 40.2
LLOC22Logical lines; fewer is more readable
19.3Δ 54.0
DeepSeek V4 Pro17.670–20; mean of three runs
96.0Δ 22.6
GPT-6.1 Sol17.330–20; mean of three runs
71.9Δ 1.5
BTTF0.5410–1; higher is more readable
53.3Δ 20.1
Human41–5; original rating
73.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)
Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones.1670.586−55.129
Source linesThe number of non-empty source lines.28+11.2
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.949−7.423

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

Score0.689

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.109.929−0.991
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.110+0.97
Indentation frequencyHow rapidly indentation changes from line to line.1−0.703
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.087+0.099
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.28+0.045
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.26.838−0.035

Intercept 0.07 + feature contributions = -0.146 (log-odds).
Score = sigmoid(-0.146) = 0.464.

Score0.09
Score22
Run 1

The code is highly readable. It has a clear, single-purpose constructor that registers SQL functions in a PostgreSQL dialect. The structure is flat—no nesting—and each line performs exactly one action, aligning with action granularity best practices. The sequence of registerFunction calls follows a logical grouping by function type/name, and the formatting is consistent with aligned arguments. Clarity of intent is strong: the method's purpose is obvious from the context and comment. The only minor drawbacks are slight repetition and lack of explanatory comments for non-obvious mappings (e.g., 'substring' to 'substr'), but these do not significantly hinder understanding.

Run 2

The code is highly readable due to its clear structure, flat hierarchy, and consistent formatting. Each line performs one action (registering a SQL function), which supports easy scanning. The intent is obvious: it defines custom SQL functions for a PostgresPlus dialect. The naming is clear and parameters are straightforward. Slight repetition is acceptable here because it follows a standard pattern and improves clarity. Deductions are for minor redundancy and lack of grouping or comments explaining the purpose of certain functions, but overall it is very readable.

Run 3

The constructor is well-structured with a single, clear purpose: registering SQL functions for the dialect. Each function registration is on its own line, making scanning easy and changes localized. There is no nesting beyond the method itself. Naming is consistent and self-documenting, and the flat, repetitive pattern is appropriate for configuration-style code. The only minor detraction is the slight duplication in StandardSQLFunction registrations, but this does not meaningfully harm readability.

Run 1

Code Structure: A single constructor logically contains dialect function registrations, though grouping related functions would improve organization. Nesting: Flat, with no nested control flow. Clarity of intent: Descriptive API and type names clearly communicate registration behavior; alias mappings and boolean arguments are less self-explanatory. Code length: Reasonable for the number of registrations, although repetitive. Action granularity: Each line performs one registration, making individual entries easy to inspect. Reading flow: Consistent formatting and a straightforward sequence support easy scanning, but the mixed ordering of string, numeric, and date functions slightly weakens the flow.

Run 2

Code Structure: A single constructor logically centralizes SQL function registration, though grouping registrations by category would improve organization. Nesting: Flat statements with no nested control flow make scanning easy. Clarity of intent: Descriptive API names and explicit function names and return types clearly convey the purpose; special mappings such as substring to substr could benefit from brief explanations. Code length: Reasonable for the number of registrations, although repetitive. Action granularity: Each line performs one registration, maintaining consistent granularity. Reading flow: Uniform formatting and repeated patterns support natural reading, but the ordering lacks an obvious alphabetical or categorical scheme.

Run 3

Code Structure: The constructor logically centralizes function registration, though grouping registrations by function category would improve organization. Nesting: The code is flat, with no nested control flow. Clarity of intent: Descriptive API names, explicit SQL function names, and return types make the purpose clear; mappings such as substring to substr and coalesce to NvlFunction could benefit from explanation. Code length: The constructor is reasonably concise for its task, although repeated registration boilerplate adds visual bulk. Action granularity: Each line performs one registration, making individual entries easy to inspect. Reading flow: Consistent formatting and repeated patterns support scanning, but the mixed ordering and lack of category separators slightly weaken the flow.