Sample
int-4c07a4bd17c1-I02
Shorten method, parameter, and local names without collisions
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.58 | 0–1; higher is more readable |
| Dorn | 0.336 | 0–1; higher is more readable |
| Mi | 0.391 | 0–1; higher is more readable |
| LLOC | 32 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 16.33 | 0–20; mean of three runs |
| GPT-6.1 Sol | 14 | 0–20; mean of three runs |
| BTTF | 0.439 | 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. | 3290.404 | −108.583 |
| Source linesThe number of non-empty source lines. | 104 | +41.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. | 4.885 | −7.327 |
Intercept 8.87 + feature contributions = -65.44 (log-odds).
Score = sigmoid(-65.44) = 0.
| Score | 0.58 |
|---|
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. | 105 | −2.681 |
| 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. | 94 | −1.736 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 103.94 | +1.043 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 85 | +0.567 |
| 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. | 98.933 | −0.525 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.09 | +0.069 |
Intercept 0.07 + feature contributions = -0.679 (log-odds).
Score = sigmoid(-0.679) = 0.336.
| Score | 0.391 |
|---|
| Score | 32 |
|---|
Run 1
The code is well-structured with clear class hierarchy and delegation patterns. The class serves a focused purpose: wrapping a SortedMultiset as unmodifiable. Methods are concise and delegate cleanly to the underlying implementation. Naming is generally clear, though some parameter names (like 'lower2', 'upper3') are less descriptive than ideal. The descendingMultiset lazy initialization is understandable but adds slight complexity. The class maintains good clarity with minimal nesting and logical method organization. One minor readability concern is the incomplete method names like 'com()' and 'poll2()' which appear to be abbreviations or placeholders. The TODO comment is helpful for context. Overall, the code follows clean coding practices with clear intent, appropriate delegation, and manageable complexity.
Run 2
The code is generally well-structured and readable. It clearly separates class definition, constructor, overrides, and fields. Nesting is minimal—only one conditional in descending(). Intent is clear: an unmodifiable sorted multiset wrapper. However, readability is hurt by non-descriptive method names like com(), create(), element(), poll(), poll2(), sub(), and parameters like lower2, upper2, lower3, bound2. These likely override interface methods but still reduce clarity. Action granularity is mostly one action per line, with good reading flow from constructor through method overrides. Code length is appropriate for the functionality. The TODO comment is helpful but long. Annotation clutter (GwtCompatible, J2ktIncompatible, etc.) is excessive in the snippet and visually interrupts reading, though this may be necessary for the project's cross-platform support.
Run 3
The code is well-structured and follows a clear, consistent pattern for a wrapper class. Methods are short, with one primary action per line, contributing to good readability. The nesting depth is minimal, with only one conditional block in the descending() method. The intent of each method is mostly clear from its name and implementation, though some parameter names like 'upper2' and 'bound2' are ambiguous. The class-level Javadoc and inline comments provide helpful context. However, the use of method names like 'com()', 'create()', 'element()', 'del()', and 'poll2()' obscures intent compared to standard Java naming conventions. Overall, this is readable code with minor clarity improvements possible.
Run 1
Code Structure: Small, logically grouped wrapper methods provide good organization, although fields are interspersed with methods. Nesting: Almost entirely flat, with only one simple conditional. Clarity of intent: The class documentation and delegation make the unmodifiable-wrapper purpose clear, but abbreviated names such as del, com, create, poll2, and numbered parameters obscure individual operations and bound semantics. Code length: Concise overall; the detailed lifecycle TODO is relevant but interrupts scanning. Action granularity: Most lines perform one action, though returning an assignment combines caching and control flow. Reading flow: Consistent formatting and straightforward delegation help, but ambiguous naming, inline annotation declarations, and the placement of the cache field reduce smoothness.
Run 2
Code Structure: Logically organized as a wrapper with small delegation methods, though the cached field interrupts the method sequence. Nesting: Very shallow, with only one conditional in descending(). Clarity of intent: Class documentation and delegation reveal the unmodifiable-wrapper purpose, but abbreviated names such as del(), com(), poll2(), and numbered bound parameters obscure individual operations. Code length: Concise overall; repetition is appropriate for interface delegation, and the longer TODO explains a specific maintenance concern. Action granularity: Most lines perform one action, but return descendingMultiset = res combines assignment and return. Reading flow: Consistent formatting and short methods support easy scanning, while cryptic naming, densely grouped annotations, and the embedded TODO slightly disrupt the flow.
Run 3
Code Structure: A well-organized wrapper class with small, focused methods, although the cached field interrupts the method sequence. Nesting: Nearly flat, with only one simple conditional. Clarity of intent: Documentation and delegation reveal the unmodifiable-wrapper purpose, but abbreviated names such as com, del, poll2, and numbered bound parameters obscure individual operations. Code length: Concise overall; repetitive forwarding methods are appropriate for this wrapper. Action granularity: Most lines perform one action, but returning an assignment combines cache mutation and return. Reading flow: Consistent formatting and straightforward delegation support scanning, while unclear naming, densely grouped annotations, and the long lifecycle TODO introduce friction.