Sample
int-6fae5294d142-I11
Split eligible integer literals into pairs of short-named intermediate variables
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.33 | 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 with clear separation of concerns, minimal nesting, and concise methods. Constructor overloading and delegation are handled cleanly, avoiding duplication. Naming is descriptive and consistent, making intent clear. The helper method requestTimeoutMsToDeadlineNs is straightforward, though the conversion could be slightly more readable with TimeUnit.MILLISECONDS.toNanos(). The use of lambda placeholders (__ -> { }) slightly reduces readability but is acceptable. Overall, the code flows naturally and is easy to follow.
Run 3
The code is generally well-structured and readable. It uses clear naming conventions, separates methods logically, and keeps nesting flat. The purpose of each method is evident, and the use of overloaded constructors is clean. The `partitionChangeQuotaApplier` parameter uses a no-op lambda default, which is concise. However, there are minor readability issues: the static import of time units is used but not obvious at first glance, and the `requestTimeoutMsToDeadlineNs` method has a slightly long parameter list and expression that could be broken for clarity. Overall, the code is maintainable and easy to follow, with only small areas for improvement.
Run 1
Code Structure: Logically organized around a request-context class, with constructor delegation avoiding duplicated initialization. Nesting: Very shallow; no complex branches or loops. Clarity of intent: Descriptive field and method names, explicit time units, and quota-method documentation make the purpose clear. The no-op lambda parameter '__' and undocumented quota callback slightly reduce clarity. Code length: Concise overall; constructor overloads and simple accessors add justified boilerplate. Action granularity: Assignments and chained header setters occupy separate lines, making individual operations easy to identify. Reading flow: Constructors lead naturally into accessors and quota application. Minor distractions include the utility method preceding fields, tightly grouped imports, and the long deadline-conversion expression.
Run 2
Code Structure: Well-organized context class with immutable fields, delegating constructors, simple accessors, and a focused quota method; placing the static helper before fields slightly interrupts conventional ordering. Nesting: Very shallow, with no nested control flow. Clarity of intent: Descriptive names, explicit time units, and quota documentation make the purpose clear, though the no-op lambdas and '__' parameter are less self-explanatory. Code length: Concise overall; constructor overloads add length but avoid duplicated initialization. Action granularity: Assignments and chained header setters are clearly separated, with one meaningful action per line; the deadline calculation is compact but slightly long. Reading flow: Constructor delegation and consistent formatting support natural reading, although import grouping and the expanded constructor formatting could be polished.
Run 3
Code Structure: Fields, delegating constructors, accessors, and quota handling are logically organized, though placing the static utility before fields slightly interrupts the layout. Nesting: Very shallow, with no nested control flow. Clarity of intent: Descriptive names, explicit time units, and quota documentation make the purpose clear; the '__' lambda parameter and undocumented no-op defaults are minor weaknesses. Code length: Concise for the functionality, with constructor delegation avoiding duplicated initialization. Action granularity: Assignments and chained header setters generally occupy separate lines; the deadline calculation combines closely related operations clearly. Reading flow: Consistent formatting and straightforward delegation support natural reading, although multiple constructor overloads require some tracing.