Sample
int-710ae28cb363-I05
Rewrite eligible decimal integer literals in hexadecimal notation
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.53 | 0–1; higher is more readable |
| Dorn | 0.482 | 0–1; higher is more readable |
| Mi | 0.48 | 0–1; higher is more readable |
| LLOC | 25 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 16.67 | 0–20; mean of three runs |
| GPT-6.1 Sol | 17 | 0–20; mean of three runs |
| BTTF | 0.389 | 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. | 2429.239 | −80.165 |
| Source linesThe number of non-empty source lines. | 69 | +27.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.012 | −7.518 |
Intercept 8.87 + feature contributions = -51.213 (log-odds).
Score = sigmoid(-51.213) = 0.
| Score | 0.53 |
|---|
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. | 70 | −1.442 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 60 | +1.338 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 60 | −0.956 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 95.914 | +0.743 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 68.835 | +0.552 |
| 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. | 95.957 | −0.399 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.095 | +0.022 |
Intercept 0.07 + feature contributions = -0.072 (log-odds).
Score = sigmoid(-0.072) = 0.482.
| Score | 0.48 |
|---|
| Score | 25 |
|---|
Run 1
The code is well-structured and follows a logical organization, grouping related methods and fields. Nesting is minimal, with only simple null-check conditional blocks. Intent is clear from meaningful names and concise method implementations. Length is appropriate for the functionality, with no unnecessary code. Action granularity is mostly one action per line, though nullsFirst()/nullsLast() combine lazy initialization and casting in a single expression. Reading flow is natural, moving from fields to methods to serialization. Minor deductions for the TODO comments that raise questions about correctness, and the cast expressions with suppressed warnings that require careful reading.
Run 2
This code is generally readable but has some advanced patterns. Structure is logical with clear sections for fields, methods, and serialization. Nesting is minimal (only one level in lazy initialization checks). Intent is mostly clear: natural ordering singleton with lazy caching of null-related orderings. However, generic type casts with @SuppressWarnings add complexity and require domain knowledge about type erasure. Code length is appropriate - concise without being cryptic. Action granularity is good, with one operation per line. Reading flow follows a natural progression. Minor deductions: the TODO comments reference technical debt without explaining current behavior, and the unchecked casts feel defensive rather than self-documenting. The class is simple but the type parameter gymnastics reduce clarity.
Run 3
The code is well-structured with clear class-level documentation, logical method ordering, and proper use of annotations. Nesting is minimal, with only simple null-check lazy initialization blocks. Intent is mostly clear - it's a singleton natural ordering implementation with cached nullsFirst/nullsLast instances. The code is concise with one action per line in most cases. Reading flow is natural, with methods following a logical progression. Minor deductions: the TODO comments with questioned suppression explanations ('the right way to explain this??') slightly reduce clarity, and the @SuppressWarnings annotations with unanswered questions add ambiguity. The lazy initialization pattern is slightly repetitive across nullsFirst() and nullsLast() methods. Overall, it's highly readable for a low-level collections utility class.
Run 1
Code Structure: Well-organized class with focused methods, clearly separated comparison, null handling, reversal, and singleton support. Nesting: Very shallow; only single-level conditionals in lazy initialization. Clarity of intent: Descriptive names and the class documentation communicate purpose, though complex annotated generics, unchecked casts, and unresolved suppression comments require extra interpretation. Code length: Compact and appropriate, with minor repetition between nullsFirst() and nullsLast() and repeated TODO comments. Action granularity: Most lines perform one action, but chained assignments combine local assignment and cache updates; inline annotations also make some declarations dense. Reading flow: Methods follow a coherent progression and consistent formatting, although tightly packed imports and verbose type annotations slightly interrupt scanning.
Run 2
Code Structure: Logically organized around a singleton natural ordering, with small, focused methods. Nesting: Very shallow; caching methods contain only one conditional each. Clarity of intent: Descriptive names and the class documentation communicate purpose well, although complex generic types, unchecked casts, and repeated unresolved TODO comments add friction. Code length: Concise overall; the parallel nullsFirst/nullsLast implementations are reasonable duplication. Action granularity: Most lines perform one action, but chained assignments combine updating the cache and local variable, and densely grouped annotations reduce scanability. Reading flow: Methods follow a coherent progression from comparison to ordering variants and singleton support. Limited spacing around imports and dense type annotations slightly interrupt an otherwise natural reading flow.
Run 3
Code Structure: A well-organized class with focused methods, though serialization details are separated near the end. Nesting: Very shallow, with only single-level conditionals for lazy initialization. Clarity of intent: Descriptive names and a class comment clearly communicate natural ordering and null handling; complex generic types, unchecked casts, and unresolved TODOs add cognitive overhead. Code length: Concise overall, with modest duplication between nullsFirst() and nullsLast(). Action granularity: Most statements perform one action, but chained assignments combine local assignment and cache updates, while compact annotation declarations reduce visual separation. Reading flow: Methods follow a natural progression from comparison to ordering variants and utility methods; dense annotations, repeated suppression comments, and minimal separation around imports slightly interrupt readability.