Sample

Buse/83

Human rating uses the original dataset scale.

DatasetBuse
Human2.77
Lines8

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett0.0010–1; higher is more readable
5.1Δ 19.2
Scalabrino0.460–1; higher is more readable
12.1Δ 12.1
Dorn0.3870–1; higher is more readable
24.2Δ 0.0
Mi0.4890–1; higher is more readable
38.4Δ 14.1
LLOC8Logical lines; fewer is more readable
1.0Δ 23.2
DeepSeek V4 Pro16.330–20; mean of three runs
77.3Δ 53.0
GPT-6.1 Sol170–20; mean of three runs
62.1Δ 37.9
BTTF0.4060–1; higher is more readable
23.2Δ 1.0
Human2.771–5; original rating
24.2

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.375−12.375
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.758−7.137
Source linesThe number of non-empty source lines.8+3.2

Intercept 8.87 + feature contributions = -7.442 (log-odds).
Score = sigmoid(-7.442) = 0.001.

Score0.46

Feature contributions

FeatureValueContribution
(log-odds)
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.9+0.718
Indentation frequencyHow rapidly indentation changes from line to line.1−0.703
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.73+0.573
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.139−0.41
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.7.797−0.301

Intercept 0.07 + feature contributions = -0.459 (log-odds).
Score = sigmoid(-0.459) = 0.387.

Score0.489
Score8
Run 1

The method is concise, clear, and well-structured. It accepts a filter, iterates through test methods, removes those not matching the filter, and throws an exception if none remain. The code has a flat structure with a single loop and one conditional, avoiding deep nesting. Action granularity is good, with one primary action per line and clear intent, though the `filter.shouldRun(methodDescription(method))` line combines multiple operations. Naming is mostly clear, but `fTestMethods` and `NoTestsRemainException` could be slightly more descriptive. The reading flow is natural, moving from iteration to filtering to validation. Minor style issues include inconsistent spacing (`iter= fTestMethods`) and lack of braces on the single-statement conditional, which can reduce readability. Overall, it is straightforward and maintainable.

Run 2

The code is generally readable with a clear intent: filter test methods and throw if none remain. Structure is logical and method length is concise. Nesting is minimal with only one loop and one conditional. Action granularity is good, with one operation per line. However, minor issues reduce clarity: inconsistent spacing in the for loop header (`iter= fTestMethods.iterator()`), ambiguous variable naming (`fTestMethods`), and lack of a closing brace in the provided snippet. The reading flow is natural, but these small formatting inconsistencies slightly hinder smooth comprehension.

Run 3

The code is generally readable and well-structured. It has a clear purpose: filtering test methods and throwing an exception if none remain. The method is concise, with a single logical action per line. Nesting is minimal, with only one level inside the loop. The loop variable naming is slightly unclear ('iter' vs 'iterator'), and there is a minor formatting inconsistency with a missing space after '='. The use of 'fTestMethods' (Hungarian notation) is acceptable in legacy code but could be more descriptive. Overall, the flow is natural: iterate, filter, check emptiness, throw. The code could be improved by using a stream API for more concise filtering, but this would depend on the Java version. The score reflects good readability with minor opportunities for polish.

Run 1

Code Structure: logically separates filtering from the empty-result check, though the method's closing brace is missing. Nesting: shallow, with only one conditional inside the loop. Clarity of intent: descriptive names make the purpose clear—remove methods that fail the filter and throw if none remain. Code length: concise without unnecessary logic. Action granularity: each statement performs a single action; the loop header conventionally groups iteration mechanics. Reading flow: natural progression from iteration to validation, slightly weakened by omitted conditional braces and inconsistent spacing around assignments.

Run 2

Code Structure: Logically organized into filtering methods and checking whether any remain. Nesting: Shallow, with only one conditional inside the loop. Clarity of intent: Descriptive names make the filtering purpose clear; iterator removal is appropriate and easy to understand. Code length: Concise, without unnecessary statements. Action granularity: Each body statement performs one action; the loop header conventionally combines iterator initialization and iteration checking. Reading flow: Natural progression from iteration to removal to the final empty-list check. Minor readability issues include inconsistent spacing around assignments, omitted braces around conditional bodies, and a missing closing method brace in the provided snippet.

Run 3

Code Structure: Logically organized into filtering followed by an empty-result check. Nesting: Shallow, with one loop and a simple conditional. Clarity of intent: Method names and the exception clearly communicate that nonmatching tests are removed and an empty result is rejected. Code length: Concise without unnecessary operations. Action granularity: Each body statement performs one action; the loop header conventionally combines initialization and iteration control. Reading flow: Natural top-to-bottom progression. Readability is slightly reduced by inconsistent spacing, omitted conditional braces, and the missing closing method brace in the provided snippet.