Sample
int-03d0d548cb92-I05
Rewrite eligible decimal integer literals in hexadecimal notation
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.781 | 0–1; higher is more readable |
| Dorn | 0.335 | 0–1; higher is more readable |
| Mi | 0.607 | 0–1; higher is more readable |
| LLOC | 41 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 16.33 | 0–20; mean of three runs |
| GPT-6.1 Sol | 17 | 0–20; mean of three runs |
| BTTF | 0.435 | 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. | 3614.465 | −119.277 |
| Source linesThe number of non-empty source lines. | 119 | +47.6 |
| Byte entropyHow varied the bytes in the source text are. Repeated bytes give a lower value; a more even mixture gives a higher value. | 5.13 | −7.695 |
Intercept 8.87 + feature contributions = -70.503 (log-odds).
Score = sigmoid(-70.503) = 0.
| Score | 0.781 |
|---|
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. | 119 | −3.177 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 87 | +2.272 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 86 | −1.553 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 118.85 | +1.251 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 105.075 | +0.891 |
| 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. | 105.975 | −0.823 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.058 | +0.382 |
Intercept 0.07 + feature contributions = -0.687 (log-odds).
Score = sigmoid(-0.687) = 0.335.
| Score | 0.607 |
|---|
| Score | 41 |
|---|
Run 1
The code is highly readable numeric utility code. Structure is logical: constants, simple getters, normalization, conversion, and a helper. Nesting is minimal—only a two-level conditional in bigToDouble. Intent is clear from meaningful names and comments, especially around tricky bit manipulation and rounding logic. Length is appropriate; verbose comments are justified for non-obvious algorithms. Action granularity is mostly one action per line, though some dense bitwise expressions occur in the conversion method. Reading flow is natural, with constants grouped by purpose and methods progressing from simple to complex. Minor deductions: use of hex literals like 0x1/0x0 slightly reduces readability compared to plain 1/0, and a few long bit-shift lines could be broken down, but overall this is exemplary low-level numerical code.
Run 2
The code is generally well-structured and readable, with a clear organization into constants, helper methods, and a primary conversion method. It uses static imports effectively. The main readability strengths are good naming, logical grouping, and explanatory comments for complex bit manipulation. However, it loses points due to moderately dense bitwise logic in `bigToDouble`, which requires careful study, and some nested conditional logic. The use of hex constants like `0x1` and `0x3ff` instead of clearer decimal or named equivalents slightly reduces clarity. Action granularity is mostly one action per line, and reading flow is natural for the most part, though the long comments break up the flow in the central method.
Run 3
The code is well-structured and readable for a low-level utility class. It uses constants with clear names, keeps methods small and cohesive, and minimizes deep nesting. Each method has a single clear purpose, and complex logic is broken into readable steps with inline comments explaining non-obvious bit manipulation. Some areas, such as the bigToDouble method, could be clearer due to magic numbers and dense bitwise operations, but overall action granularity and reading flow are good. The use of comments and descriptive variable names improves clarity of intent. Minor deductions for the heavy use of bit-level code and magic numbers in places.
Run 1
Code Structure: Well-organized utility class with focused methods and named constants; ONE_BITS would fit more naturally alongside the other constants. Nesting: Very shallow, with simple conditionals and early returns. Clarity of intent: Descriptive names and detailed comments explain the floating-point representation and rounding algorithm, although abbreviated significand variables, hexadecimal small integers, and dense bitwise expressions require careful reading. Code length: Generally concise; the longer bigToDouble method is justified by its specialized algorithm and explanatory comments. Action granularity: Statements mostly perform one action per line, with intermediate variables separating computation stages; the rounding predicate combines several conditions densely. Reading flow: Methods proceed naturally from validation and extraction to computation and return, while comments guide the complex conversion logic. Minor formatting issues and a misleading 'not a normal value' validation message slightly reduce readability.
Run 2
Code Structure: Cohesive utility class with focused methods and named bit-mask constants; ONE_BITS would fit more naturally alongside other constants. Nesting: Minimal nesting and early returns keep control flow straightforward. Clarity of intent: Descriptive method names and detailed comments explain complex floating-point operations, although abbreviated variables, hexadecimal small integers, and dense rounding expressions increase cognitive load. Code length: Appropriately concise for specialized numerical logic; longer comments mostly provide valuable context. Action granularity: Statements generally perform one action each, with intermediate variables separating calculation stages; the increment expression combines several conditions. Reading flow: Consistent formatting and sequential computation make methods easy to follow, but tightly packed imports and occasional misleading terminology, such as the finite-value check's 'not a normal value' message, slightly reduce readability.
Run 3
Code Structure: Well-organized utility class with named constants and focused methods; ONE_BITS would fit more naturally alongside the other constants. Nesting: Very shallow, with early returns keeping the conversion algorithm mostly linear. Clarity of intent: Descriptive method names and detailed comments explain specialized floating-point operations, though hexadecimal small integers, abbreviated variables, and a dense rounding condition increase cognitive effort. Code length: Mostly concise; the longer bigToDouble method is justified by its algorithm and explanatory comments. Action granularity: Statements generally perform one action per line, with intermediate variables making transformations traceable. Reading flow: Consistent formatting and sequential computation support natural reading, although understanding bit manipulation requires domain knowledge and occasional rereading.