Sample
int-ddb0f8587130-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.767 | 0–1; higher is more readable |
| Dorn | 0.333 | 0–1; higher is more readable |
| Mi | 0.617 | 0–1; higher is more readable |
| LLOC | 45 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 12.67 | 0–20; mean of three runs |
| GPT-6.1 Sol | 15.33 | 0–20; mean of three runs |
| BTTF | 0.52 | 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. | 3758.09 | −124.017 |
| 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. | 5.118 | −7.677 |
Intercept 8.87 + feature contributions = -72.424 (log-odds).
Score = sigmoid(-72.424) = 0.
| Score | 0.767 |
|---|
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. | 126 | −3.425 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 94 | +2.514 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 93 | −1.713 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 125.851 | +1.349 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 94.528 | +0.721 |
| 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.945 | −0.568 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.06 | +0.359 |
Intercept 0.07 + feature contributions = -0.693 (log-odds).
Score = sigmoid(-0.693) = 0.333.
| Score | 0.617 |
|---|
| Score | 45 |
|---|
Run 1
The code is highly readable overall, with strong organization, clear intent, and appropriate granularity. Constants are well-named and documented, and methods are concise with explanatory comments where needed. The structure is logical, and nesting is minimal. However, there is a notable issue in `getSignificand`: a seemingly unrelated artificial block for a feature toggle, which breaks reading flow and clarity. Additionally, while `bigToDouble` is well-commented, it involves complex bit manipulation that may be hard to follow without deeper context. These minor issues slightly reduce readability.
Run 2
The code generally has clear purpose, good constants naming, and helpful comments explaining non-obvious bit manipulation, especially in bigToDouble. However, there are several readability issues. The getSignificand method contains an unrelated, dead-code loop toggling a local boolean, which is confusing and disrupts reading flow. The action granularity is inconsistent; some lines combine multiple operations while others are well-separated. There are also jarring inconsistencies such as misplaced or extra braces near getSignificand and a misplaced static field at the bottom of the file. These issues add clutter and make the structure feel tangled despite meaningful variable names and reasonable method length.
Run 3
The code demonstrates significant readability issues. The major problems include: a bizarre dead code block with an unnecessary loop inside getSignificand, inconsistent helper method availability (ONE_BITS is declared at the bottom but used above it), and unclear action granularity in several methods. The bigToDouble method has deeply complex bit manipulation with explanatory comments that are themselves hard to follow. While the class has a logical structure with clear section separation using comments for constants, and method names are mostly descriptive, the overall clarity is hampered by the dead code, scattered constant declarations, and complex nested logic. The reading flow is disrupted by having to jump between constant definitions and usage. Some methods like isFinite and isNormal are well-written and clear, but the complex bit-twiddling methods would benefit from extraction of helper methods. The presence of the nonsensical featureEnabled loop suggests poor code maintenance or generated code artifacts.
Run 1
Code Structure: Focused utility methods and named constants provide logical organization, but the unrelated featureEnabled block disrupts getSignificand. Nesting: Mostly flat, with early returns; the unnecessary block and loop add avoidable nesting. Clarity of intent: Descriptive names and detailed comments explain complex floating-point operations, though dense bitwise expressions require specialist knowledge and the toggle loop has no apparent purpose. Code length: Generally concise for the numerical complexity, with useful explanatory comments; the unused toggle logic is unnecessary. Action granularity: Statements typically perform one action per line, although rounding expressions combine several conditions. Reading flow: Methods follow clear computational sequences, but the poorly indented inserted block interrupts the flow, and ONE_BITS being declared at the end separates it from related constants.
Run 2
Code Structure: Cohesive utility methods and named constants provide logical organization, but the unrelated featureEnabled block disrupts getSignificand. Nesting: Mostly flat, with early returns; the unnecessary block and loop add avoidable nesting. Clarity of intent: Descriptive method names and detailed comments explain floating-point operations, although dense bit manipulation requires domain knowledge and the toggle loop has no apparent purpose. Code length: Generally justified by the numerical algorithm, but the unused toggle logic adds needless length. Action granularity: Statements generally perform one action per line; compound rounding expressions remain somewhat demanding. Reading flow: Methods follow a natural calculate-and-return progression, but inconsistent indentation in the inserted block, tightly packed imports, and ONE_BITS being declared at the end interrupt otherwise clear presentation.
Run 3
Code Structure: Well-separated utility methods and named constants provide logical organization, but the unrelated feature-toggle block disrupts getSignificand. Nesting: Mostly flat, with shallow conditionals; the redundant block and loop add unnecessary nesting. Clarity of intent: Descriptive names and detailed comments explain complex floating-point operations, although dense bitwise expressions require domain knowledge and the unused toggle has no apparent purpose. Code length: Generally appropriate for the algorithm, but the toggle block is unnecessary and some comments are lengthy. Action granularity: Statements generally perform one action per line, making intermediate calculations easy to follow. Reading flow: Methods progress naturally from validation through calculation to return, but inconsistent indentation in the inserted block and placement of ONE_BITS at the end slightly interrupt the flow.