Sample
int-a2a8c9b274e5-I05
Rewrite eligible decimal integer literals in hexadecimal notation
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.566 | 0–1; higher is more readable |
| Dorn | 0.903 | 0–1; higher is more readable |
| Mi | 0.776 | 0–1; higher is more readable |
| LLOC | 53 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 17.33 | 0–20; mean of three runs |
| GPT-6.1 Sol | 18 | 0–20; mean of three runs |
| BTTF | 0.448 | 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. | 4612.687 | −152.219 |
| Source linesThe number of non-empty source lines. | 147 | +58.8 |
| Byte entropyHow varied the bytes in the source text are. Repeated bytes give a lower value; a more even mixture gives a higher value. | 4.812 | −7.218 |
Intercept 8.87 + feature contributions = -91.766 (log-odds).
Score = sigmoid(-91.766) = 0.
| Score | 0.566 |
|---|
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. | 148 | −4.204 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 141 | +4.14 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 146.673 | +1.64 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 95.676 | +0.739 |
| 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. | 96.919 | −0.44 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.108 | −0.109 |
Intercept 0.07 + feature contributions = 2.235 (log-odds).
Score = sigmoid(2.235) = 0.903.
| Score | 0.776 |
|---|
| Score | 53 |
|---|
Run 1
This code is highly readable. The class has a clear single responsibility: providing a descending view of a multiset. The structure is logical, with methods grouped by concern and following the `SortedMultiset` contract. Nesting is minimal; the only inner class is justified for the entry set and has a clear purpose. Intent is evident from method names like `descendingMultiset()` and comments explaining deferred initialization. Code length is appropriate for the functionality, avoiding unnecessary boilerplate through delegation to `forwardMultiset()`. Each method performs one logical action, adhering to good action granularity. The reading flow is natural: constructors, comparator, element set, then mutating/derivative views. Layering with lazy initialization fields (`@LazyInit`) is a standard pattern here and does not obscure logic. Overall, only minor verbose annotations slightly reduce readability, but structure and clarity are excellent.
Run 2
The code is highly readable. It follows a clear, logical structure with methods organized by functionality. Nesting is minimal and mostly flat, with only one small inner class that is well-scoped. Intent is clear: each method explicitly delegates to the forward multiset, making the reverse-order behavior obvious. The code is concise, avoiding redundancy through delegation. Action granularity is appropriate, with single responsibilities per line or expression. Reading flow is natural, from comparator to element set to entry operations. Minor deductions: the lazy initialization pattern is slightly repetitive (three fields with similar null-check logic), and a few long lines reduce readability, but overall this is excellent code.
Run 3
The code is well-structured and readable. It follows a consistent pattern of delegating to the forward multiset with reversed operations, making the intent clear. The class uses lazy initialization for comparator, elementSet, and entrySet, which is a common and understandable pattern. Methods are concise and have clear purposes, with meaningful names. Nesting is minimal except for one inner class, which is appropriately used. Action granularity is good, with most methods containing one logical operation. Nullability annotations and Javadoc improve clarity. The reading flow is logical, grouping related operations together. Minor deductions: some one-line return statements combine assignment and return, slightly reducing readability. The inner class could be extracted but is acceptable given its tight coupling. Overall, this is well-written library code.
Run 1
Code Structure: Well-organized skeleton implementation with small, focused methods, though cached fields are interspersed with methods. Nesting: Mostly flat; lazy-initialization checks and a small local class introduce only modest nesting. Clarity of intent: Descriptive names and class documentation clearly convey the descending-view behavior; reversed delegation makes the implementation easy to understand. Code length: Concise for its responsibilities, with necessary interface overrides and little unnecessary logic. Action granularity: Most lines perform one action, but assignment within return expressions and the entrySet ternary combine caching and returning, slightly reducing readability. Reading flow: Consistent formatting and straightforward delegation support natural reading, although related first/last operations are separated and lazy initialization uses inconsistent styles. Annotations and generic types add visual complexity but provide useful contract information.
Run 2
Code Structure: Well-organized adapter with focused overrides and localized caching fields, though related methods could be grouped more consistently. Nesting: Mostly flat; only simple conditionals and a small local class introduce nesting. Clarity of intent: Descriptive names, class documentation, and explicit first/last and head/tail reversals clearly communicate descending-view behavior. Code length: Concise delegation avoids unnecessary implementation detail; annotations and generic signatures add some visual weight. Action granularity: Most statements perform one action, but assignment inside a return and a ternary combines caching with result selection. Reading flow: Consistent formatting and short methods make scanning easy, although inconsistent lazy-initialization styles and scattered related operations slightly interrupt the flow.
Run 3
Code Structure: Well-organized skeletal implementation with focused overrides and localized caching logic, though related reversed operations could be grouped more closely. Nesting: Mostly flat methods; the local entry-set class adds only modest nesting. Clarity of intent: Descriptive names and class documentation clearly convey the descending-view purpose, with straightforward delegation and reversal. Generic types and annotations add some visual complexity. Code length: Concise for the functionality provided; most methods are short, without unnecessary logic. Action granularity: Generally one action per line, but assignment within return statements and the entrySet ternary combine caching and returning, slightly reducing clarity. Reading flow: Consistent formatting and predictable delegation make scanning easy, although differing lazy-initialization styles and scattered related methods mildly interrupt the flow.