Sample
int-64ca7d1f0a67-I12
Inline all eligible single-use intermediate local variables
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.784 | 0–1; higher is more readable |
| Dorn | 0.352 | 0–1; higher is more readable |
| Mi | 0.578 | 0–1; higher is more readable |
| LLOC | 38 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 15.67 | 0–20; mean of three runs |
| GPT-6.1 Sol | 17 | 0–20; mean of three runs |
| BTTF | 0.388 | 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. | 3451.774 | −113.909 |
| 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.129 | −7.693 |
Intercept 8.87 + feature contributions = -65.132 (log-odds).
Score = sigmoid(-65.132) = 0.
| Score | 0.784 |
|---|
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.851 | +1.251 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 95.042 | +0.729 |
| 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. | 99.983 | −0.57 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.059 | +0.366 |
Intercept 0.07 + feature contributions = -0.611 (log-odds).
Score = sigmoid(-0.611) = 0.352.
| Score | 0.578 |
|---|
| Score | 38 |
|---|
Run 1
The code is generally well-structured and readable, with clear constants, descriptive method names, and helpful comments explaining complex bit manipulation logic. However, readability is hindered by the heavy reliance on low-level bit operations without introductory context, and some methods (notably `bigToDouble`) are dense and require significant domain knowledge to parse. The code length is justified by the complexity of the operations, but action granularity sometimes suffers, as multiple related operations are chained into single statements (e.g., `return longBitsToDouble((doubleToRawLongBits(x) & SIGNIFICAND_MASK) | ONE_BITS);`). Reading flow is mostly logical, but some explanatory comments are lengthy and could be condensed. Overall, it's readable for an experienced audience but not immediately accessible to a generalist.
Run 2
The code is generally well-structured and readable. Constants are clearly named and documented, methods are short and focused, and comments explain non-obvious algorithms. The bit manipulation logic in bigToDouble is inherently complex, but the comments help. Minor issues: inconsistent use of blank lines after method declarations, some long lines, and the magic number `ONE_BITS` is defined at the bottom without immediate context. The reading flow could be slightly improved by grouping related methods together. Overall, it's understandable for experienced developers familiar with IEEE 754, but the domain complexity prevents a higher score.
Run 3
The code is generally readable with clear structure, flat nesting, and logical organization. Constants are well-documented with comments explaining their purpose based on the IEEE 754 double format. Method names are descriptive and intent-revealing. The comments for complex operations like bigToDouble and scaleNormalize provide helpful context and rationale. Action granularity is mostly one operation per line. However, readability is slightly reduced by the heavy reliance on bit manipulation which requires domain knowledge of double representation. Some lines with bitwise operations and shifting are inherently dense. The bigToDouble method has a moderately complex section with several bit operations that could benefit from further decomposition or additional inline comments. Despite this, the code maintains good reading flow and avoids unnecessary nesting.
Run 1
Code Structure: Well organized into a focused utility class with named constants and small methods, though ONE_BITS would fit better alongside the other constants. Nesting: Minimal; early returns keep the main conversion method flat. Clarity of intent: Descriptive method names and detailed comments explain the bit manipulation and rounding, but abbreviated variables and dense expressions require IEEE 754 knowledge. Code length: Mostly concise; the longer conversion method and its explanatory comments are justified by the algorithm's complexity. Action granularity: Generally one operation per line, with a few compound expressions combining several bitwise or logical operations. Reading flow: Natural progression from constants to helpers and conversion logic; occasional unnecessary parentheses, blank lines, and the trailing constant slightly interrupt consistency.
Run 2
Code Structure: Well-organized utility class with named constants and focused methods; ONE_BITS would fit more naturally beside the other constants. Nesting: Shallow conditionals and early returns keep control flow straightforward. Clarity of intent: Descriptive names and detailed comments explain floating-point representation and rounding, although dense bitwise expressions require specialist knowledge. Code length: Mostly concise; the longer bigToDouble method and its comments are justified by algorithmic complexity. Action granularity: Statements generally perform one action each, with intermediate variables separating calculation steps; some compound expressions remain demanding. Reading flow: Methods progress naturally from validation through computation to return values. Minor formatting inconsistencies, redundant parentheses, and an imprecise validation message slightly reduce readability.
Run 3
Code Structure: Well-organized utility class with named constants and focused methods; ONE_BITS would fit more naturally beside the other constants. Nesting: Minimal nesting, with straightforward early returns. Clarity of intent: Descriptive names and detailed comments explain otherwise difficult IEEE-754 operations, although dense bit manipulation and the 'not a normal value' message for a finiteness check introduce ambiguity. Code length: Appropriately concise for the numerical complexity; longer comments provide useful context rather than unnecessary bulk. Action granularity: Most lines perform one clear action, though the rounding condition combines several operations and requires careful reading. Reading flow: Generally natural, progressing from constants through small helpers to conversion logic, but complex expressions, occasional extra parentheses, and inconsistent blank lines slightly interrupt the flow.