Sample
Schnappinger/aoi/artofillusion.material.Material3D
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0.899 | 0–1; higher is more readable | 87.3Δ 10.2 |
| Scalabrino | 0.905 | 0–1; higher is more readable | 90.1Δ 13.0 |
| Dorn | 0.591 | 0–1; higher is more readable | 67.7Δ 9.4 |
| Mi | 0.568 | 0–1; higher is more readable | 50.2Δ 26.9 |
| 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.33 | 0–20; mean of three runs | 85.3Δ 8.3 |
| BTTF | 0.643 | 0–1; higher is more readable | 65.3Δ 11.7 |
| Human | 3.96 | 1–4; original rating | 77.1 |
Views
Loading feature diagnosis…
Source regions
Feature contributions
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Source linesThe number of non-empty source lines. | 31 | +12.4 |
| Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones. | 359.407 | −11.86 |
| 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.813 | −7.219 |
Intercept 8.87 + feature contributions = 2.19 (log-odds).
Score = sigmoid(2.19) = 0.899.
| Score | 0.905 |
|---|
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 | −2.265 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 139.968 | +1.454 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.021 | +0.739 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 30 | −0.026 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 21 | −0.011 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 29.837 | +0.007 |
Intercept 0.07 + feature contributions = 0.367 (log-odds).
Score = sigmoid(0.367) = 0.591.
| Score | 0.568 |
|---|
| Score | 3 |
|---|
Run 1
The code is highly readable: it has a clear single responsibility (defining a 3D material interface), flat structure with no nesting, and concise but complete Javadoc comments. Class and method names are expressive ('Material3D', 'getMaterialSpec', 'getDefaultMapping'), and each statement or declaration is on its own line. The abstract method signature, though long, is documented clearly and follows a logical parameter order. The default mapping method is trivial and self-explanatory. Minor deductions: the abstract method has many parameters (potential readability burden for callers), and the class could include an example or usage note, but this does not significantly hurt clarity.
Run 2
The code is highly readable with clear structure: license header, package declaration, imports, class definition, and methods are logically organized. Nesting is minimal—only one method override exists with a single return statement. Intent is clearly conveyed through descriptive Javadoc comments explaining the abstract method's purpose and the default mapping behavior. Code length is concise and appropriate for the functionality. Action granularity is good, with one primary action per line. Reading flow is natural, following standard Java conventions. Minor deductions: the abstract method has seven parameters which could be encapsulated, and the class documentation could be slightly more descriptive, but these are negligible issues.
Run 3
The code is highly readable. It has a clear, logical structure with a single abstract class containing one abstract method and one concrete method. Nesting is minimal—only one class-level block and no conditional or loop nesting. Intent is explicit through descriptive naming and concise Javadoc comments that explain both the purpose of the class and the semantics of the method parameters. Code length is appropriate: there is no redundancy or unnecessary boilerplate. Each line performs one clear action, and the reading flow is natural, moving from package declaration to class definition, then method declarations in logical order. The only minor improvements could be formatting the parameter list of getMaterialSpec for vertical alignment, but this does not meaningfully impact readability.
Run 1
Code Structure: The small abstract class is logically organized, with documentation followed by two related methods. Nesting: Minimal nesting makes the code easy to scan. Clarity of intent: Class and method comments clearly explain the material's purpose, spatial averaging, and default mapping; descriptive names reinforce intent. Code length: Concise implementation with no unnecessary logic, though the abstract method signature is long. Action granularity: Each declaration or statement performs a single action. Reading flow: The sequence from class purpose to material specification and default mapping is natural. Wrapping the long signature and documenting the output parameter and time argument would slightly improve readability.
Run 2
Code Structure: A small, logically organized abstract class separates the material-specification contract from the default mapping implementation. Nesting: Minimal; the only implemented method contains a single return statement. Clarity of intent: Descriptive class and method names plus documentation clearly explain the purpose and spatial averaging behavior, although the output parameter spec is not explicitly documented. Code length: Concise, with no unnecessary implementation; the license header is standard boilerplate. Action granularity: Each statement performs one action, though the long abstract method declaration packs many parameters onto one line. Reading flow: Natural progression from class documentation to abstract contract to default implementation. Wildcard imports and the dense parameter list slightly reduce readability.
Run 3
Code Structure: A well-organized abstract class with two clearly separated methods. Nesting: Minimal, with no nested control flow. Clarity of intent: Class and method documentation clearly explain the material abstraction, spatial averaging, and default mapping; the many positional double parameters slightly reduce immediate clarity. Code length: Concise implementation with no unnecessary logic; the lengthy license header is standard boilerplate. Action granularity: The concrete method performs a single action per line, and the abstract declaration is straightforward. Reading flow: Natural progression from package and imports to class documentation and methods, though the long getMaterialSpec declaration and wildcard import modestly impair readability.