Sample
Buse/85
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0.145 | 0–1; higher is more readable | 41.4Δ 20.2 |
| Scalabrino | 0.857 | 0–1; higher is more readable | 77.3Δ 15.7 |
| Dorn | 0.693 | 0–1; higher is more readable | 65.7Δ 4.0 |
| Mi | 0.829 | 0–1; higher is more readable | 97.0Δ 35.4 |
| LLOC | 5 | Logical lines; fewer is more readable | 29.8Δ 31.8 |
| DeepSeek V4 Pro | 17 | 0–20; mean of three runs | 87.4Δ 25.8 |
| GPT-6.1 Sol | 17.67 | 0–20; mean of three runs | 76.3Δ 14.6 |
| BTTF | 0.606 | 0–1; higher is more readable | 75.8Δ 14.1 |
| Human | 3.6 | 1–5; original rating | 61.6 |
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. | 253.824 | −8.376 |
| 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.446 | −6.668 |
| Source linesThe number of non-empty source lines. | 11 | +4.4 |
Intercept 8.87 + feature contributions = -1.775 (log-odds).
Score = sigmoid(-1.775) = 0.145.
| Score | 0.857 |
|---|
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. | 12 | +0.611 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 82 | +0.519 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 7 | +0.26 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 10.819 | −0.259 |
| 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. | 82 | +0.192 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.084 | +0.122 |
Intercept 0.07 + feature contributions = 0.813 (log-odds).
Score = sigmoid(0.813) = 0.693.
| Score | 0.829 |
|---|
| Score | 5 |
|---|
Run 1
The code is highly readable with a clear purpose, minimal nesting, and concise length. The method name and Javadoc immediately convey intent. Each line performs a single logical action, and the flow is natural: check capacity, remove oldest if full, add new message, then repaint. The structure is flat with only one simple conditional, and there are no ambiguous variable names. Minor deductions are for the magic number '0' in the remove call and the slightly coupled UI repaint logic, which could benefit from a helper method, but overall readability is excellent.
Run 2
The code is well-structured and readable. It has a clear purpose, documented via Javadoc, and uses a synchronized method to ensure thread-safety. The logic is straightforward with one level of nesting and a single conditional check that avoids deep nesting. Each action is on its own line, improving clarity: removing an old message, adding the new one, and repainting the canvas. The variable names are descriptive, and the method is concise. Minor deductions: the magic number `0` in `messages.remove(0)` could be a named constant, and the `getWidth()`/`getHeight()` calls are slightly distracting inside the repaint call, but overall the code is highly readable.
Run 3
The code is well-structured and highly readable. It has a clear purpose, documented by a concise Javadoc comment. The method is short and performs two logical actions: managing message list capacity and triggering a repaint. Nesting is minimal with a single conditional block, and action granularity is appropriate with one operation per line. The reading flow is natural—check capacity, remove oldest if needed, add new message, and refresh UI. Minor deductions: the repaint call could be extracted to improve semantic separation, and the magic-number width/height retrieval slightly obscures intent, but overall the code is clear, focused, and easy to follow.
Run 1
Code Structure: Logically orders capacity enforcement, message insertion, and GUI repainting, but the shown method lacks a closing brace. Nesting: Only one shallow conditional, making it easy to follow. Clarity of intent: The documentation and descriptive names clearly convey the purpose; the removal of index 0 implies discarding the oldest message. Code length: Concise, with no unnecessary statements. Action granularity: Each statement performs one main action. Reading flow: Natural top-to-bottom progression, with whitespace separating message updates from repainting. The incomplete method and slightly implicit capacity-handling semantics prevent a higher score.
Run 2
Code Structure: Logically organized into capacity enforcement, message insertion, and GUI repainting. Nesting: Only one shallow conditional, making control flow easy to follow. Clarity of intent: The documentation and descriptive names clearly convey the purpose; removing index 0 implicitly discards the oldest message. Code length: Concise with no unnecessary statements. Action granularity: Each statement performs one distinct action. Reading flow: Operations follow a natural sequence, and whitespace separates updating messages from repainting. The missing closing brace makes the provided snippet incomplete, slightly reducing readability.
Run 3
Code Structure: logically organized into capacity management, message insertion, and GUI repainting. Nesting: shallow, with only one straightforward conditional. Clarity of intent: the method name, parameter, and documentation clearly explain its purpose; MESSAGE_COUNT could more explicitly indicate a maximum capacity. Code length: concise, with no unnecessary statements. Action granularity: each statement performs one primary action. Reading flow: natural and sequential, with whitespace separating insertion from repainting. The missing closing brace makes the supplied snippet appear incomplete, slightly reducing readability.