Sample
int-58b39e8d030e-SRC
Unmodified source class
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.509 | 0–1; higher is more readable |
| Dorn | 0.308 | 0–1; higher is more readable |
| Mi | 0.305 | 0–1; higher is more readable |
| LLOC | 84 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 15.67 | 0–20; mean of three runs |
| GPT-6.1 Sol | 16 | 0–20; mean of three runs |
| BTTF | 0.415 | 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. | 5373.21 | −177.316 |
| 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.646 | −6.969 |
Intercept 8.87 + feature contributions = -122.215 (log-odds).
Score = sigmoid(-122.215) = 0.
| Score | 0.509 |
|---|
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.892 | +1.448 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 100.948 | +0.824 |
| 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. | 100.978 | −0.612 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.089 | +0.074 |
Intercept 0.07 + feature contributions = -0.811 (log-odds).
Score = sigmoid(-0.811) = 0.308.
| Score | 0.305 |
|---|
| Score | 84 |
|---|
Run 1
The code is generally well-structured, with clear naming, constants, and logical separation of initialization, hashing, and round logic. The constructor validates inputs and sets up state cleanly. The sipround() method is concise and follows the algorithm directly. However, the macHash method has moderate complexity: the final partial-block switch statement uses fall-through cases, which can be harder to read, and offset calculations like `position + len + 6` reduce clarity. The loop is flat but involves multiple responsibilities (endianness handling, state update). Overall, the code is readable but could be improved with a helper method for reading the final bytes and a clearer comment for the fall-through logic.
Run 2
The code is well-structured with logical separation of constants, state initialization, and hashing logic. Nesting is shallow, and action granularity is generally one operation per line, aiding readability. The intent is clear through method names and comments, though the fall-through switch cases and bit manipulation require domain knowledge. The switch statement would appear to fall-through without comments, potentially reducing clarity. Code length is concise, and reading flow is natural with helper methods. Deductions come from the non-obvious fall-through pattern and complex cryptographic operations that could benefit from additional inline comments.
Run 3
The code is generally well-structured and readable. It uses clear variable names, helpful comments, and separates concerns logically (state initialization, hash computation, round function). The algorithm follows the reference specification, which aids understanding. However, there are areas for improvement: the switch statement for tail-byte processing is somewhat dense and uses fall-through cases, which can be hard to follow. The macHash method mixes initialization, main loop, tail handling, and finalization in one method, increasing cognitive load. A few extra helper methods or clearer section comments would improve readability. Overall, it is competent and maintainable but not exemplary in clarity.
Run 1
Code Structure: Well organized into constants, state fields, initialization, hashing, and a dedicated round method. Nesting: Mostly shallow, with manageable nested loops and a conditional. Clarity of intent: Descriptive configuration names, specification links, and endian comments explain the purpose, but terse variables and unexplained rotation constants require algorithm knowledge. The switch's intentional fall-through is not documented, and the relationship between position, len, and offset is difficult to follow. Code length: Reasonably concise for a low-level hashing implementation, though repeated round loops and state assignments add some repetition. Action granularity: Almost every statement performs one operation, making state changes easy to track. Reading flow: Initialization, block processing, tail handling, and finalization follow a natural sequence; however, the lengthy fall-through switch and mutable instance state increase the reader's tracking burden.
Run 2
Code Structure: Constants, initialization, hashing, and round operations are logically separated, though mutable instance state makes data dependencies less explicit. Nesting: Mostly shallow, with only a conditional and round loop inside the block-processing loop. Clarity of intent: Descriptive configuration names, comments, and the specification link explain the purpose; terse state variables, cryptographic constants, and undocumented switch fall-through require specialized knowledge. The distinction between absolute positions and relative lengths is not immediately clear. Code length: Reasonably concise for the algorithm, although tail-byte assembly is repetitive. Action granularity: Statements generally perform one operation per line, making state changes easy to trace. Reading flow: Initialization, block processing, tail handling, and finalization follow a natural sequence; additional phase labels and fall-through comments would improve readability.
Run 3
Code Structure: Well organized into initialization, hashing, and a dedicated round function, with named constants separating configuration from state. Nesting: Mostly shallow; the block-processing loop contains only a conditional and a round loop. Clarity of intent: Descriptive configuration names and specification references help, but terse state variables, unexplained rotation constants, and undocumented switch fall-through require algorithm knowledge. The relationship between position, remaining, and len is also difficult to follow. Code length: Reasonably concise for a cryptographic implementation, though tail-byte handling is repetitive. Action granularity: Almost every line performs one operation, making state updates easy to inspect. Reading flow: Initialization, block processing, tail handling, and finalization follow a natural sequence, with whitespace grouping round operations. More explicit phase comments and clarification of fall-through and offset calculations would improve readability.