Sample

Buse/41

Human rating uses the original dataset scale.

DatasetBuse
Human2.42
Lines6

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett0.4990–1; higher is more readable
62.6Δ 51.5
Scalabrino0.8360–1; higher is more readable
71.2Δ 60.1
Dorn0.6330–1; higher is more readable
55.6Δ 44.4
Mi0.6490–1; higher is more readable
64.6Δ 53.5
LLOC3Logical lines; fewer is more readable
88.9Δ 77.8
DeepSeek V4 Pro100–20; mean of three runs
15.2Δ 4.0
GPT-6.1 Sol10.670–20; mean of three runs
5.6Δ 5.6
BTTF0.4920–1; higher is more readable
46.5Δ 35.4
Human2.421–5; original rating
11.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)
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.029−6.044
Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones.158.457−5.229
Source linesThe number of non-empty source lines.6+2.4

Intercept 8.87 + feature contributions = -0.003 (log-odds).
Score = sigmoid(-0.003) = 0.499.

Score0.836

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.45+1.759
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.7+0.788
Indentation frequencyHow rapidly indentation changes from line to line.1−0.703
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.15−0.519
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.5.609−0.331
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.6+0.283

Intercept 0.07 + feature contributions = 0.544 (log-odds).
Score = sigmoid(0.544) = 0.633.

Score0.649
Score3
Run 1

The code is moderately readable. It uses a switch statement on a conditional expression, which is somewhat complex but understandable. The ternary operator with jj_ntk and jj_ntk() adds slight ambiguity about intent, though the pattern is common in parser generators. Nesting is flat, and each case performs a single action, which is good. However, the code is incomplete (missing closing brace and default case), making it harder to assess full structure. The variable names like 'jj_ntk' and 'jj_consume_token' are cryptic but likely domain-specific. Overall, it's concise and follows a logical flow, but the conditional switch expression and incomplete snippet reduce clarity.

Run 2

The code is difficult to read due to several issues. The ternary operator in the switch condition is cryptic and relies on hidden state (jj_ntk), making intent unclear. The empty line before the closing brace disrupts flow, and the indentation is unusual. Action granularity is reasonable (one action per line), but the overall structure lacks clarity and natural reading flow. Variable names like 't' and 'jj_ntk' are too terse without context.

Run 3

The code snippet is a small switch statement with a ternary expression for token lookahead. While the logic is not deeply nested, it suffers from poor readability: the ternary is dense, the variable names (jj_ntk, jj_consume_token) are cryptic, and there is no surrounding context or comments explaining the parser flow. Action granularity is acceptable (one assignment or break per case), but the structural intent is unclear. The reading flow is disrupted by the unexplained token constants (EQ, NE) and the lack of a default case. Code length is concise but at the expense of clarity. Overall, the snippet appears to be part of a generated parser, which often trades readability for compactness, but without that context it remains difficult to interpret.

Run 1

Code Structure: The switch and case organization is logical, but the snippet is incomplete, with no closing brace or visible break for NE. Nesting: Shallow nesting makes the control flow easy to follow. Clarity of intent: EQ and NE suggest equality operators, but cryptic names such as jj_ntk and t, plus the compact ternary expression, obscure the purpose. Code length: Concise, with no obvious unnecessary code. Action granularity: Token consumption and break statements are separated onto individual lines. Reading flow: The repeated case pattern is predictable, but sparse spacing in the switch expression and the abrupt ending disrupt readability.

Run 2

Code Structure: The switch and token-specific cases are logically organized, but the snippet is incomplete, lacking closing braces and a visible break for NE. Nesting: Shallow nesting makes the cases easy to follow. Clarity of intent: Consuming EQ or NE tokens is apparent, but cryptic identifiers and the compact conditional switch expression obscure token-selection logic. Code length: Concise, with little unnecessary code. Action granularity: Each assignment and break occupies its own line, although the switch expression combines a comparison, conditional selection, and possible function call. Reading flow: The repeated case pattern is predictable, but inconsistent spacing, heavy initial indentation, and abrupt truncation disrupt readability.

Run 3

Code Structure: The switch logically groups token cases, but the snippet is incomplete, with no closing brace or visible termination for NE. Nesting: Shallow nesting makes the branches easy to follow. Clarity of intent: EQ and NE suggest operator-token handling, but t, jj_ntk, and jj_consume_token are unexplained, and the compact conditional obscures token selection. Code length: Concise, with no obvious redundancy beyond normal switch structure. Action granularity: Assignments and break statements occupy separate lines, although the switch condition combines a comparison, conditional selection, and possible function call. Reading flow: The repeated case pattern is predictable, but cramped spacing and the abrupt ending interrupt comprehension.