Sample

Buse/81

Human rating uses the original dataset scale.

DatasetBuse
Human3.93
Lines13

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett0.6860–1; higher is more readable
73.7Δ 8.1
Scalabrino0.860–1; higher is more readable
78.8Δ 3.0
Dorn0.8340–1; higher is more readable
92.9Δ 11.1
Mi0.7180–1; higher is more readable
85.9Δ 4.0
LLOC6Logical lines; fewer is more readable
11.6Δ 70.2
DeepSeek V4 Pro13.670–20; mean of three runs
44.4Δ 37.4
GPT-6.1 Sol150–20; mean of three runs
32.8Δ 49.0
BTTF0.7310–1; higher is more readable
93.9Δ 12.1
Human3.931–5; original rating
81.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)
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.674−7.011
Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones.190.165−6.275
Source linesThe number of non-empty source lines.13+5.2

Intercept 8.87 + feature contributions = 0.783 (log-odds).
Score = sigmoid(0.783) = 0.686.

Score0.86

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.70+0.7
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.14+0.541
Indentation frequencyHow rapidly indentation changes from line to line.8−0.46
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.1+0.398
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.70+0.325
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.069+0.27
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.12.859−0.23

Intercept 0.07 + feature contributions = 1.613 (log-odds).
Score = sigmoid(1.613) = 0.834.

Score0.718
Score6
Run 1

The code is mostly readable but has some issues. The structure is logical, performing a null check, then a duplicate removal, then adding the package. Nesting is flat, which is good. Intent is somewhat clear from comments, but the method name could be more descriptive. Code length is concise. Action granularity is mostly one action per line. Reading flow is natural. However, the inconsistent indentation (tabs vs spaces) hurts readability. The null check for 'importedPackages' is not thread-safe and could be initialized at declaration. The 'contains' check followed by 'remove' is slightly redundant since 'remove' returns a boolean and can handle non-existent elements. Minor improvements could elevate the score.

Run 2

The code is generally readable: it has a clear structure with a single method, low nesting (only two if statements), and concise length. The intent is explicit—ensure the package is added at the end after removing any existing occurrence. Action granularity is mostly one action per line, though the addElement call is on the same line as the comment. The reading flow is natural: initialization, duplicate check, then add. Minor issues include inconsistent indentation, a slightly misleading Javadoc comment ('subsequent imports override earlier ones' while the code only updates one package), and the use of Vector (legacy) rather than a modern collection. These reduce clarity but do not strongly hinder comprehension.

Run 3

The code has a clear purpose and follows a logical sequence, but suffers from several readability issues. Mixed indentation (tabs and spaces) hurts structure and reading flow. The method contains multiple actions per line in spots, and nesting is mild but present. Comments are somewhat helpful but could be clearer. The action granularity is acceptable but not ideal, with multiple operations on one line. Overall, it's understandable but not exemplary.

Run 1

Code Structure: Logically organized into initialization, removal of an existing package, and insertion, although the snippet lacks a closing method brace. Nesting: Flat, with two simple conditional statements. Clarity of intent: The method name and precedence comment clearly explain the purpose; the memory-leak comment is less convincing than explaining ordering or duplicate prevention. Code length: Concise, with no unnecessary steps. Action granularity: Each statement performs one action. Reading flow: Operations follow naturally, but inconsistent indentation, spacing, and omitted conditional braces reduce visual consistency.

Run 2

Code Structure: The method follows a logical sequence: initialize the collection, remove an existing entry, then append it. Nesting: Two simple conditionals keep nesting shallow. Clarity of intent: The method name and override-order comment convey the purpose, though the memory-leak explanation is questionable and the ordering mechanism is implicit. Code length: The implementation is concise without unnecessary steps. Action granularity: Each statement performs one action. Reading flow: The sequence is natural, but inconsistent indentation and spacing, omitted conditional braces, and the missing closing method brace reduce readability.

Run 3

Code Structure: Operations are logically ordered: initialize the collection, remove any existing entry, then append the package. Nesting: Two simple conditionals keep nesting shallow. Clarity of intent: The method name and override-order comment explain the purpose, although the memory-leak comment is potentially misleading. Code length: The implementation is short and focused. Action granularity: Each statement performs one action. Reading flow: Execution flows naturally from initialization to insertion, but inconsistent indentation and spacing, omitted conditional braces, and the missing closing method brace in the supplied snippet reduce readability.