Sample

Buse/31

Human rating uses the original dataset scale.

DatasetBuse
Human3.26
Lines10

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett0.1770–1; higher is more readable
43.4Δ 1.5
Scalabrino0.5990–1; higher is more readable
28.8Δ 16.2
Dorn0.5610–1; higher is more readable
43.4Δ 1.5
Mi0.3580–1; higher is more readable
25.3Δ 19.7
LLOC5Logical lines; fewer is more readable
29.8Δ 15.2
DeepSeek V4 Pro150–20; mean of three runs
60.6Δ 15.7
GPT-6.1 Sol17.670–20; mean of three runs
76.3Δ 31.3
BTTF0.4470–1; higher is more readable
37.4Δ 7.6
Human3.261–5; original rating
44.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.229.388−7.57
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.56−6.84
Source linesThe number of non-empty source lines.10+4

Intercept 8.87 + feature contributions = -1.54 (log-odds).
Score = sigmoid(-1.54) = 0.177.

Score0.599

Feature contributions

FeatureValueContribution
(log-odds)
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.68+0.785
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.9+0.718
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
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.9.71−0.274
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.091+0.056

Intercept 0.07 + feature contributions = 0.246 (log-odds).
Score = sigmoid(0.246) = 0.561.

Score0.358
Score5
Run 1

The code is generally well-structured and readable. It uses flat nesting with early returns, making the logic straightforward. The intent is clear: create an enumeration from a String or StringBuffer, otherwise throw an exception. The action granularity is mostly one action per line, except for one return statement. The code is concise. Minor deductions are because the second 'if' block's return call spans multiple lines due to wrapping, and the exception message concatenation uses string concatenation instead of a clearer formatting method. Overall, the code is easy to follow.

Run 2

The code is generally readable with clear intent and flat structure. It uses early returns, avoiding excessive nesting. Each action is on its own line, and method names like createEnumeration and IllegalArgumentException are descriptive. Minor issues include inconsistent formatting: the first if statement omits braces and spans fewer lines, while the second is more verbose. The final throw statement breaks the 'one action per line' guideline by concatenating an object's class name inline. Overall, the logic is straightforward and easy to follow, but minor style inconsistencies prevent a higher score.

Run 3

The code has clear logical structure with a straightforward if-else-if pattern returning early, and line breaks between conditions aid readability. However, there are issues: excessive indentation, repetitive casting and conversion logic that could be extracted, inconsistent formatting for similar operations (first condition inline, second condition split across lines), and a final throw statement that could benefit from a line break for the string concatenation. The nesting is flat, which is good, but the repetitive 'instanceof' checks and conversions introduce unnecessary length. Action granularity is mostly one action per line, but the second return statement combines multiple operations. The reading flow is natural but disrupted by inconsistent formatting and indentation.

Run 1

Code Structure: Two logically ordered type checks followed by an exception provide straightforward organization. Nesting: Flat conditionals and early returns avoid nesting. Clarity of intent: Converting supported string-like objects into character enumerations is clear, though createEnumeration's implementation is not shown. Code length: Concise, with minimal duplication. Action granularity: Each statement performs one main action, although conversions are chained within return expressions. Reading flow: Natural top-to-bottom flow, slightly weakened by inconsistent line wrapping, missing braces, and tight spacing around the cast and concatenation.

Run 2

Code Structure: Two logically ordered type checks followed by an unsupported-type exception make the organization straightforward. Nesting: Flat guard clauses avoid nested branches. Clarity of intent: Converting strings and string buffers into character enumerations is clear, although the name iterateOverMe is informal and null handling is not explicit. Code length: Concise, with little unnecessary code. Action granularity: Each statement performs a focused operation, though conversion and enumeration creation are combined in return expressions. Reading flow: Natural top-to-bottom progression; missing braces, inconsistent line wrapping, and tight spacing around the cast and concatenation slightly reduce readability.

Run 3

Code Structure: Two logically ordered type checks followed by a fallback exception form a clear structure. Nesting: Flat guard clauses avoid unnecessary nesting. Clarity of intent: Conversion to character arrays and enumeration creation clearly convey the purpose, although createEnumeration is not shown and null handling is absent. Code length: Concise, with little unnecessary code. Action granularity: Each statement performs one main action, though conversion and enumeration creation are combined in return expressions. Reading flow: Natural top-to-bottom flow with helpful spacing; inconsistent line wrapping, missing braces, and tight spacing around casts and concatenation slightly reduce readability.