Sample
int-a75a506a2bd0-I01
Remove line comments, block comments, and Javadoc
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.798 | 0–1; higher is more readable |
| Dorn | 0.233 | 0–1; higher is more readable |
| Mi | 0.614 | 0–1; higher is more readable |
| LLOC | 31 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 16.67 | 0–20; mean of three runs |
| GPT-6.1 Sol | 18 | 0–20; mean of three runs |
| BTTF | 0.544 | 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. | 2518.573 | −83.113 |
| Source linesThe number of non-empty source lines. | 71 | +28.4 |
| 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.812 | −7.217 |
Intercept 8.87 + feature contributions = -53.06 (log-odds).
Score = sigmoid(-53.06) = 0.
| Score | 0.798 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Indentation frequencyHow rapidly indentation changes from line to line. | 71 | +1.719 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 72 | −1.513 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 71 | −1.208 |
| 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. | 70.875 | +0.581 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.099 | −0.02 |
| 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. | 86.958 | −0.018 |
Intercept 0.07 + feature contributions = -1.194 (log-odds).
Score = sigmoid(-1.194) = 0.233.
| Score | 0.614 |
|---|
| Score | 31 |
|---|
Run 1
The code is well-structured with clear separation of concerns. Static initialization, thread-local management, and signing logic are organized into distinct sections. Nesting is minimal, with only one level for exception handling. Intent is clear: an HMAC utility for QUIC connection IDs and tokens. Code length is appropriate - no unnecessary verbosity. Action granularity is good, with one logical operation per line in most places. Reading flow is natural and logical. Minor deductions: empty comment lines (1-3) look like placeholders, the redundant array copy check could be simplified since HMAC-SHA256 always outputs 32 bytes, and constants could benefit from brief doc comments explaining their security role.
Run 2
The code is generally well-structured with clear separation of concerns: key generation, MAC initialization, signing logic, and public API methods. It maintains flat nesting throughout, with only one level of indentation in the try-catch block. Intent is clear - this is a utility class for HMAC-SHA256 signing with thread-local MAC instances. The static initializer and thread-local setup are logically organized. Minor readability concerns include: empty Javadoc comments that add no value, the somewhat cryptic signBytes.length != outLength check (which truncates or pads via copyOf), and lack of documentation on why CID and TOKEN need separate keys. The FastThreadLocal anonymous classes add slight noise compared to lambda-style initialization. Overall the code is concise, uses meaningful method names, and follows good action granularity.
Run 3
The code is well-structured with clear separation of concerns: constants, initialization, thread-local setup, and signing logic. Nesting is minimal—only one level in the static initializer and no nested conditionals. The intent is clear from method names like signCid and signToken. Action granularity is good, with one logical operation per line. Reading flow is natural, moving from setup to helper methods to public API. The try-catch for checked exceptions is handled cleanly via IllegalStateException. Minor deductions: the three blank lines after the ALGORITHM constant feel excessive, and the anonymous inner classes for FastThreadLocal add some verbosity, but overall the code is concise and readable.
Run 1
Code Structure: Constants, key initialization, thread-local instances, shared helpers, and public-facing operations are logically organized. Nesting: Shallow try/catch and conditional blocks keep complexity low. Clarity of intent: Descriptive names and the HmacSHA256 constant make the signing purpose clear, though CID is unexplained and input buffer consumption and output truncation/padding are undocumented. Code length: Concise overall; duplicated thread-local setup is modest, while excess blank lines add minor clutter. Action granularity: Each statement performs a distinct action, making initialization and signing easy to follow. Reading flow: Progression from configuration to implementation to entry points is natural, with consistent formatting apart from extra whitespace.
Run 2
Code Structure: Logically separates key initialization, thread-local MAC instances, shared helpers, and public-facing signing methods. Nesting: Shallow, with only simple initialization blocks, a try/catch, and one conditional. Clarity of intent: Descriptive names and the explicit algorithm make the purpose clear, though input buffer consumption and output truncation or padding are not documented. Code length: Concise overall; the two similar thread-local declarations introduce minor repetition. Action granularity: Almost every statement performs one action, making operations easy to follow. Reading flow: Natural progression from configuration to initialization and implementation, then signing entry points. Excess blank lines and slightly inconsistent spacing are minor distractions.
Run 3
Code Structure: Logically organized into constants, key initialization, thread-local MAC instances, shared helpers, and public-facing signing methods. Nesting: Shallow, with only simple try/catch and conditional blocks. Clarity of intent: Descriptive names make HMAC creation and separate CID/token signing clear; input buffer consumption and output truncation or padding are not documented. Code length: Concise overall, though the two thread-local initializers repeat a small amount of boilerplate. Action granularity: Each statement performs one clear action, making operations easy to follow. Reading flow: Natural progression from setup to implementation to entry points; extra blank lines and slightly inconsistent spacing introduce minor visual noise.