Sample
Schnappinger/aoi/artofillusion.TubeEditorWindow
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 4.5Δ 3.7 |
| Scalabrino | 0.29 | 0–1; higher is more readable | 2.1Δ 6.2 |
| Dorn | 0.004 | 0–1; higher is more readable | 15.2Δ 6.9 |
| Mi | 0.03 | 0–1; higher is more readable | 4.6Δ 3.6 |
| LLOC | 285 | Logical lines; fewer is more readable | 7.6Δ 0.7 |
| DeepSeek V4 Pro | 12 | 0–20; mean of three runs | 15.5Δ 7.3 |
| GPT-6.1 Sol | 12 | 0–20; mean of three runs | 5.6Δ 2.6 |
| BTTF | 0.087 | 0–1; higher is more readable | 2.3Δ 5.9 |
| Human | 2.07 | 1–4; original rating | 8.3 |
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. | 29586.846 | −976.366 |
| Source linesThe number of non-empty source lines. | 415 | +166 |
| 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.955 | −7.433 |
Intercept 8.87 + feature contributions = -808.929 (log-odds).
Score = sigmoid(-808.929) = 0.
| Score | 0.29 |
|---|
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. | 415 | −13.658 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 403 | +13.202 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 403 | −8.827 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 413.929 | +5.376 |
| 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. | 154.971 | −2.899 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 154.993 | +1.696 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.142 | −0.433 |
Intercept 0.07 + feature contributions = -5.472 (log-odds).
Score = sigmoid(-5.472) = 0.004.
| Score | 0.03 |
|---|
| Score | 285 |
|---|
Run 1
The code has some clear structure and consistent naming, but readability suffers from multiple issues. The constructor is very long and mixes UI setup, tool creation, and initialization, making it hard to follow. Deeply nested conditionals appear in methods like subdivideCommand and deleteCommand, with complex index arithmetic and branching logic. Variable names like p1, p3, p4 and split are cryptic without context. Several methods contain multiple actions per line and dense array manipulation that obscures intent. The createMeshMenu method has repetitive menu-item creation with manual array indexing, and magic numbers for array sizes reduce clarity. While comments exist, they don't offset the heavy procedural complexity. The reading flow is disrupted by long methods and tangled state management, though some separation of concerns is present through method extraction. Overall, the code is functional but difficult to read and maintain.
Run 2
The code has clear structure with well-named methods representing distinct UI commands, good use of helper methods, and consistent formatting. However, readability suffers in several areas: deeply nested conditionals (especially in subdivideCommand with up to 4 levels), long methods that mix UI setup with business logic, multiple operations per line in places, and heavy use of array indexing that obscures intent. The constructor is very long, combining layout, tool initialization, and dialog setup. Complex math operations like SplineMesh.calcApproxPoint lack explanatory comments. Variable names are sometimes unclear (p1, p3, p4). While the code follows consistent conventions and has good separation between menu creation methods, the overall flow is somewhat tangled due to the density of operations and nesting depth.
Run 3
The code shows reasonable organization with clear method separation and some useful comments explaining complex algorithms. However, it suffers from significant readability issues. Methods like `subdivideCommand()` and `deleteCommand()` are extremely long (60+ lines) and contain deeply nested conditional logic, making them hard to follow. The constructor is bloated with UI setup code mixing multiple concerns. While variable names are mostly descriptive, there are cryptic ones like `p1`, `p3`, `p4`, `t[]`, `s[]`, and `vt[]` that require domain knowledge. The code frequently chains multiple operations per line (e.g., `meshMenu.add(meshMenuItem[0] = Translate.menuItem(...))`), violating the one-action-per-line principle. Some duplication exists between `deleteCommand()` and `subdivideCommand()` that could be refactored. The reading flow is disrupted by large blocks of array indexing and conditional statements. Overall, the code is functional but would benefit from method extraction, reduced nesting, and more consistent formatting.
Run 1
Code Structure: Methods separate UI setup, menu handling, and editing commands logically, but the constructor and subdivision method combine too many responsibilities. Nesting: Most methods are shallow, while subdivision contains several nested loops and conditional branches that require careful tracking. Clarity of intent: Method names and section comments explain major operations, but abbreviated variables such as vt, s, t, p1, and newt, plus numeric menu indices, obscure details. Code length: Repetitive menu construction and lengthy subdivision logic could be shortened through helper methods. Action granularity: Most statements occupy individual lines, but assignments inside method calls, grouped declarations, and incrementing indices during assignment combine actions. Reading flow: Consistent formatting and sequential setup help navigation; the empty-body selection loop, omitted braces, reused indices, and parallel-array updates interrupt otherwise natural flow.
Run 2
Code Structure: Methods separate UI setup and editing commands logically, but the constructor and subdivision method combine many responsibilities. Nesting: Most methods are shallow; subdivision contains several nested loops and conditionals that complicate tracing. Clarity of intent: Descriptive method names and section comments explain overall purposes, but abbreviated variables, numeric menu indexes, and implicit inherited state obscure details. Code length: UI boilerplate is understandable, yet repeated menu setup, array copying, and boundary handling make the code lengthy and suggest opportunities for helper methods. Action granularity: Most statements occupy individual lines, but assignments embedded in method arguments, grouped declarations, and index increments mixed with assignments combine actions. Reading flow: Method ordering and subdivision phase comments provide a coherent progression, while long lines, inconsistent indentation, omitted braces, and an empty-body selection-search loop interrupt readability.
Run 3
Code Structure: Methods separate UI setup, menu handling, and editing commands logically, but the constructor and subdivision routine combine many responsibilities. Nesting: Most handlers are shallow, while subdivision contains several nested loops and conditionals that increase tracking effort. Clarity of intent: Descriptive method names and section comments explain the overall purpose; abbreviated variables, numeric menu indices, and inherited state obscure details. Code length: UI boilerplate is understandable, but repeated array copying, menu configuration, and boundary handling make some methods unnecessarily long. Action granularity: Most statements occupy separate lines, although assignment within method arguments, grouped declarations, and index increments embedded in assignments combine actions. Reading flow: Consistent method organization and comments support navigation, but long lines, omitted braces, an empty-body selection loop, and parallel arrays interrupt otherwise natural flow.