Sample
Schnappinger/jsweet/def.dom.ANGLE_instanced_arrays
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 66.9Δ 2.6 |
| Scalabrino | 0.857 | 0–1; higher is more readable | 78.1Δ 8.6 |
| Dorn | 0.179 | 0–1; higher is more readable | 39.9Δ 29.5 |
| Mi | 0.029 | 0–1; higher is more readable | 4.3Δ 65.2 |
| LLOC | 6 | Logical lines; fewer is more readable | 79.7Δ 10.2 |
| DeepSeek V4 Pro | 17 | 0–20; mean of three runs | 66.8Δ 2.6 |
| GPT-6.1 Sol | 17.67 | 0–20; mean of three runs | 62.2Δ 7.3 |
| BTTF | 0.534 | 0–1; higher is more readable | 47.2Δ 22.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. | 452.784 | −14.942 |
| 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.923 | −7.385 |
| Source linesThe number of non-empty source lines. | 13 | +5.2 |
Intercept 8.87 + feature contributions = -8.257 (log-odds).
Score = sigmoid(-8.257) = 0.
| Score | 0.857 |
|---|
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. | 123 | −1.545 |
| 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. | 14 | +0.541 |
| 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.059 | +0.371 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 12 | −0.322 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 12.831 | −0.23 |
Intercept 0.07 + feature contributions = -1.522 (log-odds).
Score = sigmoid(-1.522) = 0.179.
| Score | 0.029 |
|---|
| Score | 6 |
|---|
Run 1
The code is highly readable. It has a clear logical structure, defining a class extending def.js.Object, with methods and fields grouped logically (methods first, then instance field, static field, constructor). Nesting is minimal; only class-level indentation is present. Naming conventions make intent clear, as the class name and methods explicitly reflect WebGL's ANGLE_instanced_arrays extension. The code is concise and avoids unnecessary verbosity. Each method is declared on one line, adhering to the one-action-per-line principle. The reading flow is natural: you see the class purpose, its inheritable methods, instance properties, static properties, and constructor, in a predictable order. Minor deductions are due to the lack of comments explaining domain-specific parameters, though the names are descriptive enough to partially mitigate this.
Run 2
The code is highly readable. It has a clear, logical structure with imports, class declaration, methods, fields, and constructor organized in a natural order. Nesting is minimal—there are no nested blocks beyond the class itself. Intent is unambiguous: this defines a WebGL extension interface with three native methods, a constant, and a prototype. Code length is concise and each declaration is short and purposeful. Action granularity is appropriate, with one operation per line and no crowding. Reading flow is natural and linear, following a top-down progression from methods to constants to constructor. Minor deductions could be argued for the empty constructor and lack of comments, but overall clarity is excellent.
Run 3
The code is well-structured and readable. It follows a clear, flat structure with no nesting, and each method is on its own line, demonstrating good action granularity. The class name and method names clearly indicate intent, making the purpose obvious. The native method signatures are concise and self-documenting. Minor deductions: the lack of access modifiers (public/private) on some fields and methods could be slightly ambiguous, and the empty constructor adds no value but doesn't significantly harm readability. Overall, the code is easy to follow, maintain, and understand.
Run 1
Code Structure: A simple class cleanly groups three native methods, a field, a prototype reference, and a constructor. Nesting: Flat, with no nested control flow. Clarity of intent: API-specific method and parameter names convey their purposes, though the ANGLE terminology, double-typed parameters, and undocumented field require domain knowledge. Code length: Concise, with no unnecessary implementation; the unused import is minor clutter. Action granularity: Each declaration occupies its own line. Reading flow: Consistent and easy to scan, although blank lines between methods, fields, and the constructor would improve grouping, and conventional modifier ordering would feel more natural.
Run 2
Code Structure: A single class cleanly groups related API methods and fields, though separating them with blank lines would improve organization. Nesting: No nested control flow; the structure is flat and easy to scan. Clarity of intent: Standard ANGLE API names convey purpose, but native behavior and numeric parameters are undocumented, and the Object import is unused. Code length: Concise, with no unnecessary implementation detail. Action granularity: Each declaration occupies its own line; only the empty constructor compresses its braces. Reading flow: Package, import, and class declarations follow a natural order, although consistent modifier ordering and clearer spacing would improve polish.
Run 3
Code Structure: A logically organized class containing native methods, fields, and a constructor; separating these groups with blank lines would improve readability. Nesting: Essentially flat, with no nested control flow. Clarity of intent: Descriptive API names and parameters communicate purpose, although the extension naming convention and lack of documentation require domain familiarity. Code length: Very concise, with little extraneous content beyond an unused import. Action granularity: Each declaration occupies its own line, making individual members easy to identify. Reading flow: The consistent method declarations followed by fields and the constructor are straightforward to scan, though long signatures and the tightly formatted empty constructor slightly reduce polish.