Sample
int-1231c24e2f0c-I01
Remove line comments, block comments, and Javadoc
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.411 | 0–1; higher is more readable |
| Dorn | 0.1 | 0–1; higher is more readable |
| Mi | 0.331 | 0–1; higher is more readable |
| LLOC | 26 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 16.33 | 0–20; mean of three runs |
| GPT-6.1 Sol | 17 | 0–20; mean of three runs |
| BTTF | 0.413 | 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. | 3566.833 | −117.705 |
| 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.684 | −7.026 |
Intercept 8.87 + feature contributions = -88.262 (log-odds).
Score = sigmoid(-88.262) = 0.
| Score | 0.411 |
|---|
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.957 | −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.848 | +0.553 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.1 | −0.027 |
Intercept 0.07 + feature contributions = -2.198 (log-odds).
Score = sigmoid(-2.198) = 0.1.
| Score | 0.331 |
|---|
| Score | 26 |
|---|
Run 1
The code is generally readable with clear intent and logical structure. It follows standard Java conventions and Netty patterns. The test method is well-organized with proper resource cleanup. However, there are minor readability issues: the generic type declarations in newFactories() are verbose and repetitive, making that method harder to parse. The mixed use of syncUninterruptibly() and await() could be clarified. Indentation is consistent and nesting is shallow. The code would benefit from extracting the complex generic type into a type alias or using diamond operators where possible. Overall, it's maintainable and understandable but has some verbosity in the factory method.
Run 2
The code demonstrates strong readability through clear structure and logical organization. The test method is concise, follows a standard setup-action-assertion pattern, and maintains flat nesting with minimal conditional complexity. Each line typically performs a single action (e.g., binding, registering, connecting), which enhances action granularity. Variable names like 'sb', 'cb', 'sc', and 'cc' are conventional but slightly terse; however, they're consistent with Netty test patterns. The override method uses a clear loop with a logical filter condition. The only minor drawbacks are the lack of try-with-resources (requiring manual null checks in finally) and somewhat lengthy loop variable declaration, but these don't significantly impair readability. The intent is immediately apparent: testing that multiple connects on the same channel fail with AlreadyConnectedException.
Run 3
The code is generally well-structured and readable. It follows a clear logical organization: a test method wrapping a runner, a core test implementation, and a factory method for permutations. Nesting is minimal, with only one anonymous inner class and one if statement in a loop. Intent is clear — testing multiple connection attempts to the same channel. Code length is moderate and mostly concise, though the factory method's generic type declarations add verbosity. Action granularity is good: one logical operation per line, especially in the test's try block. Reading flow is natural, with cleanup handled properly in a finally block. Minor issues: long generic lines in the factory method reduce readability, and variable names like 'sb', 'cb', 'sc', 'cc' are terse but acceptable for a test. The anonymous Runner class adds slight overhead compared to Java 8 lambdas.
Run 1
Code Structure: Clearly separates test execution, connection assertions, and bootstrap factory filtering, with cleanup in a finally block. Nesting: Mostly shallow; the anonymous runner and loop condition introduce only modest nesting. Clarity of intent: The test name and AlreadyConnectedException assertion clearly communicate the purpose, but abbreviations such as sb, cb, sc, and cc obscure channel roles. Code length: Appropriately concise overall, though the anonymous runner and repeated generic types add boilerplate. Action granularity: Statements generally perform one logical action per line; chained setup and synchronization calls remain understandable. Reading flow: Setup, initial connection, repeated connection, assertion, and cleanup follow a natural sequence. Long generic declarations and the combined type-check/cast condition slightly interrupt the otherwise straightforward flow.
Run 2
Code Structure: Well organized into a test entry point, connection test, and factory-selection method. Nesting: Mostly shallow; the anonymous runner and cleanup checks add modest nesting. Clarity of intent: The test name and assertion clearly express that a second connection should fail, but abbreviated variables (sb, cb, sc, cc) and the unexplained factory filter reduce clarity. Code length: Reasonably concise, although repeated generic types and anonymous-class boilerplate add verbosity. Action granularity: Statements generally perform one logical action per line; chained calls compact related asynchronous operations without becoming difficult to follow. Reading flow: Setup, connection attempts, assertion, and cleanup follow a natural sequence. Long generic declarations and minimal separation around imports slightly interrupt scanning.
Run 3
Code Structure: Clearly separates test execution, connection assertions, cleanup, and factory filtering. Nesting: Mostly shallow; the anonymous runner and cleanup conditionals add modest depth. Clarity of intent: The test name and AlreadyConnectedException assertion communicate the purpose well, although abbreviations such as sb, cb, sc, and cc reduce immediate clarity. Code length: Reasonably concise, but verbose generic declarations and anonymous-class boilerplate add visual weight. Action granularity: Generally one action per statement; chained asynchronous calls combine related operations without significantly obscuring intent. Reading flow: Setup, initial connection, repeated connection, assertion, and cleanup follow a natural sequence. Long factory signatures and filtering expressions slightly interrupt readability.