Sample

Dorn/java/127

Human rating uses the original dataset scale.

DatasetDorn
Human3.12
Lines50

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett00–1; higher is more readable
30.9Δ 6.7
Scalabrino0.8530–1; higher is more readable
92.2Δ 54.6
Dorn0.4410–1; higher is more readable
37.6Δ 0.0
Mi0.3440–1; higher is more readable
33.4Δ 4.2
LLOC15Logical lines; fewer is more readable
46.5Δ 8.9
DeepSeek V4 Pro120–20; mean of three runs
53.6Δ 16.0
GPT-6.1 Sol140–20; mean of three runs
41.4Δ 3.8
BTTF0.650–1; higher is more readable
85.8Δ 48.2
Human3.121–5; original rating
37.6

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.1317.796−43.487
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.358−8.038

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

Score0.853

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.69+0.743
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.49−0.704
Indentation frequencyHow rapidly indentation changes from line to line.38+0.577
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.43−0.486
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.49.386+0.28
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.088+0.087

Intercept 0.07 + feature contributions = -0.237 (log-odds).
Score = sigmoid(-0.237) = 0.441.

Score0.344
Score15
Run 1

The code demonstrates consistent structure and clear intent through repetitive `updatePortletPermissions` calls with well-named parameters. Each call is logically organized with portlet IDs and permission arrays. Nesting is minimal, mostly flat with only the final method showing standard try-catch resource handling. Action granularity is appropriate - one operation per line with readable parameter grouping. The main readability issue is the slight inconsistency in formatting: some short permission arrays are inline while longer ones are split across multiple lines, creating minor visual irregularity. The opening fragment (starting with '8') lacks context, reducing initial comprehension. Overall the pattern is predictable and maintainable, though the repetition could be considered verbose.

Run 2

The code is fairly readable due to its consistent, repetitive pattern of calling updatePortletPermissions. Each call is logically separated and generally concise. However, the first line appears to be a fragment from a previous statement, which harms clarity. The method getLayout shows clear resource handling and a standard try-finally structure, but it is incomplete. The code lacks surrounding context, making it harder to assess overall structure and intent. Nesting is minimal and action granularity is mostly one action per line, but the scattered starting line and the abrupt cut-off reduce the score.

Run 3

The code shows a repetitive pattern of permission updates with consistent formatting, but suffers from several readability issues. The section begins mid-statement with a malformed first call ('"8", "com.liferay.portlet.calendar"' appears to be orphaned from its method invocation), making the entry point confusing. While the repeated updatePortletPermissions calls follow a predictable structure, the constant repetition creates monotonous reading flow that obscures the overall intent. Action granularity is adequate - each call is on separate lines - but some long string arrays break this flow. The nesting is flat, which is positive, but there's an abrupt context shift to database query code (getLayout method) without clear separation. Magic strings like '8', '20', '31' lack meaning without constant definitions, reducing clarity of intent. The code appears to be part of a larger migration or setup script, but this fragment alone provides insufficient context to understand the purpose.

Run 1

Code Structure: Repeated permission updates are consistently grouped, followed by a separate database method, but the excerpt starts and ends mid-operation. Nesting: Mostly flat, with only a shallow try block. Clarity of intent: updatePortletPermissions and named permission constants convey purpose clearly; numeric string IDs, abbreviated database variables, and an Object[] return type provide less context. Code length: Individual calls are concise, although the repetitive configuration adds length. Action granularity: Each statement performs one action, with multiline arguments improving readability. Reading flow: Consistent indentation and blank lines make the updates easy to scan, but the incomplete boundaries interrupt understanding of the surrounding logic.

Run 2

Code Structure: Permission updates are consistently grouped, followed by a separate layout retrieval method, but the fragment starts and ends mid-operation, limiting context. Nesting: The visible code is shallow, with only one try block. Clarity of intent: updatePortletPermissions and named permission constants clearly communicate purpose; numeric portlet IDs, abbreviated JDBC variables, and an Object[] return type are less descriptive. Code length: Repeated calls are somewhat verbose but straightforward and easy to scan. Action granularity: Each statement performs one main action; multiple array entries per line remain readable. Reading flow: Consistent indentation, spacing, and argument formatting support a natural top-to-bottom flow, though the incomplete boundaries interrupt comprehension.

Run 3

Code Structure: Permission updates are consistently grouped and separated from the layout lookup method, though the excerpt starts and ends mid-operation. Nesting: Mostly flat, with only a simple try block visible. Clarity of intent: updatePortletPermissions and descriptive permission names communicate purpose well; numeric string IDs, _GET_LAYOUT, and the Object[] return type provide less context. Code length: Repeated calls are somewhat verbose but easy to scan. Action granularity: Each statement performs one clear action, with long argument lists split sensibly across lines. Reading flow: Consistent indentation and blank lines support a predictable flow, but the truncated boundaries and transition into an incomplete database method reduce readability.