Sample

Schnappinger/jsweet/def.dom.KeyAlgorithm#12cf543952c2

Human rating uses the original dataset scale.

Human3.97
Lines10

Scores

MethodScoreScaleDataset rank
(0–100)
Dorn0.6830–1; higher is more readable
73.6Δ 10.6
Mi0.6620–1; higher is more readable
76.2Δ 7.9
LLOC1Logical lines; fewer is more readable
98.3Δ 14.2
DeepSeek V4 Pro180–20; mean of three runs
91.4Δ 7.3
GPT-6.1 Sol190–20; mean of three runs
92.6Δ 8.4
BTTF0.7520–1; higher is more readable
91.1Δ 6.9
Human3.971–4; original rating
84.2

Views

Source code

package def.dom; import def.js.Object; @jsweet.lang.Interface public abstract class KeyAlgorithm extends def.js.Object { @jsweet.lang.Optional public java.lang.String name; }

Loading feature diagnosis…

Source regions

Feature contributions

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.58+1.209
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.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
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.9.576−0.276
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.102−0.052

Intercept 0.07 + feature contributions = 0.765 (log-odds).
Score = sigmoid(0.765) = 0.683.

Score0.662
Score1
Run 1

The code demonstrates excellent readability through clear structure and minimal complexity. It follows a single-purpose pattern with an abstract interface class extending a base Object. Nesting is flat (one level), and intent is unambiguous: defining a KeyAlgorithm interface with an optional 'name' field. Length is concise and appropriate. Each declaration occupies its own line, respecting action granularity. Reading flow follows natural Java/TypeScript convention: package, imports, annotation, class declaration, optional field, closing brace. Minor deductions: lack of Javadoc for the class purpose would slightly improve clarity for future maintainers, but this does not materially impact readability.

Run 2

The code is highly readable: it is a concise, well-structured TypeScript/Java interface definition with clear imports, minimal nesting, and straightforward intent. Each declaration occupies its own line, following a natural top-to-bottom flow. The only minor deductions are due to the somewhat verbose package/import structure and the abstract class wrapper, but these are idiomatic to the language and environment.

Run 3

The code is highly readable. It is a short, clear class definition with a single optional field, making the structure logical and easy to parse. Nesting is minimal, with only one package and class level, which keeps the reading flow natural. The intent—a KeyAlgorithm interface holding an optional name—is unambiguous, and the code length is concise with no unnecessary methods or logic. Action granularity is fine, as each annotation and field declaration stands alone. The only minor issue is the repetitive use of fully qualified names like 'java.lang.String' instead of importing, which slightly interrupts visual flow but does not harm overall clarity.

Run 1

Code Structure: Clearly organized package, import, class annotation, and field declaration. Nesting: Minimal, with only one class-level scope. Clarity of intent: KeyAlgorithm and its optional name field communicate a simple data interface, although the abstract-class representation relies on familiarity with JSweet. Code length: Very concise; the unused Object import and fully qualified types add slight redundancy. Action granularity: Each declaration and annotation occupies its own line. Reading flow: Natural top-to-bottom progression with consistent formatting.

Run 2

Code Structure: Logically organized into package, import, class annotation, and field declaration. Nesting: Minimal, with only a single class scope. Clarity of intent: The class and field names clearly represent a key algorithm with an optional name; annotations convey its interface-like role. Code length: Very concise, though the unused Object import and fully qualified type names add minor clutter. Action granularity: Each declaration and annotation occupies its own line. Reading flow: Natural top-to-bottom progression with appropriate spacing.

Run 3

Code Structure: Logically organized into a package, import, class annotation, and single field. Nesting: Minimal, with only a class body. Clarity of intent: KeyAlgorithm and name clearly represent an algorithm descriptor, while annotations indicate interface semantics and an optional property. Code length: Very concise, though the unused Object import and fully qualified types add minor clutter. Action granularity: Each declaration and annotation occupies its own line. Reading flow: Natural top-to-bottom progression with consistent formatting.