Sample
int-89ae5a3cfb4f-I05
Rewrite eligible decimal integer literals in hexadecimal notation
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 | 16 | 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 highly readable with a clear, logical structure. The class hierarchy and field declarations are well-organized, and method implementations are concise. Nesting is minimal—only conditional/ternary and try-catch blocks are used. Intent is clear from descriptive method/field names and Javadoc. Action granularity is excellent: most operations take one line, except for concise one-liners in `configure` and `fromConnectData` that still remain readable. Reading flow is natural, with methods grouped by interface responsibilities. Minor deductions: the `cast` method suppresses a warning and has a potentially confusing generic T parameter; the `configure` method has a blank line before the closing brace; and the constructor uses assertions instead of explicit argument validation, which slightly obscures runtime intent.
Run 2
The code is generally well-structured and readable. It has clear class and method organization, meaningful names, and reasonable Javadoc. Methods are concise and each performs a specific action. However, there are some issues that reduce clarity: the 'schema' parameter in 'fromConnectData' and 'fromConnectHeader' is unused, which may confuse readers about its purpose. The 'cast' method uses unchecked suppression without additional clarity on safety. The 'configure' method contains an unused local variable 'conf' and delegates in a way that slightly obscures flow. Nesting is minimal, and error handling is explicit. Overall, the code is approachable but could be improved by removing unused parameters and simplifying configuration delegation.
Run 3
The code is well-structured and readable. It has a clear class purpose, logical organization, and flat nesting. Method names are descriptive, and each action is generally one per line. The constructor uses asserts for validation, which is concise but may be less explicit than throwing exceptions. Minor issues include a blank line inside configure(), a long import for 'Utils', and the use of 'assert' which can be disabled. The try-catch blocks are simple and error handling is clear. Overall it is concise, maintainable, and easy to follow, but a few minor style inconsistencies and reliance on assertions prevent a top score.
Run 1
Code Structure: Fields, constructor, configuration, conversion, and cleanup methods are logically organized, with header conversion delegating to existing methods. Nesting: Minimal nesting; short try/catch blocks keep control flow straightforward. Clarity of intent: Descriptive names, documentation, and explicit exception messages communicate the converter’s purpose well. The unchecked cast and StringConverterConfig reference slightly obscure type safety and configuration intent. Code length: Concise methods and delegation avoid unnecessary duplication; documentation is proportionate. Action granularity: Statements generally perform one action per line, although serialization combines null handling, casting, and delegation in one expression. Reading flow: Consistent method patterns make the class easy to scan, with minor formatting issues such as missing separation before an annotation and an extra blank line in configure.
Run 2
Code Structure: Well-organized fields, constructor, configuration, conversion, and cleanup methods; header conversion delegates cleanly to shared logic. Nesting: Shallow, with only straightforward try/catch blocks and ternary expressions. Clarity of intent: Descriptive names, interface overrides, and documentation make the numeric converter's purpose clear, though the unchecked cast and StringConverterConfig constant slightly obscure implementation intent. Code length: Concise methods and minimal duplication keep the class compact; constructor documentation is somewhat repetitive. Action granularity: Statements generally perform one action per line, with modest expression complexity in serialization and configuration. Reading flow: Methods follow a natural lifecycle and conversion sequence. Minor formatting inconsistencies, including missing separation before one override and an extra blank line in configure, slightly reduce polish.
Run 3
Code Structure: Well-organized class with focused methods, grouped dependencies, and header conversion delegated to existing conversion methods. Nesting: Shallow, limited to straightforward try/catch blocks. Clarity of intent: Descriptive names, constructor documentation, and explicit exception messages make the converter's purpose clear; the unchecked generic cast and StringConverterConfig reference introduce minor ambiguity. Code length: Concise, with little duplication and appropriately short methods. Action granularity: Generally one action per line, though serialization combines null handling, casting, and delegation in one expression. Reading flow: Natural progression from construction through configuration, conversion, and cleanup. Minor formatting inconsistencies, including missing blank lines between some declarations and an extra blank line in configure, slightly reduce polish.