Sample

Dorn/java/103

Human rating uses the original dataset scale.

DatasetDorn
Human3.08
Lines50

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett00–1; higher is more readable
32.0Δ 3.1
Scalabrino0.2480–1; higher is more readable
16.7Δ 18.4
Dorn0.4380–1; higher is more readable
36.8Δ 1.7
Mi0.4040–1; higher is more readable
39.3Δ 4.2
LLOC19Logical lines; fewer is more readable
35.5Δ 0.4
DeepSeek V4 Pro140–20; mean of three runs
65.9Δ 30.8
GPT-6.1 Sol14.670–20; mean of three runs
47.1Δ 12.0
BTTF0.5660–1; higher is more readable
65.2Δ 30.1
Human3.081–5; original rating
35.1

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.1314−43.362
Source linesThe number of non-empty source lines.50+20
Byte entropyHow varied the bytes in the source text are. Repeated bytes give a lower value; a more even mixture gives a higher value.5.099−7.648

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

Score0.248

Feature contributions

FeatureValueContribution
(log-odds)
Indentation frequencyHow rapidly indentation changes from line to line.48+0.923
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.51−0.769
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.50−0.727
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.941+0.703
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.49.746+0.286
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.09+0.069

Intercept 0.07 + feature contributions = -0.25 (log-odds).
Score = sigmoid(-0.25) = 0.438.

Score0.404
Score19
Run 1

The code demonstrates good readability with clear variable naming and logical structure. It follows a flat, linear flow with minimal nesting (only one try-catch and simple if-statements). Each line performs a single, clear action, making intent obvious. The use of helper methods like StringUtil.read() keeps operations concise. However, the code relies on repetitive patterns (reading multiple SQL resources) that could benefit from extraction, and the logging checks add slight verbosity. The second method shows a clean guard clause pattern for skipping upgrades, though the concatenation across lines slightly interrupts reading flow. Overall, the code is maintainable and easy to understand, with only minor opportunities for consolidation or abstraction to improve elegance.

Run 2

The code is moderately readable. The first section is clear: it retrieves a DB instance, current thread, class loader, and reads SQL/index files, then calls db.updateIndexes. Each line performs one logical action, and the flow is natural. However, the second method 'upgradeProcess' shows some weaknesses. The nested if statements for logging add unnecessary depth and make the control flow harder to follow. The string concatenation in log messages spans multiple lines awkwardly, and the repeated calls to getUpgradeProcessClassNames with slightly different parameters introduce some ambiguity. The intent is understandable but could be clearer with extracted variables or helper methods. The first block includes unused imports or variables (currentThread, classLoader) that are only used once, but that is acceptable. Overall, the structure is acceptable but suffers from moderate nesting and repetitive log-checking patterns.

Run 3

The code is moderately readable but has several issues. The structure is logical, with a clear try-catch block and method definition, but the nesting depth is high, especially in the second method with multiple if-statements stacked inside each other. The intent is fairly clear—reading SQL resource files and handling upgrade processes—but the logic is verbose and could be simplified. String concatenation for log messages is unnecessarily long and repetitive, reducing clarity. Action granularity is mostly one action per line, which is good, but the mixed indentation and inconsistent use of tabs make the reading flow awkward. Overall, the code is functional but could benefit from flatter structures, extracted helper methods, and reduced verbosity.

Run 1

Code Structure: Database index updates and upgrade handling form logical sections, but the excerpt begins and ends mid-block, limiting structural readability. Nesting: The early return simplifies flow, though fallback configuration checks and conditional logging introduce several nested levels. Clarity of intent: Descriptive variable names, resource paths, and log messages clearly communicate index loading and upgrade selection. Code length: Generally concise, with some verbosity from repeated configuration lookups, build-number calls, and logging guards. Action granularity: Each statement performs a distinct action; multiline calls and concatenations remain understandable. Reading flow: Consistent indentation and whitespace support sequential reading, although wrapped expressions, nested checks, and incomplete surrounding context interrupt the flow.

Run 2

Code Structure: Operations are logically grouped into SQL resource loading, index updates, and upgrade checks, although the truncated excerpt obscures method boundaries. Nesting: Early return simplifies the initial check, but fallback configuration and conditional logging introduce several nested levels. Clarity of intent: Descriptive variable names, method calls, and log messages clearly communicate the main purposes. Code length: Generally concise, with some repetition in resource loading and upgrade-process lookup. Action granularity: Each statement performs one main action; wrapped calls and string concatenation remain understandable. Reading flow: Sequential setup and consistent formatting support natural reading, but excessive blank lines, deep indentation, and the incomplete beginning and ending interrupt continuity.

Run 3

Code Structure: Database index setup and upgrade handling are logically grouped, but the excerpt begins and ends mid-block, obscuring boundaries. Nesting: Early return simplifies the matching-build case, while fallback lookup and conditional logging introduce moderate nesting. Clarity of intent: Descriptive method and variable names clearly convey resource loading, index updates, and upgrade selection; the generic exception handler gives limited failure context. Code length: Mostly concise, though repeated build-number calls and logging guards add verbosity. Action granularity: Each statement performs a distinct action, with multiline calls remaining easy to follow. Reading flow: Consistent formatting and whitespace support a natural progression, but incomplete surrounding code and nested fallback logic interrupt comprehension.