Sample

Schnappinger/jsweet/def.dom.SVGAnimatedString

Human rating uses the original dataset scale.

Human3.9
Lines8

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett0.5430–1; higher is more readable
80.3Δ 28.9
Scalabrino0.8410–1; higher is more readable
72.3Δ 20.9
Dorn0.7830–1; higher is more readable
81.2Δ 29.9
Mi0.6640–1; higher is more readable
77.2Δ 25.9
LLOC4Logical lines; fewer is more readable
87.0Δ 35.6
DeepSeek V4 Pro17.330–20; mean of three runs
73.9Δ 22.6
GPT-6.1 Sol180–20; mean of three runs
73.8Δ 22.4
BTTF0.6480–1; higher is more readable
67.0Δ 15.7
Human3.91–4; original rating
51.3

Views

Source code

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

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.604−6.906
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.173 (log-odds).
Score = sigmoid(0.173) = 0.543.

Score0.841

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.53.889+1.383
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.065+0.313
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.7.891−0.3

Intercept 0.07 + feature contributions = 1.283 (log-odds).
Score = sigmoid(1.283) = 0.783.

Score0.664
Score4
Run 1

The code is highly readable due to its simple, flat structure and clear intent. It represents a straightforward class definition with two public fields, a static prototype field, and an empty constructor, with no nesting or complex logic. Each field is declared on its own line, adhering to one action per line. The class and package names clearly indicate this is a DOM-related type definition. Minor deductions: the empty constructor adds slight noise, and the `prototype` field is redundant in modern JavaScript/TypeScript definitions, but these are minor and do not significantly impact clarity.

Run 2

The code is highly readable due to its clear, conventional structure. It is a simple class declaration with a logical package and import organization. Nesting is minimal, with only a single class block. Intent is obvious: it defines an SVGAnimatedString type with animVal, baseVal, and a static prototype. Code length is concise and appropriate for the task. Action granularity follows Java standards, with one field declaration per line. Reading flow is natural, progressing from package to class to fields to constructor. Minor deductions: the empty constructor is arguably redundant but acceptable for clarity or framework requirements, and the 'prototype' field lacks an initializer, which may be intentional but is slightly ambiguous.

Run 3

The code is highly readable. It is a simple, well-structured Java class with a clear single responsibility: representing an SVG animated string. The structure is logical, with a package declaration, class declaration, and field declarations in a natural order. There is no nesting, and the intent is unambiguous. The code is concise and contains no unnecessary elements (e.g., no extra methods or comments). Each field is declared on its own line, maintaining action granularity. The reading flow is natural, following a top-down order from package to class to fields to constructor. Minor deductions: the static 'prototype' field is unclear without additional context and might benefit from a comment or different naming, and the empty constructor could be omitted in some style guides. Overall, it is an exceptionally clean example of a simple domain class.

Run 1

Code Structure: The class is logically organized, with the package, declaration, fields, and constructor in conventional order. Nesting: Minimal nesting makes it easy to scan. Clarity of intent: The class and field names convey an SVG animated-string binding, although the roles of animVal, baseVal, and prototype are not documented. Code length: Very concise, with no unnecessary logic. Action granularity: Each declaration occupies its own line. Reading flow: Natural and straightforward, but blank lines between sections and conventional spacing in the empty constructor would improve presentation.

Run 2

Code Structure: The package declaration and class with its fields and constructor are logically organized. Nesting: Only the class scope is present, making the code easy to scan. Clarity of intent: The class name and fields suggest an SVG animated-string binding, although animVal and baseVal may be unclear without domain knowledge. Code length: The implementation is concise with no unnecessary code. Action granularity: Each declaration occupies its own line. Reading flow: The sequence is natural, but blank lines between the package and class and spacing in the empty constructor would improve presentation.

Run 3

Code Structure: A simple, logically organized class with fields followed by its constructor. Nesting: Minimal nesting makes it easy to scan. Clarity of intent: The class and field names convey an SVG animated-string binding, though animVal, baseVal, and prototype rely on familiarity with the DOM API. Code length: Concise, with no unnecessary implementation. Action granularity: Each declaration occupies its own line. Reading flow: Natural top-to-bottom organization, slightly weakened by the absence of blank lines between the package, class, fields, and constructor, and by the tightly formatted empty constructor.