Sample
Scalabrio73
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0.61 | 0–1; higher is more readable | 94.0Δ 0.8 |
| Scalabrino | 0.944 | 0–1; higher is more readable | 98.2Δ 3.5 |
| Dorn | 0.862 | 0–1; higher is more readable | 97.5Δ 2.8 |
| Mi | 0.589 | 0–1; higher is more readable | 81.7Δ 13.1 |
| LLOC | 7 | Logical lines; fewer is more readable | 81.7Δ 13.1 |
| DeepSeek V4 Pro | 14 | 0–20; mean of three runs | 49.2Δ 45.5 |
| GPT-6.1 Sol | 17 | 0–20; mean of three runs | 58.5Δ 36.2 |
| BTTF | 0.653 | 0–1; higher is more readable | 84.7Δ 10.1 |
| Human | 4.56 | 1–5; original rating | 94.7 |
Views
Select the downloaded ZIP or its extracted folder. Files stay in your browser.
Loading feature diagnosis…
Source regions
Feature contributions
Feature contributions
| Feature | Value | Contribution (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. | 285.293 | −9.415 |
| Source linesThe number of non-empty source lines. | 16 | +6.4 |
| Byte entropyHow varied the bytes in the source text are. Repeated bytes give a lower value; a more even mixture gives a higher value. | 3.606 | −5.409 |
Intercept 8.87 + feature contributions = 0.447 (log-odds).
Score = sigmoid(0.447) = 0.61.
| Score | 0.944 |
|---|
Feature contributions
| Feature | Value | Contribution (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. | 67 | +0.827 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 17 | +0.434 |
| 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. | 67 | +0.277 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.069 | +0.269 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 14 | −0.253 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 15.882 | −0.188 |
Intercept 0.07 + feature contributions = 1.835 (log-odds).
Score = sigmoid(1.835) = 0.862.
| Score | 0.589 |
|---|
| Score | 7 |
|---|
Run 1
The code is mostly readable with a clear purpose: running a test in a separate thread and signaling completion. It uses a shallow nesting depth and one action per line. However, it lacks explanatory context about *why* the test runs this way, and the commented-out code and inline comment are somewhat vague. The anonymous Thread subclass adds minor clutter compared to a lambda or Runnable. The method name and parameters are clear, and the try-finally ensures cleanup. Overall, the structure is straightforward, but the intent could be more explicit, and the code could be slightly more concise.
Run 2
The code is mostly clear and concise, with a straightforward purpose: run a test in a new thread and signal completion. It uses a flat structure with minimal nesting and demonstrates clear intent. However, readability is slightly reduced by the anonymous inner class, the commented-out code block referencing a workaround, and the slightly awkward `ActiveTestSuite.this.runFinished()` call in the finally block. The method is short, actions are reasonably granular, and the reading flow is natural, but the inline comment and implicit context introduce minor ambiguity.
Run 3
The code is generally readable due to moderate indentation and clear intent: it runs a test in a new thread and ensures cleanup in a finally block. The anonymous Thread subclass is concise and the comment explains why the test is run directly instead of calling super. However, readability suffers because the comment about VA/Java is vague and lacks context. The method mixes concerns by defining a thread and starting it inline, which slightly reduces clarity. The code is not deeply nested, and action granularity is reasonable, but the use of an anonymous class adds a layer of complexity. Overall, it is understandable but could be improved by extracting the thread logic or using a lambda if the codebase allows it.
Run 1
Code Structure: Logically organized around creating and starting a thread, with execution and cleanup grouped together. Nesting: The anonymous Thread subclass, overridden run method, and try/finally introduce moderate nesting, but the snippet remains easy to follow. Clarity of intent: Running the test asynchronously and always calling runFinished is clear; the terse variable name t and cryptic VA/Java comment slightly reduce clarity. Code length: Concise overall, though anonymous-class boilerplate and commented-out code add visual noise. Action granularity: Each statement performs one action, with no compressed multi-action lines. Reading flow: Thread creation, test execution, cleanup, and thread startup follow a natural sequence; inconsistent initial indentation is a minor distraction.
Run 2
Code Structure: Logically organized around creating and starting a thread, with completion handling in finally. Nesting: Moderate nesting from the anonymous Thread subclass, overridden run method, and try/finally, but the method remains easy to follow. Clarity of intent: Running a test asynchronously and ensuring completion notification are clear; the terse variable name t and obscure VA/Java comment slightly reduce clarity. Code length: Concise overall, though the commented-out superclass call adds clutter. Action granularity: Each executable statement performs one action. Reading flow: Execution proceeds naturally from thread creation to test execution, cleanup, and thread startup; inconsistent initial indentation and qualified outer-instance access add minor visual friction.
Run 3
Code Structure: Logically organized into thread creation, test execution, completion notification, and thread startup. Nesting: The anonymous Thread subclass, overridden run method, and try/finally introduce moderate but manageable nesting. Clarity of intent: Running a test asynchronously and always notifying completion are clear; the variable name t and vague legacy comment slightly reduce clarity. Code length: Concise overall, although anonymous-class boilerplate and commented-out code add visual overhead. Action granularity: Each statement performs one action, making execution easy to follow. Reading flow: Execution flows naturally from thread creation to startup, though the nested callback temporarily interrupts the outer method's flow.