Sample
int-8d18c9136609-I02
Shorten method, parameter, and local names without collisions
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.477 | 0–1; higher is more readable |
| Dorn | 0.111 | 0–1; higher is more readable |
| Mi | 0.508 | 0–1; higher is more readable |
| LLOC | 26 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 14 | 0–20; mean of three runs |
| GPT-6.1 Sol | 16 | 0–20; mean of three runs |
| BTTF | 0.414 | 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. | 3573.777 | −117.935 |
| Source linesThe number of non-empty source lines. | 69 | +27.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.675 | −7.013 |
Intercept 8.87 + feature contributions = -88.477 (log-odds).
Score = sigmoid(-88.477) = 0.
| Score | 0.477 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Indentation frequencyHow rapidly indentation changes from line to line. | 69 | +1.65 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 70 | −1.442 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 69 | −1.163 |
| 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. | 106.957 | −0.865 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 0 | −0.804 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 68.917 | +0.553 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.105 | −0.08 |
Intercept 0.07 + feature contributions = -2.081 (log-odds).
Score = sigmoid(-2.081) = 0.111.
| Score | 0.508 |
|---|
| Score | 26 |
|---|
Run 1
The code is generally readable with a clear structure and intent. The test class is logically organized, and the main test method is concise with a straightforward flow. Nesting is minimal, and action granularity is mostly one action per line. However, readability is reduced by the anonymous inner class and the somewhat cryptic method name `new2()` which lacks descriptive intent. Variable names like `cb`, `sb`, `sc`, `cc`, `boo`, and `gro` are too abbreviated, hurting clarity. The loop in `new2()` contains a complex condition that could be refactored for better readability. Overall, the code is understandable for experienced Netty developers but could be more self-documenting.
Run 2
The code has a logical structure, but several issues reduce readability. The test method uses unclear parameter names ('boo', 'sb', 'cb') and nests a try-finally block around imperative setup code. The custom Runner anonymous class adds unnecessary indirection; the test method overload has the same name as the annotated test, creating ambiguity. Resource management is manual, with null checks and close calls in finally, instead of using try-with-resources or Netty's channel closing utilities. The new2() override contains a deeply chained condition and its functional purpose (filtering bootstrap factories by event loop type) is not obvious without careful reading. Import statements are comprehensive but not organized into logical groups. However, each statement generally performs a single action, and the flow follows a logical order (setup, act, assert, cleanup). The connection setup and failure assertion are clear. The code is not deeply nested overall, but the anonymous class adds one level of indirection.
Run 3
The code has a logical structure with clear separation of setup, test execution, and cleanup. However, readability suffers from several issues: the nested anonymous class in the test method adds unnecessary complexity, the parameter name 'boo' is unclear, and 'fac'/'gro' abbreviations reduce clarity. The test method mixes setup and assertions in a linear way but uses try/finally well for resource cleanup. Also, some lines combine multiple actions (e.g., 'sb.bind(...).syncUninterruptibly().channel()'), reducing action granularity. The reading flow is somewhat disrupted by the anonymous Runner and the loop filtering logic in new2(). Overall, it is reasonably organized but could be more explicit and concise.
Run 1
Code Structure: Well organized into test execution, connection verification, and bootstrap filtering, with reliable cleanup separated in a finally block. Nesting: Moderate and manageable; the anonymous runner and loop condition add some indentation without becoming tangled. Clarity of intent: The repeated-connect assertion clearly communicates the test's purpose, but abbreviated names such as sb, cb, sc, cc, gro, and fac, plus the opaque method name new2, obscure details. Code length: Mostly concise, though the anonymous runner and repeated generic declarations introduce boilerplate. Action granularity: Statements generally occupy separate lines; fluent call chains combine related operations coherently. Reading flow: Setup, first connection, second connection, assertion, and cleanup follow a natural sequence. The long generic types and compound type-checking condition slightly interrupt scanning.
Run 2
Code Structure: Test execution, connection verification, cleanup, and bootstrap filtering are logically separated. Nesting: Mostly shallow, though the anonymous runner and loop conditional add modest nesting. Clarity of intent: The repeated-connect assertion clearly expresses the test purpose, but abbreviated names such as sb, cb, sc, cc, gro, and fac, plus the opaque method name new2, require extra interpretation. Code length: Reasonably concise, with some verbosity from the anonymous class and repeated generic type declarations. Action granularity: Statements generally occupy separate lines; fluent chains combine related setup and synchronization operations without becoming difficult to follow. Reading flow: Setup, execution, assertion, and cleanup follow a natural sequence. Dense imports, long generic signatures, and the compound type-check condition slightly interrupt readability.
Run 3
Code Structure: Well organized into test execution, connection verification, and bootstrap filtering, with explicit cleanup. Nesting: Mostly shallow; the anonymous runner and loop condition add modest nesting. Clarity of intent: The class name and exception assertion clearly convey the multiple-connect test, but names such as sb, cb, sc, cc, gro, fac, and new2 obscure individual roles. Code length: Reasonably concise, though verbose generic declarations and the anonymous runner add boilerplate. Action granularity: Generally one statement per line; chained asynchronous operations combine several steps but remain understandable. Reading flow: Setup, connection attempts, assertion, and cleanup follow a natural sequence. Dense type signatures, abbreviated identifiers, and minimally separated imports slightly interrupt readability.