Sample

Schnappinger/jsweet/def.dom.MutationRecord

Human rating uses the original dataset scale.

Human3.95
Lines18

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett0.0070–1; higher is more readable
69.9Δ 0.4
Scalabrino0.8760–1; higher is more readable
83.0Δ 13.6
Dorn0.8210–1; higher is more readable
88.8Δ 19.3
Mi0.6920–1; higher is more readable
82.2Δ 12.7
LLOC11Logical lines; fewer is more readable
70.6Δ 1.2
DeepSeek V4 Pro17.670–20; mean of three runs
83.0Δ 13.5
GPT-6.1 Sol180–20; mean of three runs
73.8Δ 4.3
BTTF0.660–1; higher is more readable
69.0Δ 0.5
Human3.951–4; original rating
69.5

Views

Source code

package def.dom; import def.js.Object; public class MutationRecord extends def.js.Object { public NodeList addedNodes; public java.lang.String attributeName; public java.lang.String attributeNamespace; public Node nextSibling; public java.lang.String oldValue; public Node previousSibling; public NodeList removedNodes; public Node target; public java.lang.String type; public static MutationRecord prototype; public MutationRecord(){} }

Loading feature diagnosis…

Source regions

Feature contributions

Feature contributions

FeatureValueContribution
(log-odds)
Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones.430−14.19
Source linesThe number of non-empty source lines.18+7.2
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.563−6.844

Intercept 8.87 + feature contributions = -4.964 (log-odds).
Score = sigmoid(-4.964) = 0.007.

Score0.876

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.51+1.505
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.0−0.804
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.1+0.398
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.19+0.364
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.066+0.297
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.17.904−0.16
Indentation frequencyHow rapidly indentation changes from line to line.17−0.149

Intercept 0.07 + feature contributions = 1.52 (log-odds).
Score = sigmoid(1.52) = 0.821.

Score0.692
Score11
Run 1

The code is highly readable due to its logical and straightforward structure. It is a simple class with flat nesting, clear intent (representing a DOM MutationRecord), concise length, appropriate action granularity (one field per line), and natural reading flow. Minor deductions for lack of documentation and redundant fully-qualified names like 'java.lang.String'.

Run 2

The code is highly readable. It is a straightforward DOM type definition with clear structure: package declaration, imports, class declaration, fields, static field, and empty constructor are logically ordered. Nesting is minimal with a flat single-class structure. Intent is unambiguous—this is a data class representing a DOM MutationRecord. The code is concise, with each field on its own line, adhering to one-action-per-line. Reading flow is natural, grouping public fields by type and ending with the constructor. Minor deductions for the empty constructor body being on a single line and the less conventional placement of the static prototype field among instance fields, but overall readability is excellent.

Run 3

The code is highly readable. It represents a well-organized class definition with a clear structure: a package declaration, imports, and a class with typed fields. Each field is on its own line, following one-action-per-line granularity, and the fields are logically grouped by type (NodeList, String, Node). The class inherits from def.js.Object, and the constructor is explicit. The only minor drawbacks are the use of fully qualified names like java.lang.String instead of an import, and the public static prototype field which is slightly unusual, but overall the code is concise, flat, and unambiguous.

Run 1

Code Structure: A straightforward class with clearly separated field declarations, though related fields could be grouped more intentionally. Nesting: No nested logic, making the code easy to scan. Clarity of intent: The class and field names clearly describe a DOM mutation record, although the prototype field and empty constructor rely on familiarity with JavaScript bindings. Code length: Concise, with minor clutter from an unused import and fully qualified type names. Action granularity: Each declaration occupies its own line. Reading flow: Natural and consistent overall; spacing in the constructor and separation between instance fields, the static field, and the constructor would improve readability.

Run 2

Code Structure: A straightforward class containing related public fields, a prototype reference, and an empty constructor. Nesting: Flat, with no nested control flow. Clarity of intent: The class and field names clearly describe a DOM mutation record, though the prototype field and empty constructor lack explanatory context. Code length: Concise, with little unnecessary code; the unused import and repeated fully qualified names add minor clutter. Action granularity: Each declaration occupies its own line. Reading flow: Consistent and easy to scan, although spacing between instance fields, the static field, and the constructor would improve visual organization.

Run 3

Code Structure: A simple class with logically grouped fields and a constructor, though the static prototype could be visually separated from instance fields. Nesting: Minimal nesting makes it easy to scan. Clarity of intent: Descriptive field names communicate a DOM mutation record, although its role as a JavaScript binding is implicit. Code length: Concise, with a redundant Object import and repeated fully qualified String types adding minor clutter. Action granularity: Each declaration occupies its own line. Reading flow: Natural top-to-bottom organization, slightly weakened by the tightly formatted empty constructor and lack of spacing between member categories.