Sample
int-970dc6b179cc-I10
Remove about 40% of line-break groups while retaining structure
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.781 | 0–1; higher is more readable |
| Dorn | 0.101 | 0–1; higher is more readable |
| Mi | 0.016 | 0–1; higher is more readable |
| LLOC | 6 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 14 | 0–20; mean of three runs |
| GPT-6.1 Sol | 12.67 | 0–20; mean of three runs |
| BTTF | 0.199 | 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. | 577.677 | −19.063 |
| Source linesThe number of non-empty source lines. | 20 | +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.834 | −7.252 |
Intercept 8.87 + feature contributions = -9.445 (log-odds).
Score = sigmoid(-9.445) = 0.
| Score | 0.781 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| 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. | 214 | −5.399 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 214 | +2.648 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.052 | +0.439 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 20 | +0.328 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 15 | −0.218 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 19.898 | −0.132 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 15 | +0.077 |
Intercept 0.07 + feature contributions = -2.187 (log-odds).
Score = sigmoid(-2.187) = 0.101.
| Score | 0.016 |
|---|
| Score | 6 |
|---|
Run 1
The code is generally readable with clear purpose. The class has a single responsibility and uses flat structure with minimal nesting. The Javadoc and method names clearly communicate intent. However, readability is slightly reduced by inconsistent formatting: the class declaration line mixes annotations, modifiers, and field declarations without proper line breaks, and the private constructor's empty body is awkwardly placed. The fillInStackTrace method is concise but its comment could be clearer. Overall, the code is concise and maintains good action granularity, but the formatting inconsistencies prevent a higher score.
Run 2
The code is mostly readable but has some structural issues. The class purpose is clear - a stackless ClosedChannelException optimization. The Javadoc and method names convey intent well. However, the class declaration is compressed onto a single line with annotations and fields, making it harder to scan. The constructor placement on the same line as the field declaration violates convention. The fillInStackTrace method is concise and its purpose is evident, though it could be a one-liner. The newInstance method is straightforward and readable. Overall, the code is functional and understandable but would benefit from better formatting with proper line breaks and separation of declarations, which would improve its readability score to around 16-17.
Run 3
The code is logically organized but suffers from formatting issues that hurt readability. The class-level Javadoc and @UnstableApi annotation are on the same line as the class declaration, making the header difficult to parse. Constructors, methods, and fields are not consistently spaced. Nesting is nonexistent (good), and intent is mostly clear from the Javadoc. However, the compact formatting reduces clarity. Each action is on its own line, which helps, but the overall reading flow is disrupted by inconsistent whitespace and the merged Javadoc/class line. The code is concise, but conciseness here comes at the cost of visual separation. With proper formatting, it would likely score 15-16, but as presented, it is harder to scan quickly.
Run 1
Code Structure: The class has a logical arrangement of fields, constructor, override, and factory method, but compressed formatting obscures these boundaries. Nesting: Minimal nesting makes the logic easy to follow. Clarity of intent: Descriptive names and documentation clearly explain stack-trace suppression and exception creation. Code length: The implementation is concise without unnecessary logic. Action granularity: Statements are simple, but the annotation, class declaration, field, and constructor share a line, reducing visual separation. Reading flow: Inconsistent line breaks and closing braces attached to statements interrupt otherwise natural top-to-bottom reading.
Run 2
Code Structure: The small class logically groups its field, constructor, override, and factory method, but compressed formatting obscures these boundaries. Nesting: Minimal nesting makes the implementation easy to follow. Clarity of intent: Descriptive names and documentation clearly explain the stackless exception and factory behavior. Code length: Concise and free of unnecessary logic, although excessive compression reduces readability. Action granularity: Most executable lines contain a single action, but the annotation, class declaration, field, and constructor share one line; closing braces also share lines with statements. Reading flow: The member order is natural, but inconsistent line breaks, missing visual separation after the package declaration, and inline closing braces interrupt scanning.
Run 3
Code Structure: The class logically groups its field, constructor, override, and factory method, but compressed formatting obscures these boundaries. Nesting: Minimal nesting makes the implementation easy to follow. Clarity of intent: Descriptive names and documentation clearly explain the stackless exception and factory behavior. Code length: The implementation is appropriately concise, with no unnecessary logic. Action granularity: Several declarations and closing braces share lines, reducing visual separation despite simple individual operations. Reading flow: The overall sequence is natural, but placing the annotation, class declaration, field, and constructor on one line, along with inconsistent brace placement, interrupts scanning.