Sample
Schnappinger/aoi/artofillusion.spmanager.SPMFileSystem
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 43.5Δ 2.4 |
| Scalabrino | 0.756 | 0–1; higher is more readable | 51.0Δ 5.2 |
| Dorn | 0.442 | 0–1; higher is more readable | 57.8Δ 11.9 |
| Mi | 0.444 | 0–1; higher is more readable | 27.4Δ 18.5 |
| LLOC | 61 | Logical lines; fewer is more readable | 34.3Δ 11.6 |
| DeepSeek V4 Pro | 13.33 | 0–20; mean of three runs | 24.1Δ 21.8 |
| GPT-6.1 Sol | 15 | 0–20; mean of three runs | 25.7Δ 20.1 |
| BTTF | 0.461 | 0–1; higher is more readable | 40.9Δ 5.0 |
| Human | 3.84 | 1–4; original rating | 45.9 |
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. | 2655.435 | −87.629 |
| Source linesThe number of non-empty source lines. | 98 | +39.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.691 | −7.037 |
Intercept 8.87 + feature contributions = -46.597 (log-odds).
Score = sigmoid(-46.597) = 0.
| Score | 0.756 |
|---|
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. | 99 | −2.469 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 89 | +2.341 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 89 | −1.621 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 97.851 | +0.958 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 70.556 | +0.334 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.084 | +0.128 |
| 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. | 85.96 | +0.024 |
Intercept 0.07 + feature contributions = -0.234 (log-odds).
Score = sigmoid(-0.234) = 0.442.
| Score | 0.444 |
|---|
| Score | 61 |
|---|
Run 1
The code is moderately readable but has several issues. The structure is logical with clear separation of concerns, but there's code duplication and potential bugs. The first three criteria (structure, nesting, clarity) are mostly satisfied - the class is well-organized and flat. However, the `getInfoType` method has repetitive loops with identical logic, which could be simplified using a single map or helper method. The `initialized` flag is never set to `true` after initialization, suggesting a bug or incomplete implementation. The `getRemoteInfo` method appears incomplete, accepting a callback but never using it. Method naming is generally clear, but `SPMFileSystem` is poorly named - the abbreviation is unclear without context. The code uses raw `Vector` instead of generics, reducing type safety and clarity. Overall, while the basic structure is maintainable, the code has several quality issues that impact readability and correctness.
Run 2
The code has a logical structure with clear class organization, flat nesting, and generally one action per line. Method names clearly express intent. However, several issues reduce readability: the getInfoType method uses repetitive loops instead of a more efficient map or helper method, fields like pluginsInfo are public API via getters but lack defensive copies, and vector usage is outdated. The initialized flag is redundantly checked in every getter, and getRemoteInfo ignores its callback parameter without explanation. Magic strings like 'Download request for a non able SPMFileSystem' are unclear. The class mixes responsibilities (file system, script management, remote operations) without clear separation. Overall it's readable but would benefit from modernization and simpler type-checking logic.
Run 3
The code is generally readable with clear structure and intent. Class organization is logical, methods are short and focused, and naming is descriptive. However, there are notable issues: getInfoType() uses repeated loop patterns with if statements instead of a simpler lookup map or helper method, creating unnecessary duplication. The downloadRemoteFile and getRemoteInfo methods contain placeholder implementations without clear documentation of their incomplete status. The class uses raw Vector types (legacy Java), which reduces type safety and readability. While the code is flat and actions are well-separated per line, the copyright header is verbose relative to the simple class content. Overall, the code is maintainable but could benefit from modernization and reduced repetition.
Run 1
Code Structure: Methods are logically separated, and related collections and type constants are grouped clearly. Nesting: Control flow is shallow, although omitted braces make loop and conditional boundaries less explicit. Clarity of intent: Most method names are descriptive, but initialize() never sets initialized to true, getRemoteInfo() ignores its callback, and downloadRemoteFile() provides only an awkward diagnostic message. Returning PLUGIN_TYPE for unknown objects also obscures intent. Code length: The class is compact, though repeated collection searches and initialization checks introduce some duplication. Action granularity: Most lines perform one action, but inline conditional returns and initialization calls compress distinct control-flow steps. Reading flow: Declaration, construction, and method ordering are easy to follow; consistent formatting helps, while raw Vector types and unexplained stub-like behavior require extra interpretation.
Run 2
Code Structure: Fields, constants, construction, and operations are logically organized, although repeated collection handling could be consolidated. Nesting: Shallow loops and conditionals make control flow easy to follow; omitted braces slightly weaken visual clarity. Clarity of intent: Method and constant names generally communicate purpose, but raw Vectors obscure element types. initialize() never sets initialized, getRemoteInfo() ignores its callback, and getInfoType() defaults to PLUGIN_TYPE, making intended behavior ambiguous. Code length: The class is compact, though initialization checks and collection operations are repetitive. Action granularity: Most statements perform one action per line, but inline conditional returns and initialization calls compress control flow. Reading flow: Consistent formatting and short methods support natural reading, while unexplained stub methods and the unclear download message interrupt understanding.
Run 3
Code Structure: Fields, constants, constructor, and short methods are logically organized, though repeated collection handling adds duplication. Nesting: Very shallow, with simple loops and conditionals; omitted braces make control boundaries slightly less explicit. Clarity of intent: Method and constant names mostly communicate purpose, but raw Vectors obscure element types, initialize() never sets initialized, getInfoType() defaults to PLUGIN_TYPE for unknown objects, and the unused callback makes getRemoteInfo() ambiguous. Code length: Compact overall, though collection searches and initialization checks are repetitive. Action granularity: Most lines perform one action, but inline conditional returns and initialization calls compress control flow and actions together. Reading flow: Consistent formatting and straightforward method bodies support easy scanning, while unexplained stub behavior and unclear initialization semantics interrupt understanding.