Sample
Schnappinger/jsweet/def.dom.MSManipulationEvent
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 66.6Δ 2.9 |
| Scalabrino | 0.568 | 0–1; higher is more readable | 16.8Δ 52.7 |
| Dorn | 0.014 | 0–1; higher is more readable | 21.8Δ 47.7 |
| Mi | 0.048 | 0–1; higher is more readable | 5.9Δ 63.5 |
| LLOC | 15 | Logical lines; fewer is more readable | 65.8Δ 3.6 |
| DeepSeek V4 Pro | 12.67 | 0–20; mean of three runs | 18.8Δ 50.7 |
| GPT-6.1 Sol | 16.33 | 0–20; mean of three runs | 45.9Δ 23.6 |
| BTTF | 0.508 | 0–1; higher is more readable | 45.2Δ 24.3 |
| Human | 3.95 | 1–4; original rating | 69.5 |
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. | 525.04 | −17.326 |
| Source linesThe number of non-empty source lines. | 19 | +7.6 |
| 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.957 | −7.436 |
Intercept 8.87 + feature contributions = -8.292 (log-odds).
Score = sigmoid(-8.292) = 0.
| Score | 0.568 |
|---|
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. | 180.95 | −3.999 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 0 | −0.804 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 1 | −0.703 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.035 | +0.602 |
| 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. | 20 | +0.328 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 18.824 | −0.147 |
Intercept 0.07 + feature contributions = -4.255 (log-odds).
Score = sigmoid(-4.255) = 0.014.
| Score | 0.048 |
|---|
| Score | 15 |
|---|
Run 1
The code is a simple data class, making its structure flat and readable. However, it lacks detail and clarity in intent. The constructor is empty, and without documentation or type definitions, the meaning of the many numeric state constants is ambiguous. The method signature for 'initMSManipulationEvent' is very long, reducing readability. Public fields without encapsulation lower the intent and maintainability, leaving the reader guessing about how the event should be used. Action granularity is acceptable as fields are declared one per line. Reading flow is natural for a class declaration, but the lack of descriptive comments or meaningful naming for constants and fields makes it harder to understand.
Run 2
The code is generally readable but has notable issues. Structure is logical as a single class definition, but the flat listing of many public properties and methods without grouping or documentation reduces clarity. Action granularity is good—one field or method per line. The method signature is very long but acceptable. However, the lack of comments, context, or explanation for 'MS_MANIPULATION_STATE_*' fields makes intent ambiguous. The constructor is empty, which is fine but unexplained. The 'native' keyword and 'prototype' field may confuse readers unfamiliar with this DOM API pattern. Overall, it reads like a generated or boilerplate class, which keeps nesting flat and concise, but readability suffers from missing context and organization.
Run 3
The code is structurally simple but has several readability issues. The class consists of public fields and a single method with a long parameter list, which harms clarity and action granularity. Field names are reasonably descriptive, but constants (MS_MANIPULATION_STATE_*) are not declared final/static, making intent ambiguous. The method signature is very long, making it hard to parse and read. The class is flat, which is good, but the lack of grouping or documentation reduces clarity. Overall, the code is understandable for a domain expert but not highly readable due to verbosity and unclear constant modifier choices.
Run 1
Code Structure: A straightforward class declaration, though grouping state constants separately from instance fields would improve organization. Nesting: No nested logic, making the code easy to scan. Clarity of intent: Descriptive event and field names communicate purpose, but the uppercase state fields appear to be constants despite lacking static/final modifiers, and the empty constructor is unexplained. Code length: Concise, with little unnecessary content; the initializer signature is overly long on one line. Action granularity: Each declaration occupies its own line, clearly separating members. Reading flow: Generally natural, but missing blank lines between member groups and minimal constructor spacing reduce readability.
Run 2
Code Structure: A straightforward event class, though mixing state fields, an initializer, constants, and a prototype without visual grouping weakens organization. Nesting: Essentially flat, with no nested control flow. Clarity of intent: Descriptive event and field names convey purpose, but the uppercase state fields appear to be constants despite lacking static/final modifiers, and the native initializer is undocumented. Code length: Concise overall, although the initializer signature is long. Action granularity: Each declaration occupies its own line, making individual members easy to identify. Reading flow: Generally natural, but blank lines between member categories and conventional modifier ordering would improve scanning.
Run 3
Code Structure: The class is simple and logically organized, though placing the initializer between instance fields and state constants weakens grouping. Nesting: There is no deep nesting, making the declaration easy to scan. Clarity of intent: Descriptive field and constant names convey manipulation-event state, but the undocumented numeric values and empty constructor provide limited context. Code length: The code is concise, although the initializer signature is overly long for one line. Action granularity: Each declaration occupies its own line, with no bundled actions. Reading flow: Consistent indentation supports readability, but missing blank lines between logical groups, unconventional modifier order, and cramped constructor formatting slightly disrupt the flow.