Sample
int-6f44d58581f5-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.635 | 0–1; higher is more readable |
| Dorn | 0.421 | 0–1; higher is more readable |
| Mi | 0.107 | 0–1; higher is more readable |
| LLOC | 22 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 9 | 0–20; mean of three runs |
| GPT-6.1 Sol | 16 | 0–20; mean of three runs |
| BTTF | 0.338 | 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. | 2193.605 | −72.389 |
| Source linesThe number of non-empty source lines. | 95 | +38 |
| 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.818 | −7.227 |
Intercept 8.87 + feature contributions = -32.746 (log-odds).
Score = sigmoid(-32.746) = 0.
| Score | 0.635 |
|---|
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. | 96 | −2.363 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 67 | +1.58 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 67 | −1.117 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 94.881 | +0.916 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 95.833 | +0.742 |
| 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. | 99.938 | −0.568 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.054 | +0.418 |
Intercept 0.07 + feature contributions = -0.321 (log-odds).
Score = sigmoid(-0.321) = 0.421.
| Score | 0.107 |
|---|
| Score | 22 |
|---|
Run 1
The code has good documentation and generally clear naming, but contains several serious readability issues. An empty while loop with no purpose exists in the first create() method, adding confusion and dead code. There are also syntax errors and broken structure: an extra opening brace appears inside create(), and the readObject/writeObject methods have annotation indentation that suggests malformed code (annotations separate from method signatures). Unnecessary line breaks and inconsistent formatting disrupt natural reading flow. The class structure is otherwise logical, but the broken blocks and meaningless loop drastically reduce clarity. Action granularity is acceptable, but nesting is artificially introduced by the dead loop, and code length is slightly inflated by the extra block. Overall, despite strong Javadocs and understandable method purposes, the structural defects and dead code make this hard to read.
Run 2
The code has a reasonably clear purpose and follows standard Java conventions, but it contains serious readability issues. The most glaring problem is the stray block inside the `create()` method containing a meaningless `while` loop with a hardcoded counter. This appears to be debugging or injected code that serves no purpose, severely damaging clarity of intent. Nesting is generally flat, and method granularity is okay, but the dead code disrupts flow. The class structure is logical overall, with static factory methods, private constructors, and serialization logic, but the serialization methods have inconsistent indentation and annotations. Some Javadoc is helpful, though the class-level documentation is lengthy. The action granularity is acceptable (one action per line mostly). Overall, the code would be significantly more readable without the extraneous loop block and with improved indentation consistency, especially around the serialization methods and annotations.
Run 3
The code has a clear class-level structure with a descriptive Javadoc and logical method organization, but it contains a severe flaw: a stray code block inside the first create() method with an empty while loop that has no purpose. This violates action granularity and clarity of intent. The import list is somewhat long but acceptable for a library class. Nesting is mostly flat, which is good. However, the placement of annotations on separate lines before writeObject/readObject creates misleading indentation that suggests they belong to the previous member. The serialVersionUID is placed at the end rather than at the top, which is unconventional. Method lengths are reasonable, and one action per line is mostly maintained. Overall, the stray loop and annotation formatting significantly hurt readability.
Run 1
Code Structure: Factory methods, constructors, and serialization hooks are logically grouped, though the pointless block in create() disrupts organization. Nesting: Most methods are flat; the unnecessary block and loop add avoidable nesting. Clarity of intent: Descriptive names and useful documentation explain the multiset behavior well, but the countdown loop has no apparent purpose. Code length: Methods are concise overall, with a few unnecessary lines introduced by the loop. Action granularity: Statements generally perform one action per line; the compressed annotations and serialVersionUID declaration slightly reduce scanability. Reading flow: The class follows a natural progression, but inconsistent indentation in create() and the serialization method declarations interrupts an otherwise clean presentation.
Run 2
Code Structure: Factory methods, constructors, and serialization methods are logically grouped, but the unrelated countdown block disrupts the otherwise clean organization. Nesting: Most methods are flat; the extra block and while loop introduce unnecessary nesting. Clarity of intent: Descriptive names and thorough documentation clearly explain multiset behavior, while the countdown has no apparent purpose. Code length: Methods are concise overall, but the countdown adds avoidable lines. Action granularity: Statements generally perform one action per line; the compressed annotations and serialVersionUID declaration slightly reduce scanability. Reading flow: The class follows a natural progression, but inconsistent indentation in the countdown and serialization method declarations interrupts reading.
Run 3
Code Structure: Factory methods, constructors, and serialization hooks are logically grouped, although the unrelated countdown block disrupts the first factory method. Nesting: Generally shallow; the unnecessary block and while loop introduce avoidable nesting. Clarity of intent: Descriptive names and thorough documentation explain multiset behavior and creation clearly, but the countdown has no apparent purpose. Code length: Most methods are concise, with the countdown adding unnecessary lines. Action granularity: Statements generally perform one action per line; the compressed annotations and serialVersionUID declaration slightly reduce scanability. Reading flow: Organization is natural overall, but inconsistent indentation in the countdown and serialization method declarations interrupts an otherwise conventional Java layout.