Sample
int-2d856163e274-SRC
Unmodified source class
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.649 | 0–1; higher is more readable |
| Dorn | 0.699 | 0–1; higher is more readable |
| Mi | 0.097 | 0–1; higher is more readable |
| LLOC | 44 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 17 | 0–20; mean of three runs |
| GPT-6.1 Sol | 18 | 0–20; mean of three runs |
| BTTF | 0.43 | 0–1; higher is more readable |
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. | 4869.167 | −160.682 |
| Source linesThe number of non-empty source lines. | 116 | +46.4 |
| 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.754 | −7.131 |
Intercept 8.87 + feature contributions = -112.544 (log-odds).
Score = sigmoid(-112.544) = 0.
| Score | 0.649 |
|---|
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. | 117 | −3.106 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 103 | +2.826 |
| 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. | 134.94 | −2.05 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 133.803 | +1.354 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 115.912 | +1.21 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.083 | +0.14 |
Intercept 0.07 + feature contributions = 0.842 (log-odds).
Score = sigmoid(0.842) = 0.699.
| Score | 0.097 |
|---|
| Score | 44 |
|---|
Run 1
The code is well-structured with clear separation of concerns. The class has a single responsibility (number conversion) and methods are concise. Nesting is minimal—only in try-catch blocks. Clarity of intent is good due to descriptive method names and Javadoc comments. Action granularity is mostly one action per line. Reading flow is natural, with methods logically ordered. Minor issues: some blank lines are missing between methods, and the configure method contains an unnecessary blank line at the end. The cast method is trivial but adds a slight indirection. Overall, very readable.
Run 2
The code demonstrates strong readability overall. Structure is logical, following a standard converter implementation pattern with clear field declarations and constructor documentation. Nesting is minimal, limited to a single try-catch in each conversion method. Intent is explicit through descriptive method names, JavaDoc, and type parameters. Code length is appropriate - no unnecessary verbosity beyond standard exception handling. Action granularity is mostly one action per line, particularly in the configure and constructor methods. Reading flow is natural with methods grouped by interface implementation. Minor deductions: the assert statements could be replaced with constructor validation, the cast method is trivial, and the fromConnectData method has a slightly dense ternary expression. These are minor issues that don't significantly impact comprehension.
Run 3
The code is well-structured with a single, focused class that clearly implements Converter and HeaderConverter for numeric types. It maintains flat nesting throughout, with no deeply nested logic or conditionals beyond simple ternary expressions. Intent is explicit—each method has a clear purpose, and field names like serializer, deserializer, and typeName are descriptive. Code length is appropriate; no unnecessary verbosity or duplication, though some repetition could be reduced by consolidating error messages. Action granularity is mostly good, with one logical operation per line, though a few lines combine multiple assertions or method calls. Reading flow is natural: methods are logically ordered from construction to configuration to core conversion operations, and exception handling follows a predictable pattern. Minor deductions for slightly compacted lines (e.g., multiple assert statements, chained catch-and-rethrow with exception wrapping) and the unused schema parameter in fromConnectData, which could confuse intent. Overall, it is highly readable and maintainable.
Run 1
Code Structure: Fields, construction, configuration, conversion, and cleanup are logically organized into focused methods. Nesting: Shallow try/catch blocks and a simple ternary keep complexity low. Clarity of intent: Descriptive names, interface overrides, documentation, and informative exceptions make the purpose clear; the unchecked cast and StringConverterConfig reference introduce minor ambiguity. Code length: Concise overall, with header conversion delegating to existing methods rather than duplicating logic. Action granularity: Most lines perform one action, although nested serialization calls and the configuration ternary compress several operations. Reading flow: Consistent method patterns support natural reading, with minor disruptions from long lines and uneven blank-line spacing.
Run 2
Code Structure: Well-organized class with focused methods, grouped fields, and header conversion delegated to existing data conversion methods. Nesting: Minimal; try/catch blocks are shallow and straightforward. Clarity of intent: Descriptive names, interface overrides, and Javadoc clearly communicate numeric conversion behavior. The unchecked cast and use of StringConverterConfig in a numeric converter introduce minor ambiguity. Code length: Concise, with little duplication and appropriately short methods. Action granularity: Statements generally perform one action per line, though serialization and configuration expressions combine several operations. Reading flow: Natural progression from construction and configuration to conversion and cleanup. Minor formatting inconsistencies, including missing spacing between methods and an extra blank line, slightly reduce polish.
Run 3
Code Structure: Responsibilities are cleanly separated into configuration, conversion, header delegation, and cleanup methods. Nesting: Minimal nesting, limited to straightforward try/catch blocks. Clarity of intent: Descriptive names, generic typing, and documentation make the converter's purpose clear; the unchecked cast and use of StringConverterConfig in a number converter introduce minor ambiguity. Code length: Concise methods and delegation avoid unnecessary duplication, while constructor documentation adds useful context. Action granularity: Each statement performs one clear action, though serialization combines null handling, casting, and delegation in one expression. Reading flow: Methods follow a natural lifecycle order, and formatting is mostly consistent; missing spacing between some sections and an extra blank line slightly interrupt the flow.