Sample
int-725b7e3ed303-SRC
Unmodified source class
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.798 | 0–1; higher is more readable |
| Dorn | 0.568 | 0–1; higher is more readable |
| Mi | 0.548 | 0–1; higher is more readable |
| LLOC | 31 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 17 | 0–20; mean of three runs |
| GPT-6.1 Sol | 18.33 | 0–20; mean of three runs |
| BTTF | 0.615 | 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.858 | −7.288 |
Intercept 8.87 + feature contributions = -53.13 (log-odds).
Score = sigmoid(-53.13) = 0.
| Score | 0.798 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Indentation frequencyHow rapidly indentation changes from line to line. | 68 | +1.615 |
| 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. | 68 | −1.14 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 86.972 | +0.599 |
| 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.089 | +0.08 |
| 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 = 0.274 (log-odds).
Score = sigmoid(0.274) = 0.568.
| Score | 0.548 |
|---|
| Score | 31 |
|---|
Run 1
The code is highly readable. Structure is clear: constants, keys, thread locals, helper, public methods, private constructor. Nesting is minimal (one try-catch). Intent is well-explained with a helpful comment about key separation. Length is concise. Each line performs one action, and reading flow is natural. Minor deductions: exception handling is slightly verbose, and the FastThreadLocal initialValue pattern adds a bit of boilerplate, but overall the code is easy to follow and maintain.
Run 2
The code is logically structured with clear separation of concerns: constants, initialization, thread-local setup, and signing methods. Nesting is minimal — only one level in the static initializer and try-catch blocks. The intent is well documented, especially the security rationale for separate keys. Method names (`signCid`, `signToken`, `newMac`) clearly describe their purposes. Code length is concise without sacrificing clarity; the class does one thing well. Each line performs a single logical action, enhancing readability. The reading flow is natural: static fields, initialization, helper methods, public API, then private constructor. Minor deductions: the `sign` method could be slightly clearer with intermediate variables, and the empty private constructor could benefit from a comment explaining the utility-class pattern. Overall, the code is highly readable for a cryptographic utility class.
Run 3
The code is well-structured and highly readable. It uses clear naming, concise methods, and logical separation of concerns. The static initialization of keys and thread-local Mac instances is sensible. Comments explain non-obvious design decisions. Each method performs a single action, and nesting is minimal. Minor deductions: exception handling in a single catch block is fine, but the sign method could be slightly clearer about why the key length check exists. Overall, very clean code with good documentation and flat structure.
Run 1
Code Structure: Logically organized into key initialization, thread-local MAC instances, shared helpers, and purpose-specific entry points. Nesting: Shallow, with only straightforward initialization, exception handling, and one conditional. Clarity of intent: Descriptive names and the key-separation comment clearly explain the purpose; however, input buffer consumption and output truncation or padding are not documented. Code length: Concise overall, with minor duplication in the two thread-local declarations. Action granularity: Each statement performs a single clear action. Reading flow: Natural progression from configuration to initialization to implementation and public-facing operations, with consistent formatting and spacing.
Run 2
Code Structure: Constants, key initialization, thread-local MAC instances, shared helpers, and signing entry points are logically organized. Nesting: Shallow try/catch and a single conditional keep control flow easy to follow. Clarity of intent: Descriptive names and the key-separation comment explain the purpose well; however, input buffer consumption and truncation or zero-padding behavior are not documented. Code length: Compact methods and shared helpers avoid unnecessary repetition, with only minor duplication in thread-local initialization. Action granularity: Each statement performs a distinct operation, making execution easy to trace. Reading flow: Consistent formatting and straightforward delegation support natural reading, though spacing between the package declaration and imports would improve presentation.
Run 3
Code Structure: Well-organized constants, key initialization, thread-local MAC instances, shared helpers, and signing entry points. Nesting: Shallow, limited to initialization overrides, a try/catch, and one conditional. Clarity of intent: Descriptive names and a useful comment clearly explain the separation of CID and token signing; input buffer consumption and output truncation or padding are less explicit. Code length: Concise, with shared helpers avoiding substantial duplication. Action granularity: Each statement performs a distinct action, making operations easy to follow. Reading flow: Consistent formatting and logical grouping support natural top-to-bottom reading, though the lack of spacing after the package declaration is a minor presentation issue.