Sample
int-33a27efcadbe-I05
Rewrite eligible decimal integer literals in hexadecimal notation
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.798 | 0–1; higher is more readable |
| Dorn | 0.569 | 0–1; higher is more readable |
| Mi | 0.573 | 0–1; higher is more readable |
| LLOC | 31 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 17.67 | 0–20; mean of three runs |
| GPT-6.1 Sol | 18.33 | 0–20; mean of three runs |
| BTTF | 0.503 | 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. | 2538.119 | −83.758 |
| 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.862 | −7.293 |
Intercept 8.87 + feature contributions = -53.781 (log-odds).
Score = sigmoid(-53.781) = 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.909 | +0.581 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.089 | +0.081 |
| 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.944 | −0.017 |
Intercept 0.07 + feature contributions = 0.276 (log-odds).
Score = sigmoid(0.276) = 0.569.
| Score | 0.573 |
|---|
| Score | 31 |
|---|
Run 1
The code is well-structured, with clear separation of concerns across constants, thread-locals, and helper methods. Nesting is minimal and control flow is flat. Intent is clearly communicated through method names, comments, and the use of distinct keys for CID and token signing. Action granularity is appropriate, with one main operation per line in the core signing logic. Reading flow is natural, from key initialization to signing utilities. Minor deductions: the static initializer could be simplified, and the `sign` method's length adjustment logic introduces slight complexity. Overall, the code is concise, organized, and easy to follow.
Run 2
The code is well-structured and highly readable. It has a clear single responsibility (HMAC signing), organized into logical methods with descriptive names. The class is flat with minimal nesting, and each method performs one focused action. The static initialization of cryptographic keys is separated clearly, and the FastThreadLocal pattern is used appropriately to avoid contention. Comments explain non-obvious design decisions, enhancing clarity of intent. The code is concise without sacrificing readability, and the reading flow is natural: fields, initialization, helper methods, public API, private constructor. Minor deductions: the sign method does slightly more than one action (reset, update, doFinal, conditional copy), and the empty private constructor is a bit terse, but these are negligible. Overall, this is exemplary readable code.
Run 3
The code is highly readable with clear structure: constants, static initialization, thread-local declarations, helper methods, and public API are well-organized. Intent is explicit—comments explain why two keys are used, and method names like signCid/signToken clearly communicate purpose. Nesting is minimal; the only try/catch is flat and handles expected exceptions concisely. Code length is appropriate—no unnecessary lines, though the static initializer could be slightly more compact. Action granularity is strong: each line performs one logical operation, especially in sign() and newMac(). Reading flow is natural: top-down from constants to initialization to helpers to public methods. Minor deductions: the anonymous FastThreadLocal subclasses add minor noise, and the sign() method has a conditional array copy that could be a one-liner, but these are trivial. Overall, excellent readability and maintainability.
Run 1
Code Structure: Constants, key initialization, thread-local instances, and focused helper methods are logically organized. Nesting: Shallow try/catch and a single conditional keep complexity low. Clarity of intent: Descriptive names and the cryptographic separation comment clearly explain purpose; hexadecimal key lengths and input buffer consumption could be more explicit. Code length: Concise, with shared initialization and signing helpers avoiding substantial duplication. Action granularity: Each statement performs a distinct operation, making execution easy to trace. Reading flow: Consistent formatting and straightforward methods support natural reading, though public-facing signing methods follow their implementation helpers rather than introducing the interface first.
Run 2
Code Structure: Constants, key initialization, thread-local instances, shared helpers, and signing entry points are logically organized. Nesting: Shallow try/catch and a single conditional keep complexity low. Clarity of intent: Descriptive names and the key-separation comment clearly explain the purpose; hexadecimal key lengths and the input buffer's consumption are less explicit. Code length: Compact overall, with modest duplication in the two thread-local declarations that reinforces their separate roles. Action granularity: Nearly every line performs one action, making operations easy to follow. Reading flow: Consistent formatting and short methods support natural reading, although import grouping and a named key-length constant would improve polish.
Run 3
Code Structure: Constants, key initialization, thread-local instances, helpers, and public-facing signing methods are logically grouped. Nesting: Shallow, limited to anonymous classes, a try/catch, and one conditional. Clarity of intent: Descriptive names and the key-separation comment clearly explain the design; hexadecimal key lengths and the input buffer's consumption are less explicit. Code length: Concise overall, with minor duplication in the two thread-local declarations. Action granularity: Each statement performs a distinct operation, making execution easy to follow. Reading flow: Natural progression from configuration to implementation and entry points, though tighter import formatting and the placement of signing entry points after helpers slightly reduce scanability.