Sample
Schnappinger/aoi/artofillusion.procedural.NumberModule
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 39.8Δ 21.3 |
| Scalabrino | 0.771 | 0–1; higher is more readable | 55.5Δ 37.0 |
| Dorn | 0.224 | 0–1; higher is more readable | 42.6Δ 24.1 |
| Mi | 0.553 | 0–1; higher is more readable | 43.6Δ 25.1 |
| LLOC | 36 | Logical lines; fewer is more readable | 46.0Δ 27.6 |
| DeepSeek V4 Pro | 16 | 0–20; mean of three runs | 47.4Δ 28.9 |
| GPT-6.1 Sol | 17 | 0–20; mean of three runs | 55.3Δ 36.8 |
| BTTF | 0.489 | 0–1; higher is more readable | 43.9Δ 25.4 |
| Human | 2.82 | 1–4; original rating | 18.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. | 3162.41 | −104.36 |
| Source linesThe number of non-empty source lines. | 116 | +46.4 |
| 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.895 | −7.342 |
Intercept 8.87 + feature contributions = -56.432 (log-odds).
Score = sigmoid(-56.432) = 0.
| Score | 0.771 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 117 | −3.106 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 108 | +2.998 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 108 | −2.057 |
| 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. | 125.949 | −1.67 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 125.991 | +1.228 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 115.811 | +1.209 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.088 | +0.085 |
Intercept 0.07 + feature contributions = -1.242 (log-odds).
Score = sigmoid(-1.242) = 0.224.
| Score | 0.553 |
|---|
| Score | 36 |
|---|
Run 1
The code is well-structured, with clear class and method organization. Nesting is minimal, and each method serves a single, obvious purpose, which aids clarity. The action granularity is appropriate—most lines perform one logical action. Naming is descriptive, and comments are concise but informative. However, there are minor readability issues: inconsistent brace style (some opening braces on the same line, others on a new line), slight inconsistency in string concatenation (Double.toString() vs ''+value), and a somewhat long constructor call that could be formatted more consistently. Overall, the code is easy to follow and maintain, but those small inconsistencies prevent a higher score.
Run 2
The code is well-structured and readable. It is organized into logical methods (constructor, getter/setter, edit, duplicate, serialization) with clear, descriptive names. Nesting is minimal—only a small anonymous inner class for event handling and a single conditional. Intent is generally clear: the class represents a numeric module and its behavior is straightforward. Code length is concise; each method is short and focused. However, the second constructor is slightly dense due to the inline array creation and the super() call is formatted in a way that reduces readability. Action granularity is mostly one action per line, though the constructor could be broken up. Reading flow is natural, with methods ordered logically. The use of comments is helpful, though some could be more descriptive. Overall, it is highly readable with only minor formatting concerns.
Run 3
The code is generally readable with a clear purpose and straightforward structure. Each method is short and performs a single logical action, and nesting is minimal. The reading flow is natural, following a logical top-to-bottom order. However, several aspects reduce readability: inconsistent brace placement and spacing, especially in constructors, makes some lines unnecessarily long and hard to parse. Comments are sparse and some are redundant or missing context. The 'empty IOPort array' repeated inline creates clutter, and magic strings like "Value" or "0.0" are not constants. Action granularity is mostly good, but constructor calls combine multiple parameters on one line, reducing clarity. Overall, it is understandable but could benefit from formatting consistency and minor refactoring.
Run 1
Code Structure: Well organized into constructors, accessors, editing, output, duplication, and serialization methods, with clear separation of responsibilities. Nesting: Mostly flat; the anonymous event handler adds only modest nesting. Clarity of intent: Descriptive method names and brief comments make the module's purpose clear, though abbreviated names such as v, mod, and dlg and implicit inherited state require some context. Code length: Compact overall, but constructors repeat port setup and several comments merely restate method names. Action granularity: Statements generally perform one action per line; lengthy constructor and dialog expressions are harder to scan. Reading flow: Method ordering and consistent indentation support natural reading, while wildcard imports, uneven line wrapping, and inconsistent numeric string conversion slightly reduce readability.
Run 2
Code Structure: Well organized into constructors, accessors, editing, output, duplication, and serialization methods, with clear separation of responsibilities. Nesting: Mostly flat; the anonymous event handler adds only modest nesting, and the early return simplifies dialog handling. Clarity of intent: Descriptive method names and brief comments make the constant-number module's purpose clear, although names such as v and mod are less descriptive, and live value changes before dialog confirmation require closer inspection. Code length: Short, focused methods keep the class concise, though constructors repeat port initialization and some comments merely restate method names. Action granularity: Statements generally perform one action per line. Reading flow: Consistent formatting and logical method ordering support easy reading; long constructor/dialog expressions, wildcard imports, and inconsistent numeric string conversion slightly reduce readability.
Run 3
Code Structure: Well organized into small methods for initialization, access, editing, duplication, and serialization; constructor setup is duplicated. Nesting: Mostly flat, with modest nesting in the anonymous event handler and a clear early return. Clarity of intent: Descriptive method names and brief comments make the constant-number module's purpose clear, though names such as v and mod are less expressive and inherited state requires context. Code length: Appropriately concise overall, with some redundant comments and repeated initialization. Action granularity: Statements generally perform one action per line; constructor and dialog expressions are somewhat dense. Reading flow: Methods follow a natural progression and formatting is largely consistent, but long argument lists, wildcard imports, and inconsistent number-to-string conversion slightly interrupt readability.