Sample
int-e68e94507a65-I08
Select one of ten high-readability unrelated code templates per class
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.628 | 0–1; higher is more readable |
| Dorn | 0.168 | 0–1; higher is more readable |
| Mi | 0.097 | 0–1; higher is more readable |
| LLOC | 51 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 10.33 | 0–20; mean of three runs |
| GPT-6.1 Sol | 15 | 0–20; mean of three runs |
| BTTF | 0.331 | 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. | 5253.892 | −173.378 |
| Source linesThe number of non-empty source lines. | 126 | +50.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.767 | −7.15 |
Intercept 8.87 + feature contributions = -121.259 (log-odds).
Score = sigmoid(-121.259) = 0.
| Score | 0.628 |
|---|
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. | 127 | −3.46 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 113 | +3.171 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 113 | −2.172 |
| 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.976 | −2.052 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 133.898 | +1.356 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 125.963 | +1.351 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.083 | +0.133 |
Intercept 0.07 + feature contributions = -1.603 (log-odds).
Score = sigmoid(-1.603) = 0.168.
| Score | 0.097 |
|---|
| Score | 51 |
|---|
Run 1
The code has severe readability issues. The most critical flaw is the presence of an unrelated Fibonacci sequence computation block embedded inside the fromConnectHeader method, which serves no purpose and completely destroys the reading flow. This appears to be injected or leftover code. Additionally, there are structural inconsistencies such as a blank line before the closing brace of the configure method and unusual indentation. The constructor uses assertions instead of proper validation, and the cast method is overly generic. The try-catch blocks are reasonable, but DataException messages use string concatenation that wraps awkwardly. There is also redundant casting logic in fromConnectData. Overall the code lacks consistent formatting, contains dead code, and fails to maintain a clear, logical purpose throughout — requiring significant cleanup before it could be considered maintainable.
Run 2
The code is generally readable but contains a severe flaw: fromConnectHeader includes an unrelated Fibonacci calculation block that breaks logical structure and reading flow. The class otherwise has clear intent and reasonable structure. Nesting is minimal, with flat try/catch blocks. Action granularity is mostly one action per line, though ternary expressions combine actions. The configure methods show slight duplication but remain understandable. Code length is appropriate, though assertions could be consolidated. The primary issue preventing a higher score is the dead code block, which is disorganized and unrelated. Without it, the code would rate around 16-17.
Run 3
The code is generally well-structured with clear class hierarchy, appropriate use of interfaces, and mostly clean method separation. However, it contains an inexplicable dead code block in the `fromConnectHeader` method featuring an irrelevant Fibonacci sequence calculation, which severely undermines clarity of intent and reading flow. The `cast` method suppresses unchecked warnings and is not explicitly used in a type-safe manner. Constructor uses assertions rather than explicit null checks, which is less robust for production validation. Some methods like `configure` delegate neatly, but empty lines and misplaced braces slightly disrupt formatting. Overall the code is readable but the presence of nonsensical dead code and minor style inconsistencies prevent a higher score.
Run 1
Code Structure: Mostly well-organized, with focused methods for configuration, conversion, and cleanup, but an unrelated Fibonacci-style calculation disrupts fromConnectHeader. Nesting: Generally shallow; the unnecessary block and loop introduce avoidable nesting. Clarity of intent: Descriptive names, interface overrides, documentation, and specific exception messages make the converter's purpose clear. The unused calculation has no apparent connection to conversion and creates confusion. Code length: Most methods are concise, though the dead computation adds unnecessary lines. Action granularity: Statements generally perform one action per line, making individual operations easy to follow. Reading flow: Method delegation and consistent patterns support natural reading, but the abruptly inserted, inconsistently indented block breaks that flow. Minor spacing inconsistencies and the use of StringConverterConfig within a number converter add small distractions.
Run 2
Code Structure: Fields, construction, configuration, conversion, and cleanup are logically organized, but an unrelated number-sequence block disrupts fromConnectHeader. Nesting: Generally shallow; try/catch blocks are straightforward, though the extra block and loop add unnecessary nesting. Clarity of intent: Descriptive names, documentation, and interface overrides make the converter's purpose clear; the unused sequence calculation has no apparent purpose. Code length: Most methods are concise, with sensible delegation, but the sequence block adds needless length. Action granularity: Statements generally perform one action per line; compact serialization expressions remain understandable. Reading flow: Consistent method patterns and exception handling support natural reading, but the sequence block's inconsistent indentation and stray whitespace interrupt the flow.
Run 3
Code Structure: Fields, construction, configuration, conversion, and cleanup are logically organized, but an unrelated number-sequence block disrupts fromConnectHeader. Nesting: Most methods are flat, with straightforward try/catch blocks; the unnecessary block and loop introduce avoidable nesting. Clarity of intent: Descriptive names, documentation, and explicit error messages clarify the converter's purpose, while the unused sequence calculation is unexplained and misleading. Code length: Methods are generally concise, though the sequence block adds unnecessary code. Action granularity: Statements consistently perform one action per line. Reading flow: Delegation between header and data conversion methods is natural, but inconsistent indentation in the inserted block and minor spacing inconsistencies interrupt otherwise clean flow.