Sample
Buse/66
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0.034 | 0–1; higher is more readable | 26.3Δ 11.1 |
| Dorn | 0.124 | 0–1; higher is more readable | 4.0Δ 11.1 |
| Mi | 0.261 | 0–1; higher is more readable | 13.1Δ 2.0 |
| LLOC | 3 | Logical lines; fewer is more readable | 88.9Δ 73.7 |
| DeepSeek V4 Pro | 17 | 0–20; mean of three runs | 87.4Δ 72.2 |
| GPT-6.1 Sol | 18 | 0–20; mean of three runs | 84.8Δ 69.7 |
| BTTF | 0.135 | 0–1; higher is more readable | 0.0Δ 15.2 |
| Human | 2.6 | 1–5; original rating | 15.2 |
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. | 229.248 | −7.565 |
| 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.697 | −7.045 |
| Source linesThe number of non-empty source lines. | 6 | +2.4 |
Intercept 8.87 + feature contributions = -3.34 (log-odds).
Score = sigmoid(-3.34) = 0.034.
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. | 116 | −1.248 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 5 | +0.859 |
| 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. | 4 | −0.599 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 5.829 | −0.328 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 6 | +0.283 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.117 | −0.192 |
Intercept 0.07 + feature contributions = -1.959 (log-odds).
Score = sigmoid(-1.959) = 0.124.
| Score | 0.261 |
|---|
| Score | 3 |
|---|
Run 1
The code is generally clean and readable, with a logical structure and clear intent. It performs three distinct actions: selecting a row, retrieving a program object, and creating a context menu. Each action is on its own line, which supports good action granularity. Nesting is flat, and the flow is natural. However, the readability is slightly reduced by the long method call to create a context menu, which could be more concise or broken down. Additionally, the use of `getValueAt(row, 1)` assumes knowledge of the table model's column indices, which could be made clearer with a named constant. Overall, the code is straightforward but could benefit from minor refactoring for improved clarity.
Run 2
The code is well-structured and highly readable. It follows a natural logical flow: selecting a table row, retrieving the associated program object, and creating a context menu. Nesting is flat with no conditional or loop complexity. Each line performs a single, clear action (row selection, data retrieval, menu creation). Line length is minimal and variable/method names are descriptive, making intent obvious. The only minor issue is that the long chained call on the last line could potentially be broken up for even greater clarity, but it remains readable at this length.
Run 3
The code is concise, with each line performing a single clear action: selecting a table row, retrieving a value and casting it, and creating a context menu. Structure is logical and linear, with no nesting or ambiguity about intent. Naming is descriptive, though minor clarity could be improved by avoiding magic numbers (row index 1) and perhaps adding a comment or constant for the column. Overall, it reads smoothly and is easy to follow.
Run 1
Code Structure: Three logically ordered statements, clearly separated. Nesting: Completely flat, with no nested control flow. Clarity of intent: Selecting a row, retrieving its Program, and creating a context menu are apparent, though the variable name p, numeric column indices, and boolean arguments lack descriptive context. Code length: Concise, with no unnecessary statements. Action granularity: Each line performs one main action, although the final statement chains several calls. Reading flow: Natural progression from selection to data retrieval to menu creation; the long final line slightly reduces readability.
Run 2
Code Structure: Three logically ordered statements clearly separate selection, program retrieval, and context-menu creation. Nesting: Completely flat, with no nested control flow. Clarity of intent: Method names communicate the operations well, but the variable name 'p', numeric column indices, and boolean arguments lack descriptive context. Code length: Concise, although the menu-creation statement is somewhat long. Action granularity: Each statement performs one main action; nested calls remain manageable. Reading flow: Natural progression from selecting a row to retrieving its program and creating the associated menu.
Run 3
Code Structure: Three logically ordered statements are clearly separated. Nesting: No nested control flow; the code is flat. Clarity of intent: Selecting a row, retrieving its program, and creating a context menu are understandable, though the variable name 'p', numeric column indices, and boolean arguments obscure some details. Code length: Concise, with no unnecessary statements. Action granularity: Each line contains one primary action, although menu creation includes chained and nested method calls. Reading flow: The sequence flows naturally from selection to retrieval to menu creation; the long final line slightly reduces readability.