Sample

Scalabrio48

Human rating uses the original dataset scale.

DatasetScalabrino
Human4.11
Lines36

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett00–1; higher is more readable
58.3Δ 19.8
Scalabrino0.9280–1; higher is more readable
96.5Δ 18.3
Dorn0.8980–1; higher is more readable
99.5Δ 21.4
Mi0.5320–1; higher is more readable
77.9Δ 0.3
LLOC22Logical lines; fewer is more readable
19.3Δ 58.8
DeepSeek V4 Pro110–20; mean of three runs
25.6Δ 52.5
GPT-6.1 Sol120–20; mean of three runs
3.0Δ 75.1
BTTF0.5890–1; higher is more readable
67.3Δ 10.8
Human4.111–5; original rating
78.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.922.062−30.428
Source linesThe number of non-empty source lines.36+14.4
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.337−5.005

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

Score0.928

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.60.917+1.085
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
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.36−0.238
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.61+0.18
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.08+0.166
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.34.839+0.077

Intercept 0.07 + feature contributions = 2.176 (log-odds).
Score = sigmoid(2.176) = 0.898.

Score0.532
Score22
Run 1

The code has some readable aspects: it is relatively flat (only 2-3 levels of nesting), variable names like 'inSection' and 'content' convey intent, and actions are mostly one per line. However, there are several issues that reduce clarity. The while loop condition checks 'line != null', but 'line' is assigned inside the loop, creating an awkward and redundant outer null check. The section-parsing logic is tangled: two nearly identical branches check 'getSectId(line)' with subtle differences, making the state machine hard to follow. The control flow could be clarified with helper methods or early exits. Resource management uses manual close() instead of try-with-resources, increasing risk and reducing readability. Error handling logs only a generic message, revealing little about context. Overall, the code is understandable but requires effort to trace the state transitions, and it contains anti-patterns that obscure intent and inflate length.

Run 2

The code has a clear overall goal but suffers from readability issues. The structure is logical but the logic is nested deeply (up to 4 levels), making it hard to follow. Intent is somewhat clear from method name and variable names, but the section parsing logic is ambiguous without knowing `getSectId`. Code length is reasonable but could be simplified. Multiple actions occur per line, especially in the `else` branch with string concatenation and assignment, violating single-action granularity. Reading flow is somewhat natural but disrupted by the nested `if` logic. The while loop condition `line != null` and the redundant null check inside are a minor logical duplication. Error handling via logging is acceptable, but `fr.close()` is not in a finally block, risking resource leaks. Overall, functional but not highly readable.

Run 3

The code has a clear overall purpose but suffers from multiple readability issues. Structure is only partially logical: the try-catch is fine, but the while loop with mixed null checks and nested if-else creates tangled flow. Nesting reaches three levels deep, which hurts scanning. Intent is somewhat clear, but variable names like 'f', 'fr', 'mAry', and 'line' vs 'content' are not descriptive. Code length is moderate, but the loop could be simplified. Action granularity is mostly okay, though some lines combine assignment and null checks. Reading flow is disjointed: the repeated 'if (line != null)' and section detection logic feel repetitive. The while loop condition checks 'line' before it is read, which is confusing. Comments and JavaDoc are minimal. Overall, the code works but requires effort to follow.

Run 1

Code Structure: The method follows a coherent read-process-close sequence, but file handling and section parsing are intertwined. Nesting: Several nested conditionals inside the loop make control flow harder to follow; reading directly in the loop condition would remove one level. Clarity of intent: Reading section content is apparent, but names such as f, fr, and mAry are vague, and section-boundary behavior requires inference. Code length: Reasonably short, though duplicate getSectId calls in separate branches and redundant line initialization add clutter. Action granularity: Most lines perform one clear action. Reading flow: The overall progression is natural, but toggling inSection and associating accumulated content with a closing section ID require careful tracking.

Run 2

Code Structure: Reading and section parsing are logically grouped, but resource handling and parsing are mixed in one method. Nesting: The try, while, and multiple conditional levels make the control flow harder to follow. Clarity of intent: Names such as inSection and sectionId help, but f, fr, and mAry are vague, and the section-boundary behavior is not explained. Code length: Fairly compact, though getSectId is duplicated and the initial line value and nested null check add avoidable boilerplate. Action granularity: Most lines perform one clear action. Reading flow: The progression from opening the file to reading, storing content, and closing is natural, but repeated state changes and nested branches require careful tracking.

Run 3

Code Structure: File reading and section parsing are logically grouped, but resource handling and parsing state are mixed in one method. Nesting: The try, while, and multiple conditional levels create substantial nesting; a direct read-loop condition would simplify it. Clarity of intent: Reading sections is apparent, but names such as f, fr, and mAry obscure roles, and using a section identifier to end and store content is not self-explanatory. Code length: Reasonably short, though repeated getSectId calls and redundant line initialization/null checking add clutter. Action granularity: Most lines perform one clear action, making individual operations easy to follow. Reading flow: Sequential reading is natural, but toggling inSection and resetting content require readers to track state carefully.