Sample

Schnappinger/jsweet/def.dom.HTMLMapElement

Human rating uses the original dataset scale.

Human3.93
Lines14

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett0.9650–1; higher is more readable
89.0Δ 29.2
Scalabrino0.8760–1; higher is more readable
83.0Δ 23.3
Dorn0.8380–1; higher is more readable
91.4Δ 31.7
Mi0.8750–1; higher is more readable
99.3Δ 39.6
LLOC4Logical lines; fewer is more readable
87.0Δ 27.2
DeepSeek V4 Pro160–20; mean of three runs
47.4Δ 12.4
GPT-6.1 Sol180–20; mean of three runs
73.8Δ 14.0
BTTF0.7040–1; higher is more readable
82.2Δ 22.4
Human3.931–4; original rating
59.7

Views

Source code

package def.dom; public class HTMLMapElement extends HTMLElement { /** * Retrieves a collection of the area objects defined for the given map object. */ public HTMLAreasCollection areas; /** * Sets or retrieves the name of the object. */ public String name; public static HTMLMapElement prototype; public HTMLMapElement(){} }

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.496−6.744
Source linesThe number of non-empty source lines.14+5.6
Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones.133.98−4.421

Intercept 8.87 + feature contributions = 3.304 (log-odds).
Score = sigmoid(3.304) = 0.965.

Score0.876

Feature contributions

FeatureValueContribution
(log-odds)
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.03+0.649
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.84+0.551
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.15+0.505
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.13.765−0.217
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.83.933+0.11

Intercept 0.07 + feature contributions = 1.64 (log-odds).
Score = sigmoid(1.64) = 0.838.

Score0.875
Score4
Run 1

The code is simple and readable. It has a clear structure: package declaration, class definition, properties, and a constructor. Nesting is minimal, and intent is straightforward—this represents a DOM HTMLMapElement with two properties and a static prototype. The code is concise with no unnecessary complexity. Action granularity is mostly one item per line, and the reading flow is logical. However, a few minor issues prevent a higher score: the static 'prototype' field lacks an explicit type initialization clarity (though it mirrors DOM-style declarations), and the class-level JSDoc comments are brief. Overall, it is highly readable but could benefit from slightly stronger documentation or naming conventions.

Run 2

The code is highly readable due to its simple, flat structure and clear intent. It follows standard Java class conventions with a single inheritance level and no complicated logic. Each property declaration includes a concise Javadoc comment explaining its purpose, which aids clarity. The class is very short and concise, with one action per line. However, minor deductions result from the unusual presence of a static 'prototype' field in Java (likely a port from JavaScript), which could confuse readers, and an empty constructor that adds some clutter. Overall, the reading flow is natural and the code is easy to understand at a glance.

Run 3

The code is concise and well-structured, with clear class inheritance and logical grouping of related fields. It is flat with no nesting, and each field declaration is on its own line with JSDoc comments explaining purpose. The intent is unambiguous: it defines a DOM interface for an HTML map element. The only minor deduction is the inclusion of a prototype field, which may be confusing without context, but overall the code reads naturally and is highly maintainable.

Run 1

Code Structure: A simple, logically organized class groups its fields and constructor without tangled logic. Nesting: Only the class body is present, so nesting is minimal. Clarity of intent: Descriptive class and field names, inheritance, and documentation make the DOM element's purpose clear, though the prototype field is undocumented. Code length: Concise, with no unnecessary implementation. Action granularity: Each declaration occupies its own line; the empty constructor is compact and unambiguous. Reading flow: Package, class declaration, documented fields, static field, and constructor follow a natural sequence. Missing spacing between members and the tightly formatted constructor slightly reduce readability.

Run 2

Code Structure: A straightforward class with logically grouped fields and a constructor. Nesting: Minimal nesting makes it easy to scan. Clarity of intent: Descriptive class and field names, inheritance, and comments clearly convey a DOM map element, though the prototype field is undocumented. Code length: Concise, with no unnecessary logic. Action granularity: Each declaration occupies its own line. Reading flow: Natural top-to-bottom progression, but missing blank lines between members and the tightly formatted empty constructor slightly reduce readability.

Run 3

Code Structure: A simple, logically organized class groups related fields and a constructor. Nesting: No nested control flow; only the class body. Clarity of intent: Descriptive class and field names plus documentation clarify the map element's properties, though prototype and the empty constructor are undocumented. Code length: Concise, with no unnecessary implementation. Action granularity: Each declaration occupies its own line. Reading flow: Fields followed by the constructor provide a natural flow, but missing blank lines between members and compressed constructor formatting slightly reduce readability.