Sample

JetBrains/i25

Human rating uses the original dataset scale.

DatasetJetBrains
Human0.43
Lines11

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett00–1; higher is more readable
43.2Δ 33.1
Scalabrino0.5910–1; higher is more readable
41.5Δ 31.4
Dorn0.2110–1; higher is more readable
16.1Δ 5.9
Mi0.2110–1; higher is more readable
15.3Δ 5.1
LLOC7Logical lines; fewer is more readable
85.2Δ 75.0
DeepSeek V4 Pro150–20; mean of three runs
43.6Δ 33.5
GPT-6.1 Sol16.330–20; mean of three runs
34.3Δ 24.2
BTTF0.4410–1; higher is more readable
38.1Δ 28.0
Human0.430–1; original rating
10.2

Views

Source code

public class IntegerOrdinalSuffix { public static void main(String[] args) { String[] suffixes = new String[]{"th","st","nd","rd","th","th","th","th","th","th"}; for (String arg : args) { int i = Integer.parseInt(arg); int ii = i % 100; String suffix = suffixes[(ii>=11&&ii<=13)?0:(ii%10)]; System.out.println(i + suffix); } } }

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.605.45−19.98
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.344−6.517
Source linesThe number of non-empty source lines.11+4.4

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

Score0.591

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
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.145−0.463
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.94−0.316
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.9.737−0.274
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.11+0.168

Intercept 0.07 + feature contributions = -1.32 (log-odds).
Score = sigmoid(-1.32) = 0.211.

Score0.211
Score7
Run 1

The code is logically structured with clear purpose, but has minor readability issues: a magic-number array is used for suffixes without explanation, and the ternary expression for index calculation is dense. It avoids deep nesting and is concise, but the lack of comments or a helper method makes intent slightly ambiguous. Action granularity is acceptable.

Run 2

The code is concise and demonstrates a clever use of logic to determine ordinal suffixes. It has a flat structure with minimal nesting, making the flow easy to follow. However, the logic for suffix selection is compressed into a single complex ternary expression, which reduces clarity and readability. The array of suffixes is compact but not self-explanatory. Variable names like 'i' and 'ii' are ambiguous, and the code lacks comments explaining the modulo and range-check logic. The reading flow is natural overall, but the core decision-making line could be broken down for better comprehension.

Run 3

The code is concise and logically organized for its purpose. It uses a lookup array and ternary logic to determine ordinal suffixes, avoiding deep nesting and unnecessary length. However, readability suffers from cryptic variable names like 'i' and 'ii', and the logic for handling numbers 11-13 is not immediately obvious. The array indexing via a boolean expression is compact but requires careful reading. Adding comments or clearer variable names would improve clarity.

Run 1

Code Structure: The class, entry point, and loop are logically organized. Nesting: Shallow nesting makes the code easy to follow. Clarity of intent: The class name and suffix lookup communicate ordinal formatting, but variable names i and ii are vague, and the compact conditional requires extra attention. Code length: Concise without unnecessary repetition. Action granularity: Each statement performs one main action, although suffix selection combines range checking and indexing in one expression. Reading flow: Parsing, calculating, selecting a suffix, and printing follow a natural sequence. Consistent spacing around operators and array elements, plus more descriptive variable names, would improve readability.

Run 2

Code Structure: Logically organized, with suffix initialization followed by argument processing and output. Nesting: Shallow, with only one loop inside main. Clarity of intent: The class name and suffix array convey ordinal formatting, but i and ii are vague names, and the tightly packed ternary expression requires extra attention. Code length: Concise without unnecessary boilerplate beyond standard Java structure. Action granularity: Each statement performs a distinct step, although suffix selection combines range checking and indexing in one expression. Reading flow: Naturally progresses from parsing to suffix selection to printing, but inconsistent spacing and compressed operators reduce scanability.

Run 3

Code Structure: Logically organized, with suffix initialization followed by argument processing and output. Nesting: Shallow, with only one loop inside main. Clarity of intent: The class name and suffix table communicate ordinal formatting, but i and ii are vague names, and the tightly packed ternary requires extra interpretation. Code length: Concise without unnecessary boilerplate beyond the Java entry point. Action granularity: Each statement performs a distinct step, though suffix selection combines range checking, a conditional, and array indexing. Reading flow: Natural progression from parsing to suffix selection to printing; consistent spacing around operators and more descriptive variable names would improve readability.