Sample

Schnappinger/jsweet/def.dom.ANGLE_instanced_arrays

Human rating uses the original dataset scale.

Human3.95
Lines13

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett00–1; higher is more readable
66.9Δ 2.6
Scalabrino0.8570–1; higher is more readable
78.1Δ 8.6
Dorn0.1790–1; higher is more readable
39.9Δ 29.5
Mi0.0290–1; higher is more readable
4.3Δ 65.2
LLOC6Logical lines; fewer is more readable
79.7Δ 10.2
DeepSeek V4 Pro170–20; mean of three runs
66.8Δ 2.6
GPT-6.1 Sol17.670–20; mean of three runs
62.2Δ 7.3
BTTF0.5340–1; higher is more readable
47.2Δ 22.3
Human3.951–4; original rating
69.5

Views

Source code

package def.dom; import def.js.Object; public class ANGLE_instanced_arrays extends def.js.Object { native public void drawArraysInstancedANGLE(double mode, double first, double count, double primcount); native public void drawElementsInstancedANGLE(double mode, double count, double type, double offset, double primcount); native public void vertexAttribDivisorANGLE(double index, double divisor); public double VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE; public static ANGLE_instanced_arrays prototype; public ANGLE_instanced_arrays(){} }

Loading feature diagnosis…

Source regions

Feature contributions

Feature contributions

FeatureValueContribution
(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.

Score0.857

Feature contributions

FeatureValueContribution
(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.

Score0.029
Score6
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.