Sample
int-ace67483c043-SRC
Unmodified source class
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.782 | 0–1; higher is more readable |
| Dorn | 0.355 | 0–1; higher is more readable |
| Mi | 0.6 | 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.579 | 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. | 3526.302 | −116.368 |
| 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.122 | −7.683 |
Intercept 8.87 + feature contributions = -67.581 (log-odds).
Score = sigmoid(-67.581) = 0.
| Score | 0.782 |
|---|
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.881 | +1.252 |
| 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.058 | +0.378 |
Intercept 0.07 + feature contributions = -0.598 (log-odds).
Score = sigmoid(-0.598) = 0.355.
| Score | 0.6 |
|---|
| Score | 41 |
|---|
Run 1
The code demonstrates strong readability through clear organization: constants are grouped with documented purposes, methods follow a logical flow, and there is a good balance of comments explaining complex logic (like the bit manipulation in bigToDouble) without over-commenting simple operations. Nesting is minimal — the deepest logic in bigToDouble uses early returns and clear conditional blocks, avoiding unnecessary indentation. Intent is generally clear from method and variable names (e.g., getSignificand, isFinite, isNormal), though the bit-level operations in bigToDouble require domain knowledge. Code length is appropriate for the functionality; no obvious redundancy. Action granularity is mostly one action per line, though some dense lines (e.g., the boolean increment expression) could be split for clarity. Reading flow is natural, moving from simple utilities to more complex conversions. Deductions stem from the inherent complexity of low-level floating-point bit handling and a few slightly terse comment blocks.
Run 2
The code is generally well-structured with clear constants, helper methods, and logical organization. It avoids deep nesting and keeps most expressions concise. However, the `bigToDouble` method contains dense bit-manipulation logic with lengthy inline comments that, while helpful, make the flow harder to follow. Some lines combine multiple operations, and the use of magic numbers/bit masks requires domain knowledge. The reading flow is reasonable but interrupted by complex rounding logic.
Run 3
The code is highly readable due to its clear structure, consistent formatting, and well-documented constants and methods. Logical grouping of constants at the top aids understanding. Nesting is minimal, keeping the flow flat and straightforward. The intent of each utility method is clear from its name and Javadoc comments. Action granularity is good—each line performs a single, focused operation, particularly in the complex `bigToDouble` method. However, that method's bit-manipulation logic with long comments is inherently complex and could still be challenging for less experienced readers. The reading flow is natural and top-down. Minor improvement could come from extracting parts of `bigToDouble` into smaller helper methods, but overall, it is excellent.
Run 1
Code Structure: Well-organized utility class with focused methods and named constants, though ONE_BITS is separated from related constants. Nesting: Shallow conditionals and early returns keep control flow simple. Clarity of intent: Descriptive method names and detailed comments explain floating-point operations, but abbreviated variables and dense bitwise rounding expressions require specialized knowledge. Code length: Appropriately concise implementation; lengthy comments largely justify themselves by explaining numerical subtleties. Action granularity: Statements generally perform one action per line, with only a few expressions combining several logical operations. Reading flow: Consistent formatting and a logical progression support easy scanning, although bigToDouble requires careful reading and the 'not a normal value' validation message does not precisely describe its finite-value check.
Run 2
Code Structure: Logically organized utility methods and named constants provide clear separation of responsibilities, although ONE_BITS is declared away from related constants. Nesting: Shallow conditionals and early returns keep control flow straightforward. Clarity of intent: Descriptive method names and detailed comments explain floating-point operations, but abbreviated variables and dense bitwise rounding logic require specialist knowledge. Code length: Mostly concise; the longer conversion method and comments are justified by algorithmic complexity. Action granularity: Statements generally perform one action per line, though the rounding condition combines several tests. Reading flow: Consistent formatting and sequential calculation steps support natural reading, with minor friction from compressed import spacing and technically demanding expressions.
Run 3
Code Structure: Well-organized utility class with focused methods and named constants, though ONE_BITS appears after its use rather than alongside related constants. Nesting: Shallow conditionals and early returns keep control flow simple. Clarity of intent: Descriptive method names and detailed comments explain specialized floating-point operations, but abbreviated variables and dense bitwise rounding expressions require careful reading. Code length: Appropriately concise for the mathematical complexity; longer comments provide useful context rather than unnecessary verbosity. Action granularity: Statements generally perform one action per line, although some expressions combine several bitwise and logical operations. Reading flow: Methods progress naturally from extracting properties to normalization and conversion, with comments guiding the complex conversion algorithm. Minor inconsistencies, such as the 'not a normal value' message for a finiteness check, slightly weaken clarity.