Sample
int-830e26bbbf10-I12
Inline all eligible single-use intermediate local variables
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0.002 | 0–1; higher is more readable |
| Scalabrino | 0.781 | 0–1; higher is more readable |
| Dorn | 0.551 | 0–1; higher is more readable |
| Mi | 0.259 | 0–1; higher is more readable |
| LLOC | 6 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 18 | 0–20; mean of three runs |
| GPT-6.1 Sol | 19 | 0–20; mean of three runs |
| BTTF | 0.322 | 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. | 28 | +11.2 |
| 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.826 | −7.24 |
Intercept 8.87 + feature contributions = -6.233 (log-odds).
Score = sigmoid(-6.233) = 0.002.
| 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. | 119.931 | −1.415 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 119.931 | +1.131 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.051 | +0.442 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 23 | −0.107 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 23 | +0.058 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 28 | +0.045 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 27.785 | −0.021 |
Intercept 0.07 + feature contributions = 0.203 (log-odds).
Score = sigmoid(0.203) = 0.551.
| Score | 0.259 |
|---|
| Score | 6 |
|---|
Run 1
The code is highly readable. Structure is logical: package, imports, class, field, constructor, override, factory method. Nesting is minimal—only one method override and one static factory, both flat. Intent is clear: a performance-optimized exception that skips stacktrace generation, with Javadoc explaining purpose. Length is concise and appropriate for the functionality. Action granularity is one action per line. Reading flow is natural, moving from class definition to constructor to behavior override to factory method. Minor deductions: the suppressed warning comment could be slightly more specific, and the class could be final (already is). Overall, excellent clarity and simplicity.
Run 2
The code is highly readable. It has a clear, logical structure: package declaration, imports, class Javadoc, class definition, fields, constructor, overridden method, and factory method. Nesting is minimal and only uses one conditional-free method override. Intent is explicit — a stackless variant of ClosedChannelException for performance. The code is concise with no unnecessary lines. Each action is on its own line, enhancing clarity. Reading flow is natural: documentation first, then implementation. Minor deductions: the class is marked @UnstableApi, which slightly reduces clarity for external users, and the Javadoc on newInstance is terse. Overall, it follows clean code principles well.
Run 3
The code is highly readable: it has a clear single-purpose class, flat structure, minimal nesting, and concise methods. The class-level Javadoc explains the intent, and the private constructor enforces the factory pattern. The override of fillInStackTrace() is short and purposeful, with a useful comment. The factory method newInstance is self-documenting and delegates cleanly. One minor downside is that the serialVersionUID is a long magic number, but this is standard boilerplate in serializable exception classes and does not impact readability significantly.
Run 1
Code Structure: The class is logically organized into a constant, private constructor, override, and factory method. Nesting: There is no nested control flow, making the code easy to scan. Clarity of intent: The class name, documentation, and fillInStackTrace override clearly explain the stackless exception behavior; clazz is slightly less descriptive than originClass. Code length: The implementation is concise without unnecessary boilerplate beyond the serialization identifier. Action granularity: Each statement performs one clear action; the factory's inline construction is compact and understandable. Reading flow: The progression from class purpose to construction and behavior is natural. Minor formatting improvements, such as separating the package declaration from imports, would improve readability.
Run 2
Code Structure: The class is logically organized into a constant, private constructor, override, and factory method. Nesting: There is no nested control flow, making the code easy to scan. Clarity of intent: The class name, documentation, and fillInStackTrace override clearly communicate a lightweight exception that suppresses stack-trace generation; the factory documents its origin metadata. Code length: The implementation is concise without unnecessary logic. Action granularity: Each statement performs a focused action, although the factory combines construction and stack-trace customization in one readable expression. Reading flow: The progression from class purpose to implementation and creation is natural. Minor improvements include separating the package declaration from imports with a blank line and clarifying the synchronization-warning comment.
Run 3
Code Structure: A well-organized class separates the serialization constant, private constructor, stack-trace override, and factory method. Nesting: No nested control flow, making the code easy to scan. Clarity of intent: The class name, documentation, and override clearly communicate a lightweight exception that suppresses stack-trace generation; the factory documents its origin-setting purpose. Code length: Concise, with no unnecessary implementation. Action granularity: Each statement performs one clear action; the nested constructor call in the factory remains straightforward. Reading flow: Members follow a natural order, and short methods support quick comprehension. Minor drawbacks are the lack of blank lines separating package and import groups and the slightly generic parameter name 'clazz'.