Sample
int-4cea351e5615-I05
Rewrite eligible decimal integer literals in hexadecimal notation
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.42 | 0–1; higher is more readable |
| Dorn | 0.1 | 0–1; higher is more readable |
| Mi | 0.34 | 0–1; higher is more readable |
| LLOC | 26 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 12.67 | 0–20; mean of three runs |
| GPT-6.1 Sol | 16 | 0–20; mean of three runs |
| BTTF | 0.266 | 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. | 3587.339 | −118.382 |
| 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.691 | −7.037 |
Intercept 8.87 + feature contributions = -88.949 (log-odds).
Score = sigmoid(-88.949) = 0.
| Score | 0.42 |
|---|
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. | 110.971 | −1.035 |
| 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.812 | +0.552 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.1 | −0.026 |
Intercept 0.07 + feature contributions = -2.198 (log-odds).
Score = sigmoid(-2.198) = 0.1.
| Score | 0.34 |
|---|
| Score | 26 |
|---|
Run 1
The code is generally structured but has readability issues. It uses try-finally properly for resource cleanup, and test setup follows a clear pattern. However, several things reduce clarity: magic numbers like 0x7530 and 0x0 instead of descriptive constants, deeply nested anonymous inner class, and long method chains that obscure flow. The newFactories() method has a complex generic type declaration and filtering condition that's hard to parse quickly. Variable names like 'sb', 'cb', 'sc', 'cc' are too abbreviated for clarity, though they're used consistently. The action granularity is mixed — some lines do too much while others are fine. The import list is long but standard for Netty tests. Overall, it's readable for experienced Netty developers but less approachable for others.
Run 2
The code has a clear structure with proper try/finally resource cleanup, but suffers from several readability issues. Magic numbers (0x7530, 0x0) obscure intent - why use hex for timeout and port? The nested anonymous Runner class adds unnecessary indirection. Method naming is ambiguous: testMultipleConnect is both a test wrapper and implementation method. The newFactories method has deep nesting and complex generic types exceeding 120 characters. Multiple operations are chained on single lines (e.g., bind().syncUninterruptibly().channel()), violating the one-action-per-line principle. Import statements are clustered without grouping. The action granularity forces readers to parse method chains mentally rather than seeing discrete steps. Finally, the dual registration pattern (test method + Runner + implementation) creates three layers of indirection for what is essentially a simple test case, making the reading flow feel disorganized despite the logic being correct.
Run 3
The code has clear structure with a standard test pattern, but several readability issues reduce the score. The test method is reasonably flat and follows a logical setup-action-assert flow. However, the intent is obscured by magic numbers like 0x7530 for timeout and 0x0 for port - developers must mentally decode hex values. The method name 'testMultipleConnect' appears twice with different signatures, which could cause confusion. Generic type declarations are verbose, creating long lines that hurt readability. The nesting in newFactories() adds complexity with nested generics and conditionals. Action granularity is mostly good, though multiple operations chain on single lines (e.g., bind().syncUninterruptibly().channel()). The try-finally block properly handles cleanup but lacks comments explaining why the second connect should fail with AlreadyConnectedException. Import organization is alphabetical, which aids navigation. Overall, functional but would benefit from named constants, shorter generic types, and clearer separation of test phases.
Run 1
Code Structure: Well organized into a test entry point, connection test, and factory-selection override, with explicit cleanup. Nesting: Generally shallow; the anonymous runner and loop condition add manageable complexity. Clarity of intent: The test name and AlreadyConnectedException assertion clearly communicate the purpose, but abbreviated variables (sb, cb, sc, cc), hexadecimal constants, and the unexplained factory filter reduce clarity. Code length: Reasonably concise, though the anonymous runner and repeated generic types add boilerplate. Action granularity: Statements generally perform one logical action per line; fluent calls combine related setup and synchronization steps without excessive density. Reading flow: Setup, first connection, second connection, assertion, and cleanup follow a natural sequence. Long generic declarations and the compound type-check condition slightly interrupt scanning.
Run 2
Code Structure: Methods cleanly separate test execution, connection behavior, and factory filtering. Nesting: Mostly shallow, with manageable anonymous-class, try/finally, and loop/conditional nesting. Clarity of intent: The test name and AlreadyConnectedException assertion clearly communicate the purpose, but abbreviated variables (sb, cb, sc, cc) and hexadecimal literals obscure details. Code length: Reasonably concise, although verbose generic declarations and the anonymous Runner add boilerplate. Action granularity: Statements generally perform one logical action per line; fluent call chains remain understandable. Reading flow: Setup, first connection, repeated connection, assertion, and cleanup follow a natural sequence. Factory filtering is straightforward, though long type signatures and casts interrupt scanning. Import grouping and descriptive variable names could improve readability.
Run 3
Code Structure: Methods logically separate test dispatch, connection behavior, and factory filtering. Nesting: Mostly shallow, with manageable try/finally cleanup, conditional checks, and a loop. Clarity of intent: The test name and AlreadyConnectedException assertion clearly communicate the purpose, but abbreviated variables (sb, cb, sc, cc) and hexadecimal constants obscure details. Code length: Reasonably concise, although the anonymous Runner and repeated generic types add boilerplate. Action granularity: Statements generally perform one logical action per line; fluent call chains remain understandable. Reading flow: Setup, initial connection, repeated connection, assertion, and cleanup follow a natural sequence. Long generic declarations and reliance on inherited test infrastructure slightly interrupt readability.