Sample
Buse/48
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0.93 | 0–1; higher is more readable | 91.9Δ 10.1 |
| Scalabrino | 0.888 | 0–1; higher is more readable | 90.9Δ 9.1 |
| Dorn | 0.831 | 0–1; higher is more readable | 90.9Δ 9.1 |
| Mi | 0.808 | 0–1; higher is more readable | 96.0Δ 14.1 |
| LLOC | 4 | Logical lines; fewer is more readable | 59.6Δ 22.2 |
| DeepSeek V4 Pro | 16 | 0–20; mean of three runs | 73.2Δ 8.6 |
| GPT-6.1 Sol | 17.67 | 0–20; mean of three runs | 76.3Δ 5.6 |
| BTTF | 0.75 | 0–1; higher is more readable | 98.0Δ 16.2 |
| Human | 3.93 | 1–5; original rating | 81.8 |
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) |
|---|---|---|
| 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.617 | −6.926 |
| Source linesThe number of non-empty source lines. | 10 | +4 |
| Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones. | 101.579 | −3.352 |
Intercept 8.87 + feature contributions = 2.592 (log-odds).
Score = sigmoid(2.592) = 0.93.
| Score | 0.888 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Indentation frequencyHow rapidly indentation changes from line to line. | 1 | −0.703 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 11 | +0.647 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.038 | +0.576 |
| 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. | 75.818 | +0.454 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 76 | +0.422 |
| 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. | 9.909 | −0.271 |
Intercept 0.07 + feature contributions = 1.593 (log-odds).
Score = sigmoid(1.593) = 0.831.
| Score | 0.808 |
|---|
| Score | 4 |
|---|
Run 1
The code is well-structured with clear intent: a constructor for a comparison failure. It uses minimal nesting, concise parameter documentation, and straightforward field assignments. However, minor style issues slightly reduce readability: lack of spacing around '=' in field assignments, the unconventional 'f' prefix without explanation, and the space before the opening parenthesis in the constructor signature. The code is otherwise flat, follows a natural flow, and each line performs one logical action.
Run 2
The code is a simple constructor with clear documentation. The structure is logical, with the super call first followed by field assignments. Nesting is non-existent. The intent is immediately clear: initialize a comparison failure with a message and expected/actual values. The code is concise with no unnecessary lines. Each line performs a single action. The reading flow is natural, following a logical sequence from superclass initialization to field assignments. Minor deductions: field naming with 'f' prefix is a legacy convention that may be unfamiliar, and spacing around parentheses is inconsistent with common Java style guides, slightly impacting readability.
Run 3
The code has clear intent with a well-documented Javadoc comment explaining parameters. However, readability issues exist: unconventional spacing after method name `ComparisonFailure (String...` and `super (message)` breaks Java conventions. Non-standard field naming with `f` prefix (`fExpected`, `fActual`) reduces clarity. The constructor is concise with one action per line for assignments, but the single-line opening brace and mixed spacing style disrupt reading flow. Missing closing brace in the snippet prevents full structure evaluation, but the visible portion shows reasonable organization. Overall, functional but stylistically inconsistent code that would benefit from standard Java formatting conventions.
Run 1
Code Structure: The constructor is logically organized, calling the superclass before assigning fields, though the snippet lacks a closing brace. Nesting: Flat and easy to follow. Clarity of intent: The documentation and descriptive parameter names clearly communicate its purpose. Code length: Concise, with no unnecessary logic. Action granularity: Each statement performs one action on its own line. Reading flow: Natural and sequential, slightly weakened by inconsistent spacing around parentheses and assignment operators and the incomplete ending.
Run 2
Code Structure: The constructor is logically organized, with documentation followed by superclass initialization and field assignments. Nesting: The code is flat with no nested control flow. Clarity of intent: The constructor name, parameter names, and Javadoc clearly convey its purpose. Code length: It is concise, containing only necessary initialization statements. Action granularity: Each statement performs one action on its own line. Reading flow: Execution proceeds naturally from superclass initialization to instance-field initialization. Minor readability issues include inconsistent spacing around assignments and parentheses, legacy field-name prefixes, and a missing closing brace in the provided snippet.
Run 3
Code Structure: A logically organized constructor with documentation, superclass initialization, and field assignments. Nesting: Flat, with no nested control flow. Clarity of intent: The documentation and parameter names clearly explain its purpose. Code length: Concise, with no unnecessary statements. Action granularity: Each line performs one action. Reading flow: Natural, progressing from the superclass constructor to instance initialization. Minor readability issues include inconsistent spacing, prefixed field names, and the missing closing brace in the provided snippet.