Sample

Buse/85

Human rating uses the original dataset scale.

DatasetBuse
Human3.6
Lines11

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett0.1450–1; higher is more readable
41.4Δ 20.2
Scalabrino0.8570–1; higher is more readable
77.3Δ 15.7
Dorn0.6930–1; higher is more readable
65.7Δ 4.0
Mi0.8290–1; higher is more readable
97.0Δ 35.4
LLOC5Logical lines; fewer is more readable
29.8Δ 31.8
DeepSeek V4 Pro170–20; mean of three runs
87.4Δ 25.8
GPT-6.1 Sol17.670–20; mean of three runs
76.3Δ 14.6
BTTF0.6060–1; higher is more readable
75.8Δ 14.1
Human3.61–5; original rating
61.6

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.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.

Score0.857

Feature contributions

FeatureValueContribution
(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.

Score0.829
Score5
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.