Sample
int-09ff01e069b8-I02
Shorten method, parameter, and local names without collisions
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0.002 | 0–1; higher is more readable |
| Scalabrino | 0.8 | 0–1; higher is more readable |
| Dorn | 0.548 | 0–1; higher is more readable |
| Mi | 0.421 | 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 | 16 | 0–20; mean of three runs |
| BTTF | 0.277 | 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.806 | −7.208 |
Intercept 8.87 + feature contributions = -6.202 (log-odds).
Score = sigmoid(-6.202) = 0.002.
| Score | 0.8 |
|---|
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.862 | −1.412 |
| 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.053 | +0.426 |
| 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.843 | −0.021 |
Intercept 0.07 + feature contributions = 0.191 (log-odds).
Score = sigmoid(0.191) = 0.548.
| Score | 0.421 |
|---|
| Score | 6 |
|---|
Run 1
The code is highly readable with clear structure and intent. It follows standard Java conventions, has a single responsibility (cheap closed channel exception), and maintains flat nesting. The class is concise, well-documented, and each action is on its own line. The only minor issues are the slightly cryptic parameter names 'cla' and 'met', and the somewhat unusual 'new2' method name, which could be clearer. However, the factory method's purpose is documented, and overall the code is easy to understand and maintain.
Run 2
The code is well-structured with clear separation of concerns: imports, class documentation, and methods. Nesting is minimal—only a single class level with a flat method hierarchy. Intent is explicit through comprehensive Javadoc comments explaining the purpose of the class and methods. The code is concise, avoiding unnecessary boilerplate while maintaining clarity. Action granularity is appropriate—each line performs a distinct operation without crowding multiple actions. Reading flow follows a natural progression from class declaration to constructor to methods, with logical grouping of related functionality. The only minor deductions are the abbreviated parameter names ('cla', 'met') in new2() which slightly reduce readability compared to fully descriptive names, and the method name 'new2' could be more descriptive.
Run 3
The code is highly readable with clear structure and intent. It has a single class with a private constructor, overriding a method, and a static factory method. Nesting is minimal, with no deep indentation or complex control flow. The purpose is evident from the class name and Javadoc: a performance-optimized ClosedChannelException that avoids stacktrace generation. The code length is concise and appropriate for its functionality. Action granularity is good, with one logical operation per line. Reading flow is natural, following standard Java conventions: package, imports, Javadoc, class declaration, fields, constructor, method override, and factory method. Minor deductions could be made for the abbreviated parameter names 'cla' and 'met' in the factory method, which slightly reduce clarity compared to fuller names like 'clazz' and 'method'. Overall, this is exemplary code that follows Netty's established patterns for stackless exceptions.
Run 1
Code Structure: The class is logically organized into a constant, constructor, override, and factory method. Nesting: There is no nested control flow, making it easy to scan. Clarity of intent: Documentation explains the stackless exception purpose, but names such as fill, new2, cla, and met obscure meaning. Furthermore, fill does not override a ClosedChannelException method, so the annotation and stated stack-trace suppression behavior are misleading. Code length: The implementation is concise without unnecessary boilerplate. Action granularity: Each statement performs a single action, although the factory return combines construction and stack-trace customization in a manageable expression. Reading flow: The top-to-bottom progression is natural; additional spacing between the package and imports would improve presentation.
Run 2
Code Structure: The class is logically organized into a constant, constructor, override, and factory method. Nesting: Methods are flat, with no nested control flow. Clarity of intent: Documentation explains the stackless exception's purpose, but names such as fill, new2, cla, and met obscure intent; fill also does not match the standard fillInStackTrace override, undermining confidence in the implementation. Code length: The implementation is concise without unnecessary code. Action granularity: Each statement performs one clear action, although the factory return combines construction and stack-trace adjustment. Reading flow: The class reads naturally from declaration to creation, but minimal spacing around the package and imports and weak method names slightly disrupt readability.
Run 3
Code Structure: The class is logically organized into a constant, constructor, override, and factory method. Nesting: Methods are flat, with no nested control flow. Clarity of intent: Documentation clearly describes a lightweight exception, but names such as fill, new2, cla, and met obscure intent. The fill method also does not match the standard fillInStackTrace override, creating confusion about the stated behavior. Code length: The implementation is concise without unnecessary boilerplate. Action granularity: Each statement performs one cohesive action; the factory expression is compact and understandable. Reading flow: Conventional ordering and whitespace support easy scanning, although missing separation between the package declaration and imports slightly reduces polish.