Sample
int-369065a79b21-I09
Select one of ten low-readability unrelated code templates per class
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.928 | 0–1; higher is more readable |
| Dorn | 0.442 | 0–1; higher is more readable |
| Mi | 0.132 | 0–1; higher is more readable |
| LLOC | 16 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 7 | 0–20; mean of three runs |
| GPT-6.1 Sol | 13.67 | 0–20; mean of three runs |
| BTTF | 0.255 | 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. | 2150.991 | −70.983 |
| Source linesThe number of non-empty source lines. | 52 | +20.8 |
| 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.767 | −7.151 |
Intercept 8.87 + feature contributions = -48.464 (log-odds).
Score = sigmoid(-48.464) = 0.
| Score | 0.928 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| 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. | 113.962 | −1.162 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 114 | +1.035 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 45 | +0.819 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 52 | −0.805 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 45 | −0.612 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 51.904 | +0.316 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.086 | +0.105 |
Intercept 0.07 + feature contributions = -0.233 (log-odds).
Score = sigmoid(-0.233) = 0.442.
| Score | 0.132 |
|---|
| Score | 16 |
|---|
Run 1
The code has clear intent (SCTP echo server) and reasonable structure, with logical bootstrap configuration. However, it contains an obfuscated dead code snippet (a meaningless switch statement inside initChannel), which severely hurts clarity and intent. There is also mild nesting due to the inline anonymous ChannelInitializer class. While the fluent builder pattern generally aids readability, the unnecessary commented-out logging handler and the bizarre synthetic block break the natural flow. Action granularity is mostly fine, but the obfuscated lines add confusion. Code length is acceptable, but the dead code makes it needlessly longer. Overall, a score of 11 reflects functional readability with a jarring, unreadable artifact that violates clarity and intent.
Run 2
The code includes a deliberately obfuscated line with a meaningless switch statement and an unexplained variable name, which severely harms clarity of intent and reading flow. While the overall structure is logical and follows standard Netty patterns, the nesting is shallow, and most actions are one per line, the obfuscated block makes the code unreadable and appears malicious or accidental. The use of an anonymous inner class for ChannelInitializer is acceptable but could be simplified with a lambda in newer Java. Without the obfuscated segment, the code would be quite readable, but as presented it fails the key criteria of clear intent and readability.
Run 3
The code is largely unreadable due to a significant issue: an injected, obfuscated line (`{int lI0O_73c60374=(0x512A^0x512A);switch...}`) inside the `initChannel` method. This breaks the logical structure, obscures intent, and disrupts the reading flow. Even ignoring that, the code uses a long chain of builder calls and an anonymous inner class, which adds nesting and reduces clarity. The commented-out `LoggingHandler` line is dead code, and the `PORT` field uses `System.getProperty` inline with no validation. Action granularity is mostly one action per line, but the obfuscated line introduces multiple actions and confusion. Overall, the code would be moderately clear for a Netty example if the obfuscation and dead code were removed, but as written it is actively hostile to readability.
Run 1
Code Structure: Server configuration, startup, waiting, and cleanup are logically organized, but an unrelated no-op block disrupts initialization. Nesting: Mostly shallow; the anonymous initializer and embedded switch add localized complexity. Clarity of intent: The class name, comments, and Netty calls clearly convey an SCTP echo server, while the cryptic variable and redundant bitwise operations obscure intent. Code length: The example is concise overall, but the injected block and commented-out logging call are unnecessary. Action granularity: Most statements and chained configuration calls occupy separate lines; the injected block compresses declarations, branching, assignments, and breaks onto one line. Reading flow: Setup-to-cleanup progression is natural, but the unindented obfuscated block sharply interrupts it. Short names such as b and f slightly reduce clarity.
Run 2
Code Structure: Server setup, binding, waiting, and cleanup are logically organized, but an unrelated obfuscated block disrupts initialization. Nesting: Generally moderate, with try/finally and an anonymous initializer; the inserted switch adds unnecessary nesting. Clarity of intent: Class documentation, API names, and lifecycle comments clearly convey an SCTP echo server, while the cryptic variable and no-op bitwise operations obscure local intent. Code length: Mostly concise, though the redundant switch block and commented-out logging statement add noise. Action granularity: Most statements occupy separate lines, but the injected block compresses declarations, branching, assignments, and breaks onto one line. Reading flow: Fluent configuration and orderly lifecycle management read naturally, but the poorly formatted injected block sharply interrupts that flow.
Run 3
Code Structure: The server follows a logical setup, bind, wait, and cleanup sequence, but an unrelated obfuscated block disrupts the initializer. Nesting: Mostly moderate, although the anonymous initializer and embedded switch add unnecessary depth. Clarity of intent: Class documentation, API calls, and lifecycle comments make the server's purpose clear; the cryptic variable and no-op bitwise operations obscure local intent. Code length: Generally concise, but the redundant switch block and commented-out logging statement add clutter. Action granularity: Most statements are separated cleanly, while the injected block compresses declarations, branching, assignments, and control flow onto one line. Reading flow: Fluent configuration and lifecycle ordering read naturally, but inconsistent indentation and the dense injected block sharply interrupt that flow.