Sample

Scalabrio49

Human rating uses the original dataset scale.

DatasetScalabrino
Human2.78
Lines25

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett00–1; higher is more readable
47.2Δ 39.4
Scalabrino0.3430–1; higher is more readable
29.6Δ 21.9
Dorn0.6450–1; higher is more readable
71.4Δ 63.6
Mi0.1940–1; higher is more readable
46.7Δ 38.9
LLOC14Logical lines; fewer is more readable
49.2Δ 41.5
DeepSeek V4 Pro16.330–20; mean of three runs
80.9Δ 73.1
GPT-6.1 Sol170–20; mean of three runs
58.5Δ 50.8
BTTF0.4970–1; higher is more readable
37.7Δ 29.9
Human2.781–5; original rating
7.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)
Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones.855.265−28.224
Source linesThe number of non-empty source lines.25+10
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.35−6.525

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

Score0.343

Feature contributions

FeatureValueContribution
(log-odds)
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
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.78+0.361
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.25−0.153
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.086+0.107
Indentation frequencyHow rapidly indentation changes from line to line.24+0.093
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.23.785−0.077

Intercept 0.07 + feature contributions = 0.598 (log-odds).
Score = sigmoid(0.598) = 0.645.

Score0.194
Score14
Run 1

The method is logically structured with clear separation between overwrite confirmation, output setup/execution, and resource closure. Nesting is shallow, limited to one confirmation check and a try/finally block. Intent is generally clear, though mixing dialog logic with file I/O slightly dilutes the method's purpose. Code length is reasonable, but the null-check-then-close in finally could be replaced with try-with-resources for conciseness. Action granularity is mostly good, though the cmd.setScale line has a somewhat long nested call. Reading flow is natural, led by the user confirmation check. Deductions stem from modest responsibilities in one method, minor verbosity in resource handling, and a slightly dense configuration line.

Run 2

The code is well-structured with clear separation of concerns: overwrite confirmation, file output setup, and execution. Nesting is minimal, with only one conditional inside another. Intent is clear — saving graphics with optional overwrite prompting. The method is concise and appropriately named. Action granularity is mostly good, though the JOptionPane.showConfirmDialog call spans several lines with multiple arguments, slightly impacting readability. Reading flow is natural: check file existence, confirm overwrite, write file, return result. The try-finally block for closing the stream is correct. Minor improvements could include extracting the confirmation dialog into a helper method and simplifying the dialog’s multi-line argument layout. Overall, highly readable code with only small formatting concerns.

Run 3

The code is logically structured, with a clear flow: overwrite check, file output setup, execution, and cleanup. Nesting is minimal, and intent is transparent. The use of try-finally for resource cleanup is appropriate, though try-with-resources would be slightly cleaner. Line lengths are reasonable, and each line performs one action. The method name and parameter names clearly convey purpose. Minor stylistic improvements could include using braces around single-line if and extracting the overwrite confirmation into a helper method.

Run 1

Code Structure: Logically separates overwrite confirmation, graphics export, and resource cleanup. Nesting: Shallow overall, with only a small nested conditional and a cleanup guard. Clarity of intent: The method name and command calls clearly communicate its purpose, although 'fo' is an opaque variable name and 'overwrite' could better express permission to overwrite without prompting. Code length: Concise, with little unnecessary code; try-with-resources could simplify stream management. Action granularity: Mostly one action per line, though the inline conditional return slightly compresses control flow. Reading flow: Follows a natural confirm-open-configure-save-close sequence. Inconsistent indentation, spacing, and line wrapping mildly interrupt readability.

Run 2

Code Structure: Logically separates overwrite confirmation, graphics saving, and stream cleanup. Nesting: Shallow overall, with modest nesting in confirmation and cleanup blocks. Clarity of intent: The method name and command calls clearly communicate the purpose, though abbreviated names such as fo and cmd reduce clarity slightly. Code length: Concise, with little unnecessary code; try-with-resources could simplify stream management. Action granularity: Most lines perform one action, although the inline conditional return compresses control flow. Reading flow: Execution proceeds naturally from validation to saving, cleanup, and success. Inconsistent indentation, spacing, and line wrapping slightly disrupt readability.

Run 3

Code Structure: Logically separates overwrite confirmation, graphics export, and resource cleanup. Nesting: Shallow overall, with only a nested confirmation check and cleanup guard. Clarity of intent: The method name and export sequence clearly communicate its purpose, though 'fo' is an abbreviated variable name and the overwrite flag's semantics require interpretation. Code length: Concise, with little unnecessary code; try-with-resources could simplify stream management. Action granularity: Most lines perform one action, but the inline conditional return compresses control flow. Reading flow: The sequence is natural and easy to follow, although inconsistent indentation, spacing, and wrapped dialog arguments introduce minor visual friction.