Sample

Schnappinger/jsweet/def.dom.SVGAnimatedBoolean

Human rating uses the original dataset scale.

Human3.49
Lines8

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett0.5560–1; higher is more readable
80.9Δ 41.3
Scalabrino0.830–1; higher is more readable
70.5Δ 30.9
Dorn0.7780–1; higher is more readable
80.2Δ 40.6
Mi0.6570–1; higher is more readable
75.9Δ 36.3
LLOC4Logical lines; fewer is more readable
87.0Δ 47.4
DeepSeek V4 Pro180–20; mean of three runs
91.4Δ 51.8
GPT-6.1 Sol180–20; mean of three runs
73.8Δ 34.2
BTTF0.6440–1; higher is more readable
66.0Δ 26.4
Human3.491–4; original rating
39.6

Views

Source code

package def.dom; public class SVGAnimatedBoolean extends def.js.Object { public Boolean animVal; public Boolean baseVal; public static SVGAnimatedBoolean prototype; public SVGAnimatedBoolean(){} }

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.568−6.852
Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones.151.267−4.992
Source linesThe number of non-empty source lines.8+3.2

Intercept 8.87 + feature contributions = 0.227 (log-odds).
Score = sigmoid(0.227) = 0.556.

Score0.83

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.54.889+1.34
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.063+0.329
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.7.857−0.3

Intercept 0.07 + feature contributions = 1.255 (log-odds).
Score = sigmoid(1.255) = 0.778.

Score0.657
Score4
Run 1

The code is highly readable. It has a clear, logical structure with a single class definition containing two public fields, a static field, and a constructor. Nesting is minimal. Intent is obvious: this is a DOM type wrapper for an animated boolean. Length is concise and appropriate. Each field declaration is on its own line, preserving action granularity. Reading flow is natural and conventional for a simple data holder class.

Run 2

The code is highly readable. It has a clear, logical structure: a package declaration, class definition, two public fields, a static prototype field, and a constructor. Nesting is minimal, with no deep indentation or conditional blocks. The intent is straightforward - defining an SVG animated boolean type with animVal, baseVal, and a prototype reference. The code is concise; it only contains what is necessary. Each declaration is on its own line, promoting clear action granularity. Reading flow is natural from top to bottom, mirroring standard Java class structure.

Run 3

The code is highly readable. It's a simple class definition with a clear structure: package declaration, imports (implicitly), class declaration, two public fields, a static prototype field, and an empty constructor. Nesting is minimal and flat. Each field is declared on its own line, following one-action-per-line. Names are descriptive and follow Java conventions (camelCase for fields, PascalCase for class). The intent — defining a DOM interface wrapper — is immediately clear. It's concise with no unnecessary boilerplate beyond the empty constructor, which is acceptable for a placeholder or interface-like class. Reading flow is natural, with fields grouped logically. Minor deductions: lack of documentation or comments, and the presence of a `prototype` field may seem odd to Java-only readers. Overall, it's straightforward and easy to understand.

Run 1

Code Structure: A simple class with logically grouped fields and a constructor. Nesting: Only one class scope, with no complex nesting. Clarity of intent: The class and field names convey an animated SVG boolean wrapper, though the prototype field and empty constructor rely on familiarity with JavaScript bindings. Code length: Concise, with no unnecessary logic. Action granularity: Each declaration occupies its own line. Reading flow: Straightforward from package to class, fields, and constructor; blank lines between sections and conventional constructor spacing would improve readability.

Run 2

Code Structure: A straightforward class groups two value fields, a prototype field, and a constructor logically. Nesting: Only the class scope is present, so nesting is minimal. Clarity of intent: The class and field names communicate an animated Boolean DOM binding, though the prototype field and empty constructor rely on familiarity with binding conventions. Code length: Very concise, with no unnecessary logic. Action granularity: Each declaration occupies its own line. Reading flow: The package, class, fields, and constructor follow a natural order; missing spacing and blank lines slightly reduce visual readability.

Run 3

Code Structure: A straightforward class with logically grouped fields and a constructor. Nesting: Minimal nesting makes it easy to scan. Clarity of intent: The class and field names communicate an SVG animated boolean wrapper, although animVal and baseVal assume familiarity with SVG terminology, and prototype may be unclear without binding context. Code length: Very concise, with no unnecessary implementation. Action granularity: Each declaration occupies its own line. Reading flow: Natural package-to-class-to-members progression, but missing blank lines and the tightly formatted empty constructor slightly reduce readability.