Sample

Schnappinger/jsweet/def.dom.HTMLUListElement

Human rating uses the original dataset scale.

Human4
Lines8

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett0.6730–1; higher is more readable
82.3Δ 14.1
Scalabrino0.8530–1; higher is more readable
76.7Δ 19.7
Dorn0.8160–1; higher is more readable
87.5Δ 8.9
Mi0.6930–1; higher is more readable
82.5Δ 13.9
LLOC4Logical lines; fewer is more readable
87.0Δ 9.4
DeepSeek V4 Pro180–20; mean of three runs
91.4Δ 5.0
GPT-6.1 Sol180–20; mean of three runs
73.8Δ 22.6
BTTF0.6830–1; higher is more readable
74.9Δ 21.5
Human41–4; original rating
96.4

Views

Source code

package def.dom; public class HTMLUListElement extends HTMLElement { public Boolean compact; public String type; public static HTMLUListElement prototype; public HTMLUListElement(){} }

Loading feature diagnosis…

Source regions

Feature contributions

Feature contributions

FeatureValueContribution
(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.617−6.925
Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones.133.98−4.421
Source linesThe number of non-empty source lines.8+3.2

Intercept 8.87 + feature contributions = 0.723 (log-odds).
Score = sigmoid(0.723) = 0.673.

Score0.853

Feature contributions

FeatureValueContribution
(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.50.889+1.51
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.0−0.804
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.9+0.718
Indentation frequencyHow rapidly indentation changes from line to line.7−0.495
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.1+0.398
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.057+0.391
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.7.827−0.3

Intercept 0.07 + feature contributions = 1.487 (log-odds).
Score = sigmoid(1.487) = 0.816.

Score0.693
Score4
Run 1

The code is highly readable. It follows a clear and logical structure with a simple package declaration, a single public class, and well-organized member fields separated from constructors. Nesting is essentially flat, with only the class scope. The intent is unambiguous: it defines an HTML unordered list element with specific properties and a static prototype. The code is concise, containing only the necessary members and a no-argument constructor. Each declaration is on its own line, maintaining proper action granularity. Reading flow is natural, as fields are listed first, followed by the constructor, which aligns with typical Java conventions. The only minor deduction is from the unusual `Boolean` wrapper type instead of the primitive `boolean` and the slightly unconventional `type` field name, which could imply a string type but is declared as `String`.

Run 2

The code is a clean, minimal class definition. Structure is logical: package, class declaration, fields, constructor. Nesting is flat with no control flow. Intent is clear—it defines an HTMLUListElement with two properties, a prototype, and an empty constructor. Length is appropriately concise for a DOM interface stub. Each field is on its own line, maintaining good action granularity. Reading flow is natural and consistent, though the empty constructor adds slight redundancy; removing it would improve conciseness without affecting clarity. Overall, highly readable.

Run 3

The code is highly readable. It follows a clear, logical structure for a simple DOM class definition: package declaration, class declaration, fields, and constructor. There is no nesting, making the flat structure easy to follow. Intent is unambiguous—it defines an HTML unordered list element with two properties and a static prototype. The code is concise, with each field on its own line, adhering to good action granularity. Reading flow is natural, progressing from class header to members. Minor deductions are for the non-JavaScript/TypeScript syntax (e.g., `Boolean` vs `boolean`, `String` vs `string`) and missing access modifiers/type hints, which may slightly reduce clarity for some readers. Overall, it is nearly perfect for its purpose.

Run 1

Code Structure: A straightforward class declaration logically groups its fields and constructor. Nesting: Only one class level, with no nested control flow. Clarity of intent: The class name and HTMLElement inheritance clearly identify a DOM unordered-list element, although compact, type, and prototype lack explanatory context. Code length: Very concise, with no unnecessary implementation. Action granularity: Each field declaration occupies its own line; the inline empty constructor remains easy to understand. Reading flow: Package, class, fields, and constructor appear in a natural order. Missing blank lines and cramped constructor formatting slightly reduce readability.

Run 2

Code Structure: The package, class, fields, and constructor follow a simple, logical organization. Nesting: Only one class-level scope is present, with no nested control flow. Clarity of intent: The class name and inheritance clearly identify an HTML unordered-list element, though the public fields and prototype lack context. Code length: The code is concise, with no unnecessary logic. Action granularity: Each declaration occupies its own line. Reading flow: The declaration order is natural and easy to scan, although spacing around the empty constructor and blank lines between sections would improve presentation.

Run 3

Code Structure: Logically organized as a small class with fields followed by a constructor. Nesting: Minimal, with no nested control flow. Clarity of intent: The class name and inheritance clearly identify an HTML unordered-list element, though compact, type, and prototype rely on familiarity with DOM conventions. Code length: Concise with no unnecessary implementation. Action granularity: Each declaration occupies its own line. Reading flow: Natural and straightforward, but a blank line after the package declaration and spacing in the empty constructor would improve presentation.