Sample
Dorn/java/196
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0.034 | 0–1; higher is more readable | 70.5Δ 7.8 |
| Dorn | 0.788 | 0–1; higher is more readable | 76.3Δ 13.6 |
| Mi | 0.487 | 0–1; higher is more readable | 51.3Δ 11.4 |
| LLOC | 6 | Logical lines; fewer is more readable | 72.8Δ 10.2 |
| DeepSeek V4 Pro | 17 | 0–20; mean of three runs | 93.5Δ 30.8 |
| GPT-6.1 Sol | 18 | 0–20; mean of three runs | 93.5Δ 30.8 |
| BTTF | 0.529 | 0–1; higher is more readable | 52.9Δ 9.7 |
| Human | 3.48 | 1–5; original rating | 62.7 |
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. | 272.324 | −8.987 |
| 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.823 | −7.234 |
| Source linesThe number of non-empty source lines. | 10 | +4 |
Intercept 8.87 + feature contributions = -3.351 (log-odds).
Score = sigmoid(-3.351) = 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. | 71 | +0.658 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 11 | +0.647 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 9 | −0.426 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 71 | +0.341 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 9.875 | −0.272 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.108 | −0.106 |
Intercept 0.07 + feature contributions = 1.31 (log-odds).
Score = sigmoid(1.31) = 0.788.
| Score | 0.487 |
|---|
| Score | 6 |
|---|
Run 1
The code is well-structured and readable. It creates a panel, a label, and a text field with clear variable names (pnlName, lblName, txtName). The layout is logical: label west, field center. Nesting is minimal—only one container panel is added. Action granularity is mostly one action per line, except for component creation and addition on the same line, which is acceptable. The comment explains the i18n key purpose. Minor deductions: no explicit variable type for txtName visible (likely a class member), and the comment could be more explanatory. Overall, intent is clear, flow is natural, and length is concise.
Run 2
The code is generally readable, with clear intent and a logical structure. It creates a panel, adds a label and text field using a BorderLayout, and then adds the panel to an edit panel. The nesting is minimal, and each action is on its own line. The variable names are descriptive. Minor deductions: the comment `// i18n[graph.name=Name]` is terse and could be clearer; there is some inconsistent indentation at the start; and the use of `s_stringMgr` relies on external context not shown.
Run 3
The code is well-structured with clear separation between panel creation, label setup, and text field setup. Nesting is minimal and logical. Intent is clear: building a labeled name input field. The code is concise without unnecessary verbosity. Each line generally performs a single action, though some lines combine object creation with panel addition. The reading flow is natural, following a top-to-bottom construction order. The minor indentation inconsistency at the start and the comment referencing i18n slightly disrupt the flow. Variable naming follows conventions and is descriptive. Overall, this is highly readable code with only trivial improvements possible.
Run 1
Code Structure: Logically groups creation and assembly of the name panel. Nesting: Flat, with no nested control flow. Clarity of intent: Descriptive variable names and explicit layout positions make the purpose clear; the internationalization comment explains the label key. Code length: Concise, with no unnecessary statements. Action granularity: Each statement performs one primary action. Reading flow: Naturally progresses from panel creation to adding the label and text field, then attaching the completed panel. Inconsistent indentation and slightly uneven spacing modestly reduce readability.
Run 2
Code Structure: Logically groups panel creation, label setup, text field setup, and attachment to the parent panel. Nesting: Flat, with no nested control flow. Clarity of intent: Descriptive names and explicit BorderLayout positions clearly convey a name-entry UI; the localization comment clarifies the resource key. Code length: Concise, with no unnecessary logic. Action granularity: Each statement performs one straightforward operation. Reading flow: Natural top-to-bottom construction, though inconsistent indentation around the comment slightly disrupts visual consistency.
Run 3
Code Structure: logically groups creation and assembly of a name-entry panel. Nesting: flat, with no nested control flow. Clarity of intent: descriptive component names and explicit layout positions clearly convey a label beside a text field; the internationalization comment adds context. Code length: concise, with no unnecessary statements. Action granularity: each statement performs one clear action. Reading flow: naturally progresses from panel creation to component setup and attachment to the parent. Minor readability issues include inconsistent indentation and reliance on externally defined txtName, pnlEdit, and s_stringMgr.