Sample
Schnappinger/jsweet/def.dom.HTMLBodyElement
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 10.0Δ 9.4 |
| Scalabrino | 0.12 | 0–1; higher is more readable | 0.7Δ 0.0 |
| Dorn | 0.041 | 0–1; higher is more readable | 27.4Δ 26.7 |
| Mi | 0.008 | 0–1; higher is more readable | 2.3Δ 1.7 |
| LLOC | 95 | Logical lines; fewer is more readable | 25.7Δ 25.1 |
| DeepSeek V4 Pro | 4 | 0–20; mean of three runs | 0.5Δ 0.2 |
| GPT-6.1 Sol | 12 | 0–20; mean of three runs | 5.6Δ 5.0 |
| BTTF | 0.329 | 0–1; higher is more readable | 24.8Δ 24.1 |
| Human | 1 | 1–4; original rating | 0.7 |
Views
Loading feature diagnosis…
Source regions
Feature contributions
Feature contributions
| Feature | Value | Contribution (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. | 20737.291 | −684.331 |
| Source linesThe number of non-empty source lines. | 151 | +60.4 |
| 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.799 | −7.198 |
Intercept 8.87 + feature contributions = -622.258 (log-odds).
Score = sigmoid(-622.258) = 0.
| Score | 0.12 |
|---|
Feature contributions
| Feature | Value | Contribution (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. | 195.993 | −4.636 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 150 | +4.451 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 152 | −4.346 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 150.914 | +1.7 |
| 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 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.095 | +0.019 |
Intercept 0.07 + feature contributions = -3.149 (log-odds).
Score = sigmoid(-3.149) = 0.041.
| Score | 0.008 |
|---|
| Score | 95 |
|---|
Run 1
This code is a machine-generated DOM binding for HTMLBodyElement and exhibits poor readability. The structure is flat but extremely repetitive, with dozens of overloaded addEventListener methods that obscure the class's intent. Many methods have misleading, auto-generated names like 'addEventListenerListenerMSGestureEventAny'. The parameter of type MSContentZoom is used repeatedly for unrelated event types, adding confusion. Imports are verbose and mixed. There is no meaningful nesting, but the lack of abstraction and organization makes it feel tangled. Reading flow is disorganized: related methods are scattered, and the sheer volume of repetitive signatures overwhelms the reader. While each line represents a single action, the action is often unclear due to naming. Overall, it is technically simple but practically unreadable for a human.
Run 2
This is auto-generated definition code with very low readability. The class is a flat, massive wall of method overloads and fields with no logical grouping, comments, or whitespace organization. Nesting is minimal but only because there is no logic—just declarations. Intent is obscured by repetitive, cryptic method names like 'addEventListenerListenerMSGestureEventAny' and inconsistent parameter typing (mixing MSContentZoom with named StringTypes). Code length is excessively long and redundant; the same event listener patterns are repeated dozens of times with only minor type changes. Action granularity is technically one declaration per line but offers no meaningful separation. Reading flow is disorienting due to alphabetical-ish but scattered ordering, duplicated overloads, and no discernible structure. While generated wrappers are often inherently verbose, this lacks even basic grouping or documentation that would aid a human reader.
Run 3
This is a generated DOM binding class, and it scores very poorly on readability. The structure is monolithic: a single class contains dozens of near-identical overloaded 'addEventListener' methods with no grouping or separation. There is essentially zero nesting, but clarity of intent is severely harmed by repeated verbose signatures and confusing method names like 'addEventListenerListenerMSGestureEventAny' that blur the distinction between event types. The code is unnecessarily long due to duplicated parameter lists, and action granularity is not relevant since each line is a single declaration but extremely long and impenetrable. Reading flow is disorganized; the event types are scattered and non-alphabetical, and the two overload sets (with and without useCapture) are interleaved arbitrarily. While generated code is not meant to be read like hand-written code, by the stated criteria this is extremely difficult for a human to scan, understand, or maintain.
Run 1
1. Code Structure: Imports, fields, and methods are broadly organized, but the constructor and prototype interrupt the overload declarations, and related overloads are separated. 2. Nesting: Entirely flat declarations with no complex control flow, making individual members easy to follow. 3. Clarity of intent: HTMLBodyElement and event names convey a DOM binding, but verbose generated method names, broad Object types, and unexplained MSContentZoom parameters obscure details. 4. Code length: Numerous repetitive overloads and fully qualified types create substantial visual bulk, though some repetition serves the binding API. 5. Action granularity: Each field or method occupies its own declaration, with annotations on separate lines; however, long signatures are not wrapped. 6. Reading flow: Consistent formatting helps, but sparse spacing, missing documentation, and interleaved event categories make scanning and comparing overloads difficult.
Run 2
Code Structure: Imports, fields, and methods have recognizable organization, but prototype and constructor declarations interrupt the listener overloads. Nesting: Entirely flat declarations make navigation straightforward. Clarity of intent: The class clearly represents an HTML body DOM binding, but verbose generated method names, broad Object types, and repeated MSContentZoom parameters for disparate event types obscure details. Code length: Numerous overloads may be required for interoperability, yet repetition and fully qualified types make the class visually bulky. Action granularity: Each field or method declaration occupies its own line; there are no compound operations. Reading flow: Consistent declaration patterns help scanning, but long unwrapped signatures, absent section spacing or documentation, and separation of related overloads force readers to search across large blocks.
Run 3
1. Code Structure: Imports, fields, and methods have a recognizable organization, but the constructor and prototype interrupt the overload listings, and related overloads are separated. 2. Nesting: Completely flat declarations within one class make the code easy to navigate structurally. 3. Clarity of intent: HTMLBodyElement and event names convey a DOM binding's purpose, but verbose generated method names, broad Object types, and unexplained MSContentZoom parameters obscure details. 4. Code length: Numerous repetitive overloads and fully qualified types make this declaration-heavy API lengthy and visually noisy, although some repetition serves binding requirements. 5. Action granularity: Each field or method declaration occupies its own line; there are no compound operations. However, long signatures hinder scanning. 6. Reading flow: Consistent formatting and repeated patterns help predictability, but minimal whitespace, interleaved event categories, and distant overload pairs make finding specific members harder.