Sample
int-3696c2ef764f-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.557 | 0–1; higher is more readable |
| Dorn | 0.251 | 0–1; higher is more readable |
| Mi | 0.776 | 0–1; higher is more readable |
| LLOC | 58 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 11 | 0–20; mean of three runs |
| GPT-6.1 Sol | 15.67 | 0–20; mean of three runs |
| BTTF | 0.147 | 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. | 4894.488 | −161.518 |
| Source linesThe number of non-empty source lines. | 156 | +62.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. | 4.817 | −7.225 |
Intercept 8.87 + feature contributions = -97.473 (log-odds).
Score = sigmoid(-97.473) = 0.
| Score | 0.557 |
|---|
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. | 157 | −4.523 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 149 | +4.417 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 150 | −3.021 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 155.714 | +1.767 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 95.745 | +0.74 |
| 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.962 | −0.442 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.108 | −0.103 |
Intercept 0.07 + feature contributions = -1.095 (log-odds).
Score = sigmoid(-1.095) = 0.251.
| Score | 0.776 |
|---|
| Score | 58 |
|---|
Run 1
The code exhibits significant readability issues. There is extraneous dead code inside descendingMultiset() with an unreachable block computing travelDistance that serves no purpose, creating confusion. The overall structure mixes lazy initialization, delegation, and type-specific logic without clear sectioning. Some methods are concise and readable, but deep nesting appears in inner class definitions and conditional assignments. Action granularity is mostly one action per line, yet the readability is undermined by the presence of boilerplate and inconsistent handling of lazy fields. The use of concise returns is good, but the unexplained dead block and tangled interleaving of concerns—comparator caching, element set creation, entry set management—obscure intent. Naming is generally clear, and method delegation follows a logical symmetry (first/last, head/tail), but the residual dead code suggests poor maintenance or accidental insertion, negatively impacting trust in the code's clarity. The class would benefit from removing the stray code and better grouping of related fields and methods.
Run 2
The code is logically organized but contains a glaring defect: an unrelated block of distance-calculation logic is embedded inside the descendingMultiset() method. This breaks action granularity, reading flow, and clarity of intent, making the code read like a copy-paste error. Nesting could be better; while most methods are flat, the class-level structure is verbose due to repeated lazy initialization of fields and delegation wrappers, which adds length. However, naming is clear, the purpose of each method is mostly obvious, and delegation to forwardMultiset() follows a consistent pattern. The EntrySetImpl inner class is appropriately scoped, but it adds nesting. Overall, the stray code block significantly damages readability, preventing a high score despite otherwise decent structure.
Run 3
The code is generally well-structured with clear imports, annotations, and method organization following a logical pattern. Most methods are concise with single actions per line and clear intent. However, several issues reduce readability: a bizarre dead code block exists inside descendingMultiset() with unused local variables (startingPosition, endingPosition, travelDistance) that serves no purpose. There's inconsistent lazy initialization style between comparator()/elementSet() (if-null with assignment) versus entrySet() (ternary with assignment). Some methods have ambiguous nullness contracts with @Nullable and @ParametricNullness mixed. The class implements many methods but some are just delegate calls, creating visual noise. Method ordering could better group overrides (comparator, elementSet, entrySet) with core logic. Deep inheritance (extends ForwardingMultiset implements SortedMultiset) requires understanding parent classes. The stray dead code block suggests copy-paste errors or incomplete refactoring, significantly harming clarity.
Run 1
Code Structure: Mostly well-organized, with small delegation methods and a localized entry-set implementation, but descendingMultiset() contains an unrelated calculation block. Nesting: Generally shallow; the local class and extraneous nested block add modest complexity. Clarity of intent: Descriptive names, documentation, and explicit reversed operations clearly communicate the descending view; unused travelDistance calculations obscure one method's purpose. Code length: Mostly concise, though the unrelated block adds unnecessary lines. Action granularity: Most lines perform one action, but assignment within return expressions and the entrySet() ternary combine caching and returning. Reading flow: Consistent formatting and straightforward delegation support natural reading, interrupted by the poorly indented calculation block and slightly inconsistent lazy-initialization styles.
Run 2
Code Structure: Mostly well-organized, with small delegation methods and localized caching, but descendingMultiset() contains an unrelated distance calculation. Nesting: Generally shallow; the local entry-set class is reasonable, while the extra block and conditional in descendingMultiset() add needless nesting. Clarity of intent: Descriptive names and documentation explain descending-view behavior, but the unused distance calculation obscures that purpose. Code length: Most methods are concise; the irrelevant calculation unnecessarily increases length. Action granularity: Usually one action per line, though assignment within return expressions and the entrySet() ternary compress multiple actions. Reading flow: Consistent overrides and straightforward delegation make the class easy to scan, but the poorly indented inserted block interrupts the flow, and inconsistent lazy-initialization styles require extra attention.
Run 3
Code Structure: Mostly well-organized, with focused overrides and a localized entry-set implementation, but the unrelated distance-calculation block disrupts descendingMultiset(). Nesting: Generally shallow; the local class adds reasonable nesting, while the extraneous block adds unnecessary depth. Clarity of intent: Names, documentation, and reversed delegation clearly express descending-multiset behavior; the unused travelDistance calculation is confusing. Code length: Most methods are concise, though the irrelevant calculation adds needless lines. Action granularity: Usually one action per line, but assignment within returns and the entrySet() ternary combine caching and returning, slightly reducing clarity. Reading flow: Consistent formatting and straightforward delegation make most code easy to follow; the poorly indented inserted block and differing lazy-initialization styles interrupt that flow.