Sample
int-f5279e4b9232-SRC
Unmodified source class
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 | 14.67 | 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 demonstrates good readability, particularly in the main test method. It uses clear variable names, flat structure, and a logical try-finally pattern for resource cleanup. The test flow is natural: setup server, bind, register client, attempt connections, assert expected exception. One action per line is mostly followed. The newFactories method is concise. Deductions: anonymous inner class in the test method adds slight nesting overhead; the import list is long; the channel references and syncUninterruptibly chains are Netty-idiomatic but can be dense for newcomers. Overall, the code is straightforward and maintainable with clear intent.
Run 2
The code is generally readable but has some issues. Structure is logical with clear separation between test setup, execution, and configuration. Nesting is minimal - only one level of try/finally and a for loop. Intent is mostly clear, though the anonymous Runner class adds some complexity. The method is somewhat long but not excessive. Each line typically contains one action, though the chain calls (e.g., sb.bind().syncUninterruptibly().channel()) pack multiple operations into single lines, reducing action granularity. Reading flow is natural - the test follows a clear progression from setup to action to assertion. Weaknesses include: generic type declarations are verbose (TestsuitePermutation.BootstrapComboFactory repeated), the anonymous inner class obscures the test logic, and the chained method calls require careful reading to understand the sequence of operations. The lack of comments explaining the test's purpose or the NioIoHandler filtering logic also impacts clarity.
Run 3
The code is generally readable but has some issues. Structure is logical for a Netty test (setup, test action, cleanup), and the flow is normal. However, nesting is moderate in the test method with try/finally and nested ifs in newFactories; clarity suffers in the condition checking IoEventLoopGroup and NioIoHandler. Lines are reasonably granular, though `cc.connect(sc.localAddress()).syncUninterruptibly();` chains multiple actions. The anonymous `Runner` class adds boilerplate. The final cleanup is clear, but the code is somewhat verbose overall, especially with long generic type names and indentation in newFactories. Not terrible, but not exemplary.
Run 1
Code Structure: Clearly separates test execution, connection verification, cleanup, and factory selection. Nesting: Mostly shallow; the anonymous runner and try/finally introduce manageable nesting. Clarity of intent: The test name and AlreadyConnectedException assertion clearly communicate the purpose, but abbreviated variables (sb, cb, sc, cc) 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; chained calls compact several operations but remain understandable. Reading flow: Setup, first connection, second connection, assertion, and cleanup follow a natural sequence. Factory selection is straightforward, although its long generic declarations and combined type check/cast require extra attention.
Run 2
Code Structure: Test execution, connection verification, cleanup, and factory filtering are logically separated into methods. Nesting: Mostly shallow, with modest nesting in the anonymous runner, try/finally cleanup, and filtering loop. Clarity of intent: The test name and assertion clearly communicate that a second connection should fail; abbreviated names such as sb, cb, sc, and cc reduce clarity. Code length: Reasonably concise, though repeated generic types and the anonymous runner add verbosity. Action granularity: Statements generally perform one logical action per line, although chained asynchronous calls combine several operations. Reading flow: Setup, connection attempts, assertion, and cleanup follow a natural sequence. Long generic declarations and the compound factory-filtering condition slightly interrupt scanning.
Run 3
Code Structure: Clearly separates test execution, connection verification, and factory filtering. Nesting: Mostly shallow; the anonymous runner and cleanup checks add modest nesting. Clarity of intent: The test name and AlreadyConnectedException assertion communicate the purpose well, although abbreviations such as sb, cb, sc, and cc obscure roles. Code length: Reasonably concise, but verbose generic declarations and anonymous-class boilerplate add visual weight. Action granularity: Statements generally perform one logical action per line; fluent setup chains remain understandable. Reading flow: Setup, connection attempts, assertion, and cleanup follow a natural sequence. The factory method is straightforward, though long type signatures and the combined type-check/cast condition slow scanning.