Sample
int-ae7afba62530-I05
Rewrite eligible decimal integer literals in hexadecimal notation
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.671 | 0–1; higher is more readable |
| Dorn | 0.843 | 0–1; higher is more readable |
| Mi | 0.324 | 0–1; higher is more readable |
| LLOC | 22 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 17 | 0–20; mean of three runs |
| GPT-6.1 Sol | 18 | 0–20; mean of three runs |
| BTTF | 0.593 | 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. | 2474.179 | −81.648 |
| Source linesThe number of non-empty source lines. | 93 | +37.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.638 | −6.958 |
Intercept 8.87 + feature contributions = -42.536 (log-odds).
Score = sigmoid(-42.536) = 0.
| Score | 0.671 |
|---|
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. | 94 | −2.292 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 87 | +2.272 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 107.926 | +0.937 |
| 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. | 107.968 | −0.908 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 92.844 | +0.888 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.065 | +0.312 |
Intercept 0.07 + feature contributions = 1.677 (log-odds).
Score = sigmoid(1.677) = 0.843.
| Score | 0.324 |
|---|
| Score | 22 |
|---|
Run 1
The code is well-structured and readable. It uses a clean class layout with clear separation of constructors, static helpers, and instance methods. Nesting is minimal, with no deep conditional or logical blocks. The intent is mostly clear: representing a controller request context, converting timeouts to deadlines, and delegating quota application. Constructor overloads are concise and delegation via `this(...)` avoids duplication. Action granularity is mostly one action per line, though constructor chaining for `RequestHeaderData` is slightly dense but still readable. Naming is descriptive (`deadlineNs`, `partitionChangeQuotaApplier`) and the use of `OptionalLong` is appropriate. The static helper `requestTimeoutMsToDeadlineNs` is clear and concise. Minor reductions in readability come from the `__ -> { }` lambda (intent could be clearer with a named no-op) and the multiple delegating constructors, which may require a brief scan to understand. Overall, the code is maintainable and straightforward.
Run 2
The code is well-structured and readable. It uses constructor chaining effectively to avoid duplication, has clear method names, and maintains a flat structure with minimal nesting. Each action is generally on its own line, especially in the builder-style header construction. The static helper method is concise and the Javadoc explains the quota behavior. The only minor deductions are the use of lambda parameter __ (intentionally ignored) which slightly reduces clarity, and the mixed formatting of the method signature for requestTimeoutMsToDeadlineNs, though this is minor. Overall, the code is clean, purposeful, and easy to follow.
Run 3
The code is generally well-structured with clear intent, reasonable method lengths, and flat nesting. It uses constructor overloading effectively and has a simple static utility method. However, readability is slightly reduced by the use of lambda parameters named '__' for no-op consumers, which may be unclear to some readers, and the chained builder pattern in the RequestHeaderData construction is dense. The class is concise, methods perform single actions, and the flow is natural.
Run 1
Code Structure: Clearly organized context class with constructor delegation, accessors, and quota handling; placing the static helper before fields slightly interrupts conventional organization. Nesting: Very shallow, with no complex control flow. Clarity of intent: Descriptive names, explicit time units, and quota documentation communicate purpose well, though the '__' lambda parameter and implicit no-op quota behavior are less self-explanatory. Code length: Appropriately concise; constructor overloads add repetition but support distinct initialization paths. Action granularity: Assignments and chained header setters generally occupy separate lines, making individual actions easy to follow. Reading flow: Consistent formatting and straightforward delegation make the class easy to scan, although the multiline constructor invocation requires modest attention.
Run 2
Code Structure: Clearly organized around immutable fields, delegating constructors, accessors, and quota application, though placing the static helper before fields slightly interrupts conventional organization. Nesting: Minimal nesting; constructor delegation and a fluent builder keep control flow flat. Clarity of intent: Descriptive class, method, and parameter names make the purpose clear, with useful quota documentation. The no-op lambdas and double-underscore parameters are slightly less explicit. Code length: Concise overall; constructor overloads add some repetition but support distinct initialization paths. Action granularity: Assignments and fluent setter calls occupy separate lines; the timeout conversion combines straightforward operations in one expression. Reading flow: Consistent formatting and predictable delegation make the code easy to follow, although import grouping and the long timeout expression could be improved.
Run 3
Code Structure: Clearly organized into a deadline utility, immutable fields, delegating constructors, accessors, and quota application; placing the utility before fields slightly interrupts conventional organization. Nesting: Very shallow, with no nested control flow. Clarity of intent: Descriptive names, explicit time units, and quota documentation communicate purpose well, though the empty lambdas and '__' parameter are less self-explanatory. Code length: Concise for its responsibilities; constructor overloads add some repetition but reuse initialization effectively. Action granularity: Assignments and accessor returns each perform one action per line; the request-header builder chain separates each setter clearly. Reading flow: Consistent formatting and constructor delegation make the class easy to follow, with minor friction from densely grouped imports and the long deadline-conversion expression.