Sample
int-fe9f1b6e99a7-I06
Invert eligible conditions and exchange their branches
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 | 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. It follows a clear, logical structure with a single class definition, straightforward imports, and well-organized fields, constructors, and methods. Nesting is minimal—there are no deep conditionals or blocks. Intent is explicit: the class represents a current lag event with partition and isolation level, and inheritance from CompletableApplicationEvent is clear. The code is concise, with no unnecessary repetition or boilerplate beyond what is idiomatic. Each line performs a single action, such as assignment or method return, improving clarity. Reading flow is natural: imports, fields, constructor, accessors, and toString override appear in a predictable order. The use of Objects.requireNonNull communicates validation clearly. Overall, it is clean, maintainable, and easy to understand with almost no ambiguity.
Run 3
The code demonstrates excellent readability. It has a logical structure with clear class hierarchy and standard constructor/getter organization. Nesting is minimal and linear. The intent is explicit: representing a current lag event with partition and isolation level. Code length is concise with no unnecessary methods. Each line performs one clear action, especially in the constructor with null checks and field assignments. The reading flow is natural, following conventional Java patterns. Minor deductions could be for missing class-level documentation, but the code is self-documenting through clear naming.
Run 1
Code Structure: Fields, constructor, accessors, and string representation are logically organized. Nesting: Flat methods with no nested control flow make the code easy to scan. Clarity of intent: Descriptive class, field, and method names clearly communicate the event's purpose; explicit null checks establish required inputs. Code length: Concise, with no unnecessary logic or duplication. Action granularity: Each statement performs one clear action; the string concatenation remains straightforward. Reading flow: Natural progression from state to initialization to accessors and representation. Minor formatting issues, including the lack of spacing between the package and imports and a long constructor signature, slightly reduce readability.
Run 2
Code Structure: Logically organized into immutable fields, constructor, accessors, and a string representation override. Nesting: Flat, with no nested control flow. Clarity of intent: Descriptive class, field, and method names make the current-lag event's purpose clear; explicit null checks communicate required inputs. Code length: Concise, with no unnecessary implementation or repetition. Action granularity: Each statement performs a single clear action; the string concatenation remains straightforward. Reading flow: Natural top-to-bottom progression and consistent formatting support easy scanning. Minor drawbacks are the long constructor signature and the lack of visual separation between the package declaration and imports.
Run 3
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 querying current lag; constructor null checks make required inputs explicit. Code length: Concise, with no unnecessary logic or duplication. Action granularity: Each statement performs a single clear action; the string concatenation remains straightforward. Reading flow: Natural progression from state definition to initialization and access. Minor formatting issues, including limited separation around imports and a long constructor signature, slightly reduce readability.