Sample
Schnappinger/jsweet/def.dom.OES_standard_derivatives
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0.493 | 0–1; higher is more readable | 78.6Δ 1.5 |
| Scalabrino | 0.789 | 0–1; higher is more readable | 59.9Δ 17.1 |
| Dorn | 0.739 | 0–1; higher is more readable | 77.9Δ 0.8 |
| Mi | 0.489 | 0–1; higher is more readable | 32.7Δ 44.4 |
| LLOC | 3 | Logical lines; fewer is more readable | 91.1Δ 14.0 |
| DeepSeek V4 Pro | 18 | 0–20; mean of three runs | 91.4Δ 14.4 |
| GPT-6.1 Sol | 18 | 0–20; mean of three runs | 73.8Δ 3.3 |
| BTTF | 0.64 | 0–1; higher is more readable | 64.7Δ 12.4 |
| Human | 3.96 | 1–4; original rating | 77.1 |
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.985 | −7.477 |
| Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones. | 164.233 | −5.42 |
| Source linesThe number of non-empty source lines. | 10 | +4 |
Intercept 8.87 + feature contributions = -0.026 (log-odds).
Score = sigmoid(-0.026) = 0.493.
| Score | 0.789 |
|---|
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. | 61 | +1.082 |
| 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. | 11 | +0.647 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 9 | −0.426 |
| 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.061 | +0.347 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 9.806 | −0.273 |
Intercept 0.07 + feature contributions = 1.04 (log-odds).
Score = sigmoid(1.04) = 0.739.
| Score | 0.489 |
|---|
| Score | 3 |
|---|
Run 1
The code is highly readable with a clear, logical structure. It defines a simple class with a numeric field, a static prototype reference, and an empty constructor. The flat structure avoids any unnecessary nesting, and the intent is unambiguous: representing a WebGL extension with a single constant. Each declaration is on its own line, adhering to the one-action-per-line principle. The code is concise without sacrificing clarity. The only minor deduction is the lack of Javadoc or comments explaining the purpose of the class and its field, but the naming conventions are otherwise self-explanatory. Overall, the code is easy to understand at a glance.
Run 2
The code is highly readable due to its excellent structure and clarity. It is a straightforward class definition with a clear purpose: defining constants and a prototype for an OpenGL ES extension. Nesting is minimal, with only the class and constructor blocks. The intent is unambiguous—each member and constructor is plainly named and typed. Code length is concise with no redundancy. Action granularity is appropriate; each field declaration and constructor sits on its own line. Reading flow is natural, following a logical top-to-bottom order of constants, prototype, and constructor. Minor deductions: lack of Javadoc and an empty constructor body slightly reduce clarity, preventing a perfect score.
Run 3
The code is highly readable. It follows a clear and conventional structure for a Java class extending another object. The package and import declarations are standard and logically placed. There is no deep nesting, and each field is declared on its own line with clear visibility modifiers and types. The class intent is unambiguous, defining constants and a prototype for OES_standard_derivatives. The constructor is concise. Minor deductions for lack of comments explaining the domain-specific constant and the unusual use of uppercase field names, which slightly reduce clarity for readers unfamiliar with WebGL/OpenGL ES conventions.
Run 1
Code Structure: The package declaration, import, class, fields, and constructor follow a conventional, logical order. Nesting: Only the class scope is present, with no deeply nested logic. Clarity of intent: The class and constant-style field names suggest a WebGL extension binding, although the mutable double field and prototype declaration may be unclear without domain knowledge; the Object import is unused. Code length: The code is concise, with no unnecessary implementation. Action granularity: Each declaration occupies its own line. Reading flow: The top-to-bottom flow is natural, but spacing around the empty constructor and blank lines separating members would improve readability.
Run 2
Code Structure: A straightforward class with fields and a constructor, logically organized. Nesting: Minimal, with no nested control flow. Clarity of intent: The class and constant-style field names identify a graphics extension, though the roles of the mutable double field and prototype are not explained. Code length: Concise, with no unnecessary logic; the Object import is unused because the superclass is fully qualified. Action granularity: Each declaration occupies its own line. Reading flow: Natural package-to-import-to-class progression, slightly weakened by the tightly formatted constructor and lack of spacing between fields and constructor.
Run 3
Code Structure: A straightforward class declaration groups its fields and constructor logically. Nesting: Only the class level is present, so nesting is minimal. Clarity of intent: The class and constant-like field names identify a graphics extension, though the mutable field, prototype, and empty constructor lack explanatory context. Code length: Very concise, with no unnecessary implementation; the unused Object import is minor clutter. Action granularity: Each declaration occupies its own line. Reading flow: Package, import, class, fields, and constructor follow a natural order. Spacing around the constructor braces and a blank line before it would improve presentation.