Sample
Schnappinger/aoi/artofillusion.procedural.ColorSumModule
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 45.5Δ 1.1 |
| Scalabrino | 0.523 | 0–1; higher is more readable | 11.3Δ 33.1 |
| Dorn | 0.238 | 0–1; higher is more readable | 43.6Δ 0.8 |
| Mi | 0.369 | 0–1; higher is more readable | 22.8Δ 21.6 |
| LLOC | 21 | Logical lines; fewer is more readable | 58.4Δ 14.0 |
| DeepSeek V4 Pro | 16 | 0–20; mean of three runs | 47.4Δ 3.0 |
| GPT-6.1 Sol | 16.33 | 0–20; mean of three runs | 45.9Δ 1.5 |
| BTTF | 0.387 | 0–1; higher is more readable | 33.0Δ 11.4 |
| Human | 3.79 | 1–4; original rating | 44.4 |
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. | 2036.706 | −67.211 |
| Source linesThe number of non-empty source lines. | 64 | +25.6 |
| Byte entropyHow varied the bytes in the source text are. Repeated bytes give a lower value; a more even mixture gives a higher value. | 5.023 | −7.534 |
Intercept 8.87 + feature contributions = -40.275 (log-odds).
Score = sigmoid(-40.275) = 0.
| Score | 0.523 |
|---|
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. | 140.985 | −2.306 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 140.985 | +1.47 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 65 | −1.265 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 56 | +1.2 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 56 | −0.864 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 63.704 | +0.481 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.092 | +0.05 |
Intercept 0.07 + feature contributions = -1.165 (log-odds).
Score = sigmoid(-1.165) = 0.238.
| Score | 0.369 |
|---|
| Score | 21 |
|---|
Run 1
The code demonstrates clear structure with logical separation of constructor, initialization, and color calculation methods. Comments effectively explain purpose without being excessive. Nesting is minimal, with only single-level conditionals in getColor(). Variable and method names are descriptive, making intent clear. Action granularity is mostly one action per line, though constructor IOPort definitions are long. Reading flow is natural, following a top-down progression from initialization to calculation. Minor deductions: some lines in the constructor are excessively long, reducing readability, and the getColor() method handles both caching and computation logic together. The caching check (colorOk && blur == lastBlur) adds slight complexity but is well-named. Overall, the code is concise for its purpose and maintains good readability despite Java's verbose I/O port setup.
Run 2
The code is well-structured and readable. It follows a logical organization with clear separation of constructor, initialization, and computation methods. Nesting is minimal, with only one level of conditional nesting in getColor(). Intent is evident from method names, comments, and the module's purpose. Code length is appropriate—no unnecessary verbosity. Action granularity is mostly one action per line, though the constructor has very long array parameter lists that slightly hamper readability. Reading flow is natural: constructor, then init, then getColor, mirroring the module's execution lifecycle. The use of caching (colorOk, lastBlur) is clear. However, the multi-line array definitions in the super() call reduce readability slightly due to line length and formatting. Overall, the code is maintainable and easy to follow, with only minor formatting concerns.
Run 3
The code is generally readable: it has a clear structure with a small class, straightforward methods, and descriptive comments. Nesting is minimal (one if-else level). Intent is mostly clear from method names like init and getColor, and the input/output ports are explicitly defined. However, readability is reduced by the lengthy constructor with nested IOPort array definitions and string concatenation for labels, which makes the constructor dense and harder to parse. Also, the getColor method does multiple tasks: caching logic, fetching inputs, and combining colors, which slightly obscures the main action. Action granularity is mostly one action per line, but some lines are long due to complex constructor arguments. Overall, good but could be improved with helper methods or clearer port setup.
Run 1
Code Structure: The class is logically organized into construction, cache initialization, and color calculation. Nesting: Control flow is shallow, with a clear early return for cached results. Clarity of intent: The class name, comments, and color operations clearly communicate the purpose, although names such as c and colorOk are less descriptive, and inherited link arrays require context. Code length: The implementation is concise without unnecessary logic. Action granularity: Most statements perform one action, but the constructor compresses several nested object and array creations into long lines. Reading flow: Calculation proceeds naturally from cache checking to retrieving inputs, summing, and copying the result. Dense constructor formatting, inconsistent brace placement, and unbraced conditionals slightly reduce readability.
Run 2
Code Structure: The class is logically organized into construction, cache invalidation, and color calculation. Nesting: Shallow conditionals and an early return keep complexity low. Clarity of intent: The class name and comments clearly explain color addition, although names such as c and colorOk are less descriptive, and inherited link arrays require external context. Code length: The implementation is compact without substantial unnecessary logic; the lengthy license header does not obscure the methods. Action granularity: Most statements perform one action per line, but the constructor packs several nested object and array creations into long lines. Reading flow: Calculation proceeds naturally from cache checking to input retrieval, addition, and output copying. Unusual brace indentation and dense constructor formatting slightly disrupt readability.
Run 3
Code Structure: The class is logically organized into construction, cache invalidation, and color calculation. Nesting: Shallow conditionals and an early return keep complexity low. Clarity of intent: The class name and comments clearly convey color addition, though names such as c and colorOk are less descriptive, and inherited link arrays require context. Code length: The implementation is concise; the lengthy license header is standard boilerplate rather than unnecessary logic. Action granularity: Most statements perform one action per line, but the constructor packs multiple nested port definitions into long lines. Reading flow: Calculation proceeds naturally from cache checking to input retrieval, addition, and output copying. Unusual brace indentation, omitted braces around conditionals, and dense constructor formatting slightly impede scanning.