Sample
int-dd1ac2936992-I12
Inline all eligible single-use intermediate local variables
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.752 | 0–1; higher is more readable |
| Dorn | 0.221 | 0–1; higher is more readable |
| Mi | 0.108 | 0–1; higher is more readable |
| LLOC | 11 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 18.33 | 0–20; mean of three runs |
| GPT-6.1 Sol | 19 | 0–20; mean of three runs |
| BTTF | 0.609 | 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. | 909.583 | −30.016 |
| Source linesThe number of non-empty source lines. | 31 | +12.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.68 | −7.02 |
Intercept 8.87 + feature contributions = -15.767 (log-odds).
Score = sigmoid(-15.767) = 0.
| Score | 0.752 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| 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. | 119.969 | −1.416 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 0 | −0.804 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 31 | +0.335 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.077 | +0.197 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 31 | −0.061 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 30.769 | +0.02 |
Intercept 0.07 + feature contributions = -1.261 (log-odds).
Score = sigmoid(-1.261) = 0.221.
| Score | 0.108 |
|---|
| Score | 11 |
|---|
Run 1
The code is well-structured with clear separation of concerns: imports, field declarations, constructor, accessors, and toString override. It is flat with no nested logic. Purpose is unambiguous: a completion event carrying partition and isolation level data. The length is concise with no unnecessary code. Each action (assignment, null check, return) is on its own line. Reading flow is natural, progressing from fields to construction to access. Minor deduction for the long class declaration line and the chained `Objects.requireNonNull` calls reducing slightly the one-action-per-line granularity.
Run 2
The code is highly readable. Structure is logical: class declaration, fields, constructor, getters, and toString override follow standard Java conventions. Nesting is absent. Intent is clear from the class name and method signatures; each method has a single, obvious purpose. Lines are concise, with one action per statement. Reading flow is natural, progressing from field declarations through construction to behavior. Null checks via Objects.requireNonNull enhance robustness without harming clarity.
Run 3
The code is highly readable. It follows a clear, logical structure with a single class extending a base event. Nesting is minimal and flat. The intent is unambiguous: represent a request for current lag with partition and isolation level. The code is concise, with no unnecessary lines. Each action (field initialization, getter return, toString construction) occupies its own line, maintaining clear action granularity. Reading flow is natural, moving from class declaration to fields, constructor, getters, and overridden method. The use of `Objects.requireNonNull` adds clarity about invariants. Overall, this is an exemplary small class.
Run 1
Code Structure: Logically organized into fields, constructor, accessors, and string representation. Nesting: Flat methods with no nested control flow. Clarity of intent: Descriptive class, field, and method names clearly convey the event's purpose; explicit null checks clarify required inputs. Code length: Concise, with little unnecessary code. Action granularity: Each statement performs a single clear action; the string concatenation remains easy to follow. Reading flow: Natural progression from state to initialization to access and representation. Minor formatting improvements, such as separating the package declaration from imports and wrapping the long constructor signature, would improve readability.
Run 2
Code Structure: Logically organized into fields, constructor, accessors, and a string representation override. Nesting: Flat, with no nested control flow. Clarity of intent: Descriptive class, field, and method names clearly convey an event for retrieving current lag; explicit null checks establish required inputs. Code length: Concise, with little unnecessary boilerplate. Action granularity: Each statement performs one clear action, and the constructor cleanly separates initialization steps. Reading flow: Natural progression from state declaration to initialization and access. Minor formatting drawbacks include the lack of spacing between package and imports and long constructor and string-concatenation lines.
Run 3
Code Structure: Fields, constructor, accessors, and string representation are logically organized. Nesting: Entirely flat, with no nested control flow. Clarity of intent: Descriptive class and member names, explicit types, and null checks clearly communicate the event's purpose and requirements. Code length: Concise, with minimal boilerplate and no unnecessary logic. Action granularity: Each statement performs one clear action; the string concatenation remains easy to understand. Reading flow: Natural progression from state declaration to initialization and accessors. Minor formatting improvements, such as separating package and import declarations and wrapping the long constructor signature, would improve readability further.