Sample
Buse/45
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0.037 | 0–1; higher is more readable | 28.3Δ 48.5 |
| Dorn | 0.308 | 0–1; higher is more readable | 17.2Δ 59.6 |
| Mi | 0.616 | 0–1; higher is more readable | 58.6Δ 18.2 |
| LLOC | 3 | Logical lines; fewer is more readable | 88.9Δ 12.1 |
| DeepSeek V4 Pro | 17.33 | 0–20; mean of three runs | 92.4Δ 15.7 |
| GPT-6.1 Sol | 19 | 0–20; mean of three runs | 96.0Δ 19.2 |
| BTTF | 0.417 | 0–1; higher is more readable | 25.3Δ 51.5 |
| Human | 3.84 | 1–5; original rating | 76.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.809 | −7.213 |
| Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones. | 197.654 | −6.523 |
| Source linesThe number of non-empty source lines. | 4 | +1.6 |
Intercept 8.87 + feature contributions = -3.266 (log-odds).
Score = sigmoid(-3.266) = 0.037.
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 4 | +0.895 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 0 | −0.804 |
| 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. | 97 | −0.443 |
| 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. | 3.796 | −0.357 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.083 | +0.135 |
Intercept 0.07 + feature contributions = -0.809 (log-odds).
Score = sigmoid(-0.809) = 0.308.
| Score | 0.616 |
|---|
| Score | 3 |
|---|
Run 1
The code is highly readable. It has a clear structure with logical grouping of related UI components (width and height input fields). Nesting is minimal and flat. The intent is unambiguous; each variable is named descriptively. The code length is concise, without unnecessary verbosity. Each line performs a single action, and the reading flow is natural — from message retrieval to field initialization. Minor deductions only for potential missing context (e.g., where these fields are used) and possible duplication if similar text fields are repeated elsewhere.
Run 2
The code is highly readable. It uses a logical structure with clear, descriptive variable names (inputWidth, inputHeight) and constants (DEFAULT_WIDTH, DEFAULT_HEIGHT) that convey intent. The nesting is flat, with no conditional or loop complexity. Clarity of intent is strong—each variable's purpose is immediately obvious. The code is concise, with no unnecessary lines or verbosity. Action granularity is excellent, with one action per line: constructing each JTextField and initializing each variable. The reading flow is natural, following a top-to-bottom logical progression. Minor deductions: the variable `heightText` is declared but not used in the provided snippet, which could introduce slight ambiguity, and the alignment/indentation could be slightly more consistent.
Run 3
The code is highly readable. It clearly separates concerns by declaring a message string and two text fields with initial values and column sizes. Each variable is declared on its own line, following the principle of one action per line. Intent is clear: the variables are for user input fields for width and height. The use of `final` and constants like `DEFAULT_WIDTH` and `COLUMNS` improves clarity and communicates immutability and intent. Structure is logical, with no unnecessary nesting or complexity. The only minor drawback is the lack of surrounding context, but as an isolated snippet, it is concise and well-organized.
Run 1
Code Structure: Simple, logically grouped declarations with whitespace separating the label from the input fields. Nesting: None, so the snippet is easy to scan. Clarity of intent: Descriptive variable names and constants clearly identify height text and default dimension inputs, although heightText is not used within the snippet. Code length: Concise, with no unnecessary statements. Action granularity: Each line declares and initializes one variable. Reading flow: Natural and consistent, with parallel width and height field initialization.
Run 2
Code Structure: Logically groups a localized height label with related width and height input fields. Nesting: Completely flat, with no nested control flow. Clarity of intent: Descriptive names and constants make field initialization clear, although heightText is not used in this snippet. Code length: Concise, with no unnecessary statements. Action granularity: Each line performs a single declaration and initialization. Reading flow: Consistent formatting and parallel width/height declarations make the code easy to scan.
Run 3
Code Structure: Logically organized, with the height label followed by related input fields. Nesting: Completely flat and easy to scan. Clarity of intent: Descriptive names and constants clearly convey initialization of width and height text fields, though heightText is not used in the shown snippet. Code length: Concise, with no unnecessary verbosity. Action granularity: Each line performs one declaration and initialization. Reading flow: Natural and consistent, with a blank line separating label text from input components.