Sample
int-994c7b329561-I03
Replace method, parameter, and local names with length-matched, meaningful but unrelated names
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.636 | 0–1; higher is more readable |
| Dorn | 0.615 | 0–1; higher is more readable |
| Mi | 0.445 | 0–1; higher is more readable |
| LLOC | 12 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 7 | 0–20; mean of three runs |
| GPT-6.1 Sol | 14 | 0–20; mean of three runs |
| BTTF | 0.569 | 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. | 1868.13 | −61.648 |
| Source linesThe number of non-empty source lines. | 50 | +20 |
| 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.597 | −6.895 |
Intercept 8.87 + feature contributions = -39.674 (log-odds).
Score = sigmoid(-39.674) = 0.
| Score | 0.636 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Indentation frequencyHow rapidly indentation changes from line to line. | 43 | +0.75 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 50 | −0.734 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 89.961 | +0.647 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 43 | −0.566 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 49.956 | +0.288 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.081 | +0.158 |
| 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. | 89.98 | −0.146 |
Intercept 0.07 + feature contributions = 0.468 (log-odds).
Score = sigmoid(0.468) = 0.615.
| Score | 0.445 |
|---|
| Score | 12 |
|---|
Run 1
The code has severe readability issues. Variable names are misleading ('value' for EventLoopGroup, 'map' for ServerBootstrap, 'age' for ChannelFuture, 'sync' for method, 'flag' for unused parameter, 'key' for SctpChannel, 'refreshMode' for initChannel), violating clarity of intent and reading flow. The overridden method is named 'refreshMode' instead of 'initChannel', suggesting obfuscation or careless refactoring. The commented-out LoggingHandler adds noise. Structure is mostly sequential but naming destroys comprehension. Nesting is acceptable (minimal). Code length is fine, but action granularity suffers due to unclear references. Without proper names, the logical organization is obscured, making an otherwise simple Netty server example ambiguous and confusing. The import section is reasonable, and the try-finally pattern is recognizable, but these minor positives are overshadowed by semantic mislabeling throughout.
Run 2
This code is highly obfuscated and unreadable. The method names, variable names, and overall structure deliberately obscure the code's purpose. For instance, `sync(String[] flag)` appears to be a server startup method, but its parameter is unused and misleading. Variable names like `value`, `map`, `age`, `remoteSession`, and `key` are nonsensical in context, violating clarity of intent and reading flow. The `ChannelInitializer` inner class has been renamed to `refreshMode`, which further confuses the action being performed (initializing the channel). Additionally, the commented-out logging handler and unused array parameter contribute to the ambiguity. While the code follows a flat structure with no deep nesting and a standard try-finally pattern, the naming and misleading annotations completely undermine readability across all other criteria.
Run 3
The code has reasonable structure and low nesting, but suffers from confusing naming choices. Variables like 'value', 'map', 'age', 'flag', and method 'refreshMode' obscure intent compared to conventional names such as 'group', 'bootstrap', 'future', 'args', and 'initChannel'. The handler registration is mostly clear, but the commented-out LoggingHandler adds slight ambiguity. Imports are organized, and the main flow follows a logical sequence. However, the misleading names force the reader to infer types and purposes, reducing clarity. Action granularity and reading flow are adequate, but the lack of meaningful identifiers prevents the code from reaching higher readability scores.
Run 1
Code Structure: Logically separates configuration, startup, waiting, and cleanup, with reliable try/finally organization. Nesting: Mostly shallow, although the anonymous channel initializer adds moderate nesting. Clarity of intent: The class documentation and comments explain the echo server, but names such as value, map, age, key, and sync obscure roles; refreshMode is also confusing for an initializer callback. Code length: Compact overall, with minor clutter from an unused parameter and commented-out logging code. Action granularity: Generally one operation per statement, and the fluent configuration chain places each configuration step on its own line. Reading flow: Follows a natural server lifecycle, supported by comments, but misleading identifiers and unconventional method names interrupt comprehension.
Run 2
Code Structure: Logically separates configuration, startup, waiting, and cleanup, with reliable cleanup expressed through try/finally. Nesting: Moderate nesting from the anonymous initializer inside the configuration chain, but still manageable. Clarity of intent: The class documentation and lifecycle comments explain the echo server's purpose, but names such as sync, flag, value, map, key, and age obscure roles; refreshMode is also unexpected for a channel initializer. Code length: Compact overall, though the commented-out logging statement adds clutter and the pipeline call is unnecessarily spread across lines. Action granularity: Statements generally perform one action each, and chained configuration calls occupy separate lines. Reading flow: Follows a natural server lifecycle, supported by comments and whitespace, but weak naming and the atypical method names interrupt comprehension.
Run 3
Code Structure: Logically separates configuration, startup, waiting, and cleanup, with reliable cleanup expressed through try/finally. Nesting: Mostly shallow, although the anonymous channel initializer introduces an additional nested block. Clarity of intent: The class documentation and comments explain the echo server's purpose, but names such as value, map, age, key, sync, and refreshMode obscure variable roles and method intent. Code length: Compact overall; the commented-out logging statement adds minor clutter, and flag is unused. Action granularity: Most statements perform one clear action; the fluent configuration chain is split across lines, though bind(PORT).sync() combines binding and waiting. Reading flow: Execution progresses naturally from setup to shutdown, supported by useful comments. Consistent indentation helps, but weak naming and unconventional method names require extra interpretation.