Sample
Schnappinger/jsweet/def.dom.MSWebViewSettings
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0.5 | 0–1; higher is more readable | 78.9Δ 27.6 |
| Scalabrino | 0.841 | 0–1; higher is more readable | 72.3Δ 20.9 |
| Dorn | 0.794 | 0–1; higher is more readable | 84.2Δ 32.8 |
| Mi | 0.605 | 0–1; higher is more readable | 63.7Δ 12.4 |
| LLOC | 4 | Logical lines; fewer is more readable | 87.0Δ 35.6 |
| DeepSeek V4 Pro | 17 | 0–20; mean of three runs | 66.8Δ 15.5 |
| GPT-6.1 Sol | 18 | 0–20; mean of three runs | 73.8Δ 22.4 |
| BTTF | 0.609 | 0–1; higher is more readable | 58.4Δ 7.1 |
| Human | 3.9 | 1–4; original rating | 51.3 |
Views
Loading feature diagnosis…
Source regions
Feature contributions
Feature contributions
| Feature | Value | Contribution (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.719 | −7.078 |
| Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones. | 151.267 | −4.992 |
| Source linesThe number of non-empty source lines. | 8 | +3.2 |
Intercept 8.87 + feature contributions = 0 (log-odds).
Score = sigmoid(0) = 0.5.
| Score | 0.841 |
|---|
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. | 54 | +1.378 |
| 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. | 9 | +0.718 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 7 | −0.495 |
| 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.058 | +0.383 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 7.855 | −0.3 |
Intercept 0.07 + feature contributions = 1.347 (log-odds).
Score = sigmoid(1.347) = 0.794.
| Score | 0.605 |
|---|
| Score | 4 |
|---|
Run 1
The code is clear and concise. Structure is simple with a package declaration, class definition, and member fields. Intent is obvious: a settings class for a WebView component. Nesting is minimal; each property is declared on its own line. Naming is descriptive and follows typical Java conventions. Some minor deductions: the static prototype field is ambiguous without context, the constructor is empty and adds little value, and the class appears to be a plain data holder that could benefit from documentation or access modifiers. Overall, it is highly readable but slightly sparse in contextual information.
Run 2
The code is highly readable due to its simple, well-structured format. It is a small class definition with a logical package declaration, class declaration, and three public fields. Nesting is minimal, and the intent is clear: define settings for a web view. The code is concise, with each field on its own line, and the reading flow is natural—package, class, fields, constructor. The only minor deductions are for the empty constructor, which could be removed, and the lack of documentation, which slightly reduces clarity for unfamiliar readers.
Run 3
The code is highly readable due to its simple, flat structure with no nested blocks. The class name and package declaration clearly convey intent: this is a settings model for a web view. Properties are declared concisely with explicit Boolean types, and each member occupies its own line, maintaining one-action-per-line granularity. The constructor is minimal and empty. The reading flow is natural: package, imports, class declaration, fields, static prototype, constructor. Only minor deductions for lack of JSDoc/comment documentation explaining the class purpose and fields, and the implicit dependency on external `def.js.Object` base class.
Run 1
Code Structure: A straightforward class groups two settings, a prototype field, and a constructor logically. Nesting: Only the class scope is present, making the code easy to scan. Clarity of intent: The class and Boolean field names clearly describe web-view settings, though the prototype field's role requires familiarity with JavaScript bindings. Code length: Very concise, with no unnecessary logic. Action granularity: Each declaration occupies its own line. Reading flow: The package, class, fields, and constructor follow a natural order, but blank lines between sections and spacing in the empty constructor would improve readability.
Run 2
Code Structure: The package, class, fields, and constructor are logically organized. Nesting: Only a single class scope and an empty constructor keep nesting minimal. Clarity of intent: The class name and descriptive Boolean fields clearly identify web-view settings, though the prototype field and empty constructor rely on external context. Code length: The code is concise without unnecessary logic. Action granularity: Each declaration occupies its own line. Reading flow: The order is natural and easy to follow, but blank lines between sections and conventional spacing around the constructor braces would improve readability.
Run 3
Code Structure: A simple class with logically grouped fields and a constructor. Nesting: Only the class scope, with no nested control flow. Clarity of intent: The class and Boolean field names clearly describe WebView settings; the prototype field suggests a JavaScript binding, though its role is not explained. Code length: Very concise, with no unnecessary code. Action granularity: Each declaration appears on its own line. Reading flow: Natural and easy to follow, although blank lines separating the package, fields, and constructor, plus conventional constructor spacing, would improve readability.