Sample
int-2d16e45182e9-I02
Shorten method, parameter, and local names without collisions
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.543 | 0–1; higher is more readable |
| Dorn | 0.33 | 0–1; higher is more readable |
| Mi | 0.406 | 0–1; higher is more readable |
| LLOC | 84 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 15.33 | 0–20; mean of three runs |
| GPT-6.1 Sol | 15 | 0–20; mean of three runs |
| BTTF | 0.369 | 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. | 5404.64 | −178.353 |
| Source linesThe number of non-empty source lines. | 133 | +53.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. | 4.611 | −6.917 |
Intercept 8.87 + feature contributions = -123.2 (log-odds).
Score = sigmoid(-123.2) = 0.
| Score | 0.543 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 134 | −3.708 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 121 | +3.448 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 121 | −2.356 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 132.906 | +1.448 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 94.254 | +0.716 |
| 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. | 94.955 | −0.357 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.094 | +0.032 |
Intercept 0.07 + feature contributions = -0.706 (log-odds).
Score = sigmoid(-0.706) = 0.33.
| Score | 0.406 |
|---|
| Score | 84 |
|---|
Run 1
The code is well-structured with clear separation of initialization, processing, and finalization. Nesting is shallow, with only one level inside the main loop. Intent is mostly clear: it implements SipHash with configurable rounds and little-endian handling. Field names are descriptive, and constants include comments. However, the 'mac' method mixes multiple responsibilities (state reset, block processing, tail handling, finalization), and the tail-switch fall-through pattern, while compact, can reduce readability. Variable names like 'k', 'k2', 'b', 'm', and 'needs' are terse. The byte-ordering check and the use of magic numbers (0xFF, shifts) add minor cognitive load. The finalization block could benefit from a comment. Overall, readable for experienced developers familiar with cryptographic hashing, but not immediately accessible to newcomers.
Run 2
The code is moderately readable. It has a clear structure with logical organization into constants, fields, constructor, and methods. Nesting is low and action granularity is mostly one action per line. However, clarity of intent is weak in the `mac` method, especially the switch fall-through for tail bytes, which is difficult to follow. Variable names like `b`, `lef`, and `k2` are cryptic. The reading flow is natural but interrupted by magic numbers and endianness handling. The code is concise, but comments are sparse for the complex parts.
Run 3
The code is generally well-structured and readable. The class has a clear single purpose, fields are logically grouped, and constants are well-named. The constructor validates inputs and initializes state cleanly. The `mac` method shows good decomposition by extracting the compression-round loop into a private `sip()` helper, which keeps each line focused on one action. However, readability is reduced by the large switch statement for tail-byte packing, which uses fall-through cases and byte-level bit manipulation that requires close study. The 'needs' variable and endianness handling, while commented, could be clearer. Overall nesting is shallow and flow is natural, but the tail-processing block prevents a higher score.
Run 1
Code Structure: Constants, initialization, MAC processing, and the SipHash round are logically separated, though mac combines several processing stages. Nesting: Mostly shallow, with only a nested compression loop and an endian conditional. Clarity of intent: Specification references, named constants, and round-count fields help, but abbreviated names such as see, inp, lef, and needs obscure meaning. The switch relies on undocumented fall-through, and length-versus-position arithmetic requires careful interpretation. Code length: Reasonably concise for a cryptographic implementation; repeated operations largely reflect the algorithm rather than unnecessary verbosity. Action granularity: Each statement generally performs one operation, making state updates easy to follow individually. Reading flow: Initialization, block processing, tail packing, and finalization follow a natural sequence, but sparse stage comments, implicit fall-through, and low-level bit manipulation interrupt readability.
Run 2
Code Structure: Constants, initialization, hashing, and round operations are logically separated, though mac combines several processing phases. Nesting: Mostly shallow; nested compression loops and a conditional remain manageable. Clarity of intent: The algorithm reference, descriptive state constants, and endian comments help, but abbreviated names such as see, inp, lef, and needs obscure meaning. Cryptographic rotations and switch fall-through require specialist knowledge, and the fall-through lacks explicit documentation. Code length: Reasonably concise for the algorithm, although mac is relatively long and repeats compression-loop logic. Action granularity: Statements generally perform one operation per line, making state changes easy to follow. Reading flow: Initialization, block processing, tail handling, and finalization follow a natural sequence with useful whitespace. However, the distinction between absolute positions and relative lengths is unclear, increasing the effort needed to understand buffer indexing.
Run 3
Code Structure: Constants, initialization, hashing, and round operations are logically separated, although mac combines several processing phases. Nesting: Mostly shallow; nested compression loops and an endian conditional remain manageable. Clarity of intent: The SipHash reference, named constants, and comments help, but abbreviated names such as see, inp, needs, and lef obscure meaning. The switch's intentional fall-through lacks explanation, and cryptographic operations require algorithm knowledge. Code length: Reasonably concise for the algorithm, though mac is lengthy and could benefit from clearer phase boundaries. Action granularity: Statements generally perform one action per line, making state updates easy to follow. Reading flow: Initialization, block processing, remainder handling, and finalization follow a natural sequence. However, len represents a byte count while off represents an absolute position, making the loop boundary confusing. Minor formatting inconsistencies and vague comments also reduce polish.