Sample
int-cdecb97323de-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.72 | 0–1; higher is more readable |
| Dorn | 0.162 | 0–1; higher is more readable |
| Mi | 0.109 | 0–1; higher is more readable |
| LLOC | 34 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 6.33 | 0–20; mean of three runs |
| GPT-6.1 Sol | 15.33 | 0–20; mean of three runs |
| BTTF | 0.193 | 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. | 2772.514 | −91.493 |
| Source linesThe number of non-empty source lines. | 73 | +29.2 |
| Byte entropyHow varied the bytes in the source text are. Repeated bytes give a lower value; a more even mixture gives a higher value. | 5.017 | −7.525 |
Intercept 8.87 + feature contributions = -60.948 (log-odds).
Score = sigmoid(-60.948) = 0.
| Score | 0.72 |
|---|
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. | 158.946 | −3.067 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 159 | +1.761 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 70 | +1.684 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 74 | −1.584 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 70 | −1.185 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 72.812 | +0.608 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.09 | +0.072 |
Intercept 0.07 + feature contributions = -1.641 (log-odds).
Score = sigmoid(-1.641) = 0.162.
| Score | 0.109 |
|---|
| Score | 34 |
|---|
Run 1
The code has good intentions with clear constants, documentation, and a clean structure at the top level (separate methods, static initializers). However, it contains a suspicious line inside the anonymous FastThreadLocal subclass: a meaningless variable manipulation (lI0O_05b17a3d, lI0O_dbdaa900) that does nothing and obscures intent. This suggests either injected code or obfuscation, drastically harming readability. Additionally, the anonymous inner classes add moderate nesting. The `sign` method is clear but the `if (signBytes.length != outLength)` check is redundant given HmacSHA256 always outputs 32 bytes (unless custom out lengths are passed). Overall, clarity is decent for the crypto utility but undermined by the dead code and slight unnecessary complexity.
Run 2
The code has severe readability problems. The most critical issue is the injected obfuscated line inside the CID_MACS initialValue() method (line with lI0O_05b17a3d variables), which is meaningless noise and breaks trust in the entire file. Beyond that, the overall structure is reasonable: constants, static initialization, thread-local Macs, helper methods, and public API are logically organized. Nesting is minimal and the intent of CID vs token signing is clearly documented. However, the obfuscated line destroys clarity, introduces multiple actions on one line, and interrupts natural reading flow. Code length is appropriate for the task, and action granularity is mostly one action per line except for the obfuscated line and the combined catch clause. Without the injected code, this would be quite readable, but as presented it fails on clarity, structure, and maintainability.
Run 3
The code has a clear structure with logical separation of constants, static initialization, and methods, but it is severely undermined by a block of obfuscated code in the CID_MACS initializer. The line `{int lI0O_05b17a3d=0x9771,lI0O_dbdaa900=~lI0O_05b17a3d;...}` is completely unreadable, serves no apparent purpose, and destroys the clarity of intent. Nesting is generally low, and action granularity is mostly one action per line outside the obfuscated block. The comments explaining the two keys are helpful, and method names like signCid and signToken convey purpose well. However, the presence of dead/obfuscated code makes the overall reading flow jarring and ambiguous, dragging the score down significantly despite otherwise clean structure.
Run 1
Code Structure: Well-organized constants, initialization, factory, shared signing helper, and public-facing operations. Nesting: Generally shallow; anonymous classes and exception handling remain manageable. Clarity of intent: Descriptive names and the key-separation comment explain the cryptographic purpose, but the opaque variable names and meaningless bitwise block obscure one initializer. Code length: Mostly concise, with appropriate helper reuse; the injected block is unnecessary. Action granularity: Most lines perform one action, but the injected block packs several declarations and assignments onto a single line. Reading flow: Methods follow a natural setup-to-operation progression, interrupted sharply by the unindented obfuscated block.
Run 2
Code Structure: Well-organized constants, key initialization, thread-local MAC instances, and focused helper methods; an unrelated obfuscated block disrupts the design. Nesting: Generally shallow, with straightforward exception handling and a single conditional, although anonymous classes add some depth. Clarity of intent: Descriptive names and the key-separation comment explain the cryptographic purpose, but meaningless variable names and redundant bitwise operations obscure one initializer. Code length: Mostly concise, with shared helpers avoiding duplication; the obfuscated block adds unnecessary code. Action granularity: Most statements perform one action per line, but the injected block compresses declarations and several operations onto one line. Reading flow: The overall progression from configuration to initialization and signing is natural, interrupted sharply by the unindented, irrelevant block.
Run 3
Code Structure: Logical separation of key initialization, thread-local MAC instances, MAC creation, and signing helpers. Nesting: Mostly shallow, with straightforward try/catch and conditional blocks; anonymous classes add modest nesting. Clarity of intent: Descriptive names and a useful security comment explain the purpose, but the opaque, seemingly purposeless bitwise block in CID_MACS.initialValue sharply reduces clarity. Code length: Generally concise with shared helpers avoiding duplication, except for the unnecessary obfuscated block. Action granularity: Most statements perform one action per line, but that block compresses multiple declarations and operations into a single line. Reading flow: Initialization followed by helpers and public-facing signing methods is natural; inconsistent formatting and the unexplained injected block interrupt an otherwise clean flow.