Sample

Schnappinger/jsweet/def.dom.KeyAlgorithm#3f2133f2d081

Human rating uses the original dataset scale.

Human3.96
Lines7

Scores

MethodScoreScaleDataset rank
(0–100)
Dorn0.7020–1; higher is more readable
76.2Δ 0.8
Mi0.6240–1; higher is more readable
66.3Δ 10.7
LLOC1Logical lines; fewer is more readable
98.3Δ 21.3
DeepSeek V4 Pro170–20; mean of three runs
66.8Δ 10.2
GPT-6.1 Sol190–20; mean of three runs
92.6Δ 15.5
BTTF0.6950–1; higher is more readable
80.2Δ 3.1
Human3.961–4; original rating
77.1

Views

Source code

package def.dom; @jsweet.lang.Interface public abstract class KeyAlgorithm extends def.js.Object { @jsweet.lang.Optional public 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.57.875+1.214
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.8+0.753
Indentation frequencyHow rapidly indentation changes from line to line.6−0.53
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.6.78−0.315
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.09+0.071

Intercept 0.07 + feature contributions = 0.857 (log-odds).
Score = sigmoid(0.857) = 0.702.

Score0.624
Score1
Run 1

The code is highly readable due to its simple, flat structure with no nesting. Intent is clear: define an abstract class representing a key algorithm with an optional 'name' property. The use of annotations (@Interface, @Optional) and a single public field makes the purpose unambiguous. Code length is minimal and appropriate; there is no unnecessary verbosity. Action granularity is one declaration per line. Reading flow is natural top-to-bottom. Minor deductions for reliance on external annotations and lack of inline documentation explaining domain context.

Run 2

The code is highly readable due to its concise structure and clear intent. It defines a simple interface-like abstract class with an optional string property, using familiar annotations that convey purpose without clutter. The organization is logical—package declaration, interface annotation, class declaration, optional field—all flat and easy to follow. Nesting is minimal, and the reading flow is natural. Code length is appropriate for the task; no unnecessary verbosity. Action granularity is effectively one logical declaration per line, enhancing clarity. The only minor drawback is reliance on framework-specific annotations, which may require prior knowledge, but this does not significantly impact readability for its intended audience.

Run 3

The code is well-structured with a clear package declaration, annotation, and a single abstract class extending a base object. Nesting is minimal. Intent is somewhat clear: define a KeyAlgorithm interface for DOM types. However, without context, the purpose is slightly ambiguous. Length is concise but perhaps too minimal, lacking documentation. Action granularity is good, with one member per line. Reading flow is natural, following standard Java conventions. The use of annotations obscures intent slightly without additional context, but the code remains readable.

Run 1

Code Structure: The package, annotation, class declaration, and field are logically organized. Nesting: Only the necessary class-level nesting is present. Clarity of intent: KeyAlgorithm and its name field clearly describe a small data interface, though understanding the JSweet annotations requires framework knowledge. Code length: The code is concise with no unnecessary implementation. Action granularity: Each declaration and annotation occupies its own line. Reading flow: The top-to-bottom flow is natural; a blank line after the package declaration would slightly improve visual separation.

Run 2

Code Structure: The package, annotation, class, and field are logically organized. Nesting: Only a single class scope is present, keeping nesting minimal. Clarity of intent: KeyAlgorithm clearly represents an algorithm with an optional name, though the JSweet interface annotation on an abstract class requires framework familiarity. Code length: The implementation is concise, with no unnecessary code. Action granularity: Each declaration and annotation occupies its own line. Reading flow: The code reads naturally from package to type to field; a blank line after the package declaration would slightly improve visual separation.

Run 3

Code Structure: The package declaration, class annotation, class definition, and field are logically organized. Nesting: Only the class body is nested, keeping the code easy to scan. Clarity of intent: KeyAlgorithm and its name field clearly describe a small data interface, though understanding the annotations requires familiarity with JSweet. Code length: The code is concise and contains no unnecessary implementation. Action granularity: Each declaration and annotation occupies its own line. Reading flow: The code follows a natural top-to-bottom order; a blank line after the package declaration would slightly improve visual separation.