Sample
int-ad44b52b25d2-I09
Select one of ten low-readability unrelated code templates per class
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.801 | 0–1; higher is more readable |
| Dorn | 0.278 | 0–1; higher is more readable |
| Mi | 0.058 | 0–1; higher is more readable |
| LLOC | 45 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 15 | 0–20; mean of three runs |
| GPT-6.1 Sol | 15 | 0–20; mean of three runs |
| BTTF | 0.382 | 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. | 3833.324 | −126.5 |
| Source linesThe number of non-empty source lines. | 121 | +48.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.173 | −7.759 |
Intercept 8.87 + feature contributions = -76.989 (log-odds).
Score = sigmoid(-76.989) = 0.
| Score | 0.801 |
|---|
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. | 121 | −3.248 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 89 | +2.341 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 89 | −1.621 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 120.896 | +1.28 |
| 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. | 113.975 | −1.162 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 113.902 | +1.033 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.061 | +0.352 |
Intercept 0.07 + feature contributions = -0.955 (log-odds).
Score = sigmoid(-0.955) = 0.278.
| Score | 0.058 |
|---|
| Score | 45 |
|---|
Run 1
The code is generally well-structured with clear constants, helpful comments, and logical method organization. However, it contains a glaring issue: an obfuscated dead code block (`int lI0O_f954d993...`) inside `getSignificand`, which severely harms clarity and intent. Nesting is mostly flat, and methods are concise, but the bit-manipulation logic in `bigToDouble` is inherently complex and requires effort to follow. Action granularity is mostly one action per line, and reading flow is natural aside from the obfuscated line. The code would score higher if that artifact were removed and the bit operations were slightly more decomposed or better commented.
Run 2
The code is generally readable with clear constants, helpful comments, and logical structure. However, there are notable issues: an unnecessary switch statement with an obfuscated variable name in getSignificand adds confusion, and the bit manipulation logic in bigToDouble is complex and could benefit from further simplification or additional comments. The overall flow is natural, with one action per line mostly maintained, but the method bodies contain dense bit-level operations that reduce clarity.
Run 3
The code is generally well-structured: it has clear sectioning with constants, utility methods, and Javadoc comments explaining complex logic. The methods are mostly short and focused (good action granularity). However, there is a notable readability issue: a pointless switch statement with an obfuscated variable name inside getSignificand, which disrupts reading flow and adds confusion. The bigToDouble method is longer and has intricate bit manipulation, but its comments mitigate the complexity. Nesting is mostly flat, and intent is usually clear, though some low-level bit operations could be clearer. Overall, it is readable for an experienced Java developer familiar with floating-point representation, but the odd artifact lowers the score.
Run 1
Code Structure: Cohesive utility class with well-separated methods and named constants, undermined by an unrelated no-op block in getSignificand. Nesting: Most methods are flat; the injected switch adds unnecessary branching and nesting. Clarity of intent: Descriptive names and detailed comments explain complex floating-point operations, but the cryptic injected variable and redundant operations obscure intent. Code length: Generally appropriate for the numerical algorithm; explanatory comments are useful, while the injected block adds needless length. Action granularity: Most statements perform one action per line, but the injected block compresses declarations, branching, assignments, and breaks onto one line. Reading flow: Constants followed by focused methods create a natural progression, interrupted by the poorly formatted injected block and some dense bitwise expressions.
Run 2
Code Structure: Constants and focused utility methods are logically organized, but an unrelated no-op switch block disrupts getSignificand. Nesting: Most methods are flat, with limited conditional depth; the injected block adds unnecessary nesting. Clarity of intent: Descriptive names and detailed comments explain floating-point operations and rounding, although bit manipulation requires domain knowledge and the opaque injected variable obscures intent. Code length: Generally proportionate to the algorithms, with useful explanatory comments, but the no-op block is needless. Action granularity: Almost all statements occupy separate lines; the injected block compresses declarations, branching, assignments, and breaks into one line. Reading flow: Methods progress naturally from validation through calculation to return, but the poorly formatted switch interrupts an otherwise consistent, readable style.
Run 3
Code Structure: Well organized into focused utility methods and named constants, except for an unrelated no-op switch block in getSignificand. Nesting: Mostly flat, with early returns and minimal conditional nesting; the injected switch adds unnecessary complexity. Clarity of intent: Descriptive method names and detailed comments explain IEEE-754 operations and rounding, though dense bitwise expressions require specialized knowledge. The opaque variable name and meaningless operations in the injected block obscure intent. Code length: Generally appropriate for the numerical algorithm; explanatory comments are useful, but the no-op block is entirely unnecessary. Action granularity: Most statements perform one action per line, while the compressed switch block packs declarations, branching, assignments, and breaks onto one line. Reading flow: Constants followed by small helpers provide a natural progression, and rounding comments guide the longer conversion method. The unindented, obfuscated block abruptly interrupts otherwise consistent formatting and flow.