Sample
Schnappinger/jsweet/def.dom.WebGLObject
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0.717 | 0–1; higher is more readable | 83.6Δ 14.1 |
| Scalabrino | 0.913 | 0–1; higher is more readable | 92.8Δ 23.3 |
| Dorn | 0.783 | 0–1; higher is more readable | 81.5Δ 12.0 |
| Mi | 0.691 | 0–1; higher is more readable | 81.8Δ 12.4 |
| LLOC | 2 | Logical lines; fewer is more readable | 94.6Δ 25.1 |
| DeepSeek V4 Pro | 17.33 | 0–20; mean of three runs | 73.9Δ 4.5 |
| GPT-6.1 Sol | 18 | 0–20; mean of three runs | 73.8Δ 4.3 |
| BTTF | 0.719 | 0–1; higher is more readable | 85.8Δ 16.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) |
|---|---|---|
| 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.574 | −6.862 |
| Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones. | 141.777 | −4.679 |
| Source linesThe number of non-empty source lines. | 9 | +3.6 |
Intercept 8.87 + feature contributions = 0.93 (log-odds).
Score = sigmoid(0.93) = 0.717.
| Score | 0.913 |
|---|
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. | 47.8 | +1.641 |
| 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. | 10 | +0.682 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 8 | −0.46 |
| 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. | 8.673 | −0.289 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.092 | +0.047 |
Intercept 0.07 + feature contributions = 1.284 (log-odds).
Score = sigmoid(1.284) = 0.783.
| Score | 0.691 |
|---|
| Score | 2 |
|---|
Run 1
The code is a minimal class definition with clear structure and intent. It has a flat hierarchy with only two members: a static prototype field and a constructor. There is no unnecessary nesting or tangled logic. Each member declaration is on its own line, supporting good action granularity and reading flow. However, the code is very sparse—lacking documentation, type annotations beyond basic declarations, and any context about why the class exists or how it should be used. The empty constructor adds little value and could be omitted or clarified. Overall, it is highly readable for what it is, but the absence of explanatory comments or richer typing prevents a higher score.
Run 2
This code is highly readable. It has a clear, logical structure: a package declaration, a single import, and a straightforward class definition extending another class. Nesting is minimal—there are no nested blocks or control structures. Intent is clear: defining a WebGLObject class that inherits from def.js.Object. The code is concise, with no unnecessary lines. Each line represents a distinct action (package, import, field declaration, constructor). The reading flow is natural, moving from package to import to class members. Minor deductions could be for the empty constructor (which is technically redundant) and the lack of comments, but overall it is clean, well-organized, and easy to understand.
Run 3
The code is highly readable due to its simplicity and clarity. The structure is logical for a class extending a base object, with minimal nesting and one action per line. The intent—defining a WebGLObject type with a static prototype—is clear. It is concise, avoids unnecessary length, and follows a natural reading flow. Slight deductions only for the empty constructor and lack of explanatory context, which slightly reduce clarity for unfamiliar readers.
Run 1
Code Structure: Simple, logically organized class declaration with a field and constructor. Nesting: Minimal, with no nested logic. Clarity of intent: The class name and inheritance suggest a WebGL API object, though the public static prototype field and empty constructor lack explanatory context. Code length: Very concise, but the unused Object import is unnecessary. Action granularity: Each declaration occupies its own line; the empty constructor on one line is reasonable. Reading flow: Natural top-to-bottom flow, slightly reduced by missing spacing in the constructor and the redundant import.
Run 2
Code Structure: A straightforward class declaration with logically ordered members. Nesting: Minimal, with no nested control flow. Clarity of intent: The class name and superclass indicate a Java representation of a WebGL object, although the public static prototype field is undocumented. Code length: Very concise, but the unused def.js.Object import is unnecessary because the superclass is fully qualified. Action granularity: Each declaration appears on its own line; the empty constructor is compact without combining unrelated actions. Reading flow: Natural from package to import to class and members, though spacing around the constructor braces would improve consistency.
Run 3
Code Structure: A straightforward package declaration, import, and small class are logically organized, although the unused import adds clutter. Nesting: Minimal nesting makes the code easy to scan. Clarity of intent: The class name and inheritance clearly identify a WebGL-related object, but the public static prototype field's role is not explained. Code length: Very concise, with no unnecessary implementation. Action granularity: Each declaration occupies its own line; the empty constructor contains no combined actions. Reading flow: Natural top-to-bottom flow, slightly weakened by the constructor's cramped formatting and redundant qualification of def.js.Object despite its import.