Sample
Schnappinger/aoi/artofillusion.procedural.MaxModule
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 35.5Δ 9.0 |
| Scalabrino | 0.552 | 0–1; higher is more readable | 14.4Δ 12.0 |
| Dorn | 0.268 | 0–1; higher is more readable | 46.2Δ 19.8 |
| Mi | 0.411 | 0–1; higher is more readable | 25.4Δ 1.0 |
| LLOC | 46 | Logical lines; fewer is more readable | 40.6Δ 14.2 |
| DeepSeek V4 Pro | 16 | 0–20; mean of three runs | 47.4Δ 21.0 |
| GPT-6.1 Sol | 15 | 0–20; mean of three runs | 25.7Δ 0.7 |
| BTTF | 0.345 | 0–1; higher is more readable | 26.7Δ 0.3 |
| Human | 3 | 1–4; original rating | 26.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. | 3561.865 | −117.542 |
| Source linesThe number of non-empty source lines. | 103 | +41.2 |
| 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.974 | −7.46 |
Intercept 8.87 + feature contributions = -74.932 (log-odds).
Score = sigmoid(-74.932) = 0.
| Score | 0.552 |
|---|
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. | 104 | −2.646 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 95 | +2.549 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 95 | −1.759 |
| 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. | 117.981 | −1.332 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 117.971 | +1.099 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 102.84 | +1.028 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.098 | −0.013 |
Intercept 0.07 + feature contributions = -1.005 (log-odds).
Score = sigmoid(-1.005) = 0.268.
| Score | 0.411 |
|---|
| Score | 46 |
|---|
Run 1
The code is generally readable with clear structure and intent. The class has a logical organization, with a constructor, initialization, and three related methods for computing values, errors, and gradients. Nesting is minimal—conditional logic is flat and easy to follow. The use of comments before each method explains purpose well, though some comments are redundant ('Compare the two inputs' on a method named getAverageValue). Variable names are mostly descriptive, but some are cryptic (e.g., 'which', 'linkFrom[0]'). The getAverageValue method is somewhat long and mixes multiple responsibilities: value calculation, error estimation, and caching. Action granularity is mostly one action per line, but the repeated ternary checks for null inputs add verbosity and hurt reading flow. The caching mechanism (valueOk, lastBlur) is not immediately obvious without closer inspection. Overall, the code is maintainable but could benefit from refactoring to extract null-check helpers and separate error calculation for improved clarity.
Run 2
The code is generally well-structured and readable. It has a clear class purpose, flat nesting, and concise methods. Naming is mostly clear, though `which`, `valueOk`, and parameter shadowing (`which` in getAverageValue and getValueError) slightly reduce clarity. The constructor is long due to IOPort configuration but follows a consistent pattern. The caching logic using `valueOk` and `lastBlur` is a bit implicit but understandable. Action granularity is good: one main operation per line in the core conditional logic. The handling of null links with ternaries is repetitive but straightforward. Overall, the code is maintainable and easy to follow, with minor room for improvement in variable naming and reducing duplication.
Run 3
The code is generally clear and well-structured. The class has a single purpose, methods are short, and comments explain non-obvious parts. The constructor uses clear IOPort definitions. However, readability is slightly reduced by the repeated ternary null-check pattern for each input, which makes getAverageValue longer and more cluttered than necessary. The getValueGradient method names its parameter 'which' but uses an instance field of the same name, creating potential ambiguity. Long lines in the constructor and method calls also reduce readability somewhat. Overall, the logic is understandable, but it could be improved with a helper method to read input values and errors, reducing duplication.
Run 1
Code Structure: Methods are logically separated into initialization, value calculation, error retrieval, and gradient retrieval, though shared mutable state complicates understanding. Nesting: Shallow conditionals and early returns keep control flow manageable. Clarity of intent: The class description and method names communicate its purpose, but the uncertainty calculations lack explanation. The parameter 'which' shadows the field, obscuring which input is selected, and lastBlur is checked without being updated. Code length: Generally compact, although repeated input lookups and similar branch bodies could be consolidated. Action granularity: Most lines perform one action, but the constructor packs substantial configuration into long expressions. Reading flow: Methods follow a natural progression, with consistent formatting and helpful comments; dense constructor formatting, omitted braces, and terse names such as 'maxmin' introduce friction.
Run 2
Code Structure: Methods logically separate initialization, value calculation, error retrieval, and gradient retrieval, although caching and input selection are mixed into calculation. Nesting: Shallow conditionals and early returns keep complexity manageable. Clarity of intent: The class description and method comments establish its purpose, but 'which' shadows the field, obscuring selected-input state, and lastBlur is checked without an evident update. Names such as 'maxmin' require interpretation, and overlapping error-range handling lacks explanation. Code length: Generally compact, though repeated input lookups and similar result-selection branches introduce duplication. Action granularity: Most lines perform one action; grouped field declarations and the dense constructor reduce scanability. Reading flow: Methods follow a natural progression, but long ternary expressions, inconsistent operator spacing, and subtle state dependencies interrupt otherwise straightforward reading.
Run 3
Code Structure: Methods separate initialization, value calculation, error retrieval, and gradient retrieval logically, although repeated input-access expressions and comparison branches could be simplified. Nesting: Shallow conditionals and an early return keep control flow easy to follow. Clarity of intent: The class description and method comments establish its purpose, but names such as which and maxmin are vague. The which parameters shadow the field, obscuring whether assignments represent the selected input or the method argument; lastBlur is checked but never updated, making caching intent harder to understand. Code length: Generally compact, with some duplicated calculations and assignments. Action granularity: Most statements perform one action per line, though grouped field declarations and the dense constructor reduce scanability. Reading flow: Method order and consistent indentation support natural reading, while long ternary expressions, tightly spaced arithmetic, and missing braces around short conditionals slightly impede it.