Sample
int-cd266e4051bb-I06
Invert eligible conditions and exchange their branches
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0.996 | 0–1; higher is more readable |
| Scalabrino | 0.939 | 0–1; higher is more readable |
| Dorn | 0.795 | 0–1; higher is more readable |
| Mi | 0.687 | 0–1; higher is more readable |
| LLOC | 27 | 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.72 | 0–1; higher is more readable |
Views
Loading feature diagnosis…
Source regions
Feature contributions
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Source linesThe number of non-empty source lines. | 128 | +51.2 |
| Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones. | 1427.996 | −47.124 |
| 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.888 | −7.331 |
Intercept 8.87 + feature contributions = 5.615 (log-odds).
Score = sigmoid(5.615) = 0.996.
| Score | 0.939 |
|---|
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. | 123 | −3.319 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 74 | +1.822 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 127.781 | +1.376 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 94.961 | +0.728 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.032 | +0.635 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| 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. | 94.953 | −0.357 |
Intercept 0.07 + feature contributions = 1.354 (log-odds).
Score = sigmoid(1.354) = 0.795.
| Score | 0.687 |
|---|
| Score | 27 |
|---|
Run 1
The code is highly readable. Package and imports are clear, and the class has a focused responsibility. Fields are logically organized with sensible defaults. All public methods are simple, flat, one-action-per-line getters/setters with no deep nesting. Javadoc comments clearly explain intent, constraints, and defaults, aiding understanding. Method names are descriptive, and the use of @Nullable improves contract clarity. The only minor issue is the slight redundancy of having both isLazyInit() and getLazyInit(), but this is a common spring pattern to distinguish primitive boolean semantics from nullable Boolean. Code length is concise and not bloated. Overall, it follows clean code practices consistently.
Run 2
This code is highly readable. It follows a clear, consistent structure with fields grouped at the top and paired setters/getters below. Nesting is minimal, with a single ternary expression in two setters. The intent of each method is explicitly documented with concise Javadoc, including edge cases and defaults. Code length is appropriate for a simple data holder class—no unnecessary methods or logic. Each statement generally performs one action, and the reading flow is natural: definition, then behavior. Minor deductions: some Javadoc is sparse for getters and the ternary adds slight cognitive load, but overall this is excellent.
Run 3
The code is highly readable. It follows a clear, consistent structure with grouped fields and standard getter/setter pairs. Nesting is minimal — only simple ternary expressions in two setters do any conditional work, keeping the logic flat. Intent is explicit through descriptive method names and comprehensive Javadoc comments that explain behavior, defaults, and related methods. Code length is appropriate: it avoids redundancy while still providing separate getters for primitive boolean and nullable Boolean semantics where needed. Each line performs a single action, and the overall flow is natural, with fields first, then methods in logical order. Minor deductions might come from the slight cognitive load of having both isLazyInit() and getLazyInit(), but this is well-documented and purposeful.
Run 1
Code Structure: Fields are declared together, followed by logically paired setters and getters. Nesting: Methods are flat, with no nested control flow. Clarity of intent: Descriptive names, explicit default constants, nullable annotations, and Javadocs clearly explain behavior, including the distinction between isLazyInit() and getLazyInit(). Code length: Implementations are concise; documentation adds useful context but is somewhat repetitive for simple accessors. Action granularity: Each statement performs one assignment or return; the short ternary expressions remain easy to understand. Reading flow: Consistent formatting and property-by-property organization make the class easy to scan. Minor verbosity and excess blank lines prevent a perfect score.
Run 2
Code Structure: Fields precede logically paired setters and getters, creating a well-organized holder class. Nesting: Methods are flat, with no nested control flow. Clarity of intent: Descriptive names, explicit default constants, nullability annotations, and helpful documentation clearly communicate behavior, including the distinction between nullable getLazyInit() and boolean isLazyInit(). Code length: Implementations are concise, although extensive and occasionally repetitive Javadoc makes the class longer to scan. Action granularity: Each statement performs one focused assignment or return; the simple ternary expressions remain easy to understand. Reading flow: Consistent formatting and property-by-property ordering support natural reading. Minor readability costs come from documentation verbosity and integer-based modes that require consulting external constants.
Run 3
Code Structure: Fields precede logically paired setters and getters, creating a well-organized holder class. Nesting: Methods are flat, with no nested control flow. Clarity of intent: Descriptive names, explicit defaults, nullability annotations, and helpful Javadocs clearly explain behavior, including the distinction between unset and false lazy initialization. Code length: Implementations are concise; extensive documentation and repetitive accessor boilerplate slightly increase reading length but remain useful. Action granularity: Each statement performs one clear assignment or return; ternary expressions provide straightforward normalization without obscuring intent. Reading flow: Consistent formatting and predictable method ordering make the class easy to scan. Minor verbosity and reliance on externally defined integer constants prevent a perfect score.