Sample
int-fdbd3da4b55a-I06
Invert eligible conditions and exchange their branches
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 1 | 0–1; higher is more readable |
| Scalabrino | 0.928 | 0–1; higher is more readable |
| Dorn | 0.581 | 0–1; higher is more readable |
| Mi | 0.226 | 0–1; higher is more readable |
| LLOC | 13 | 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.717 | 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. | 77 | +30.8 |
| Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones. | 529.661 | −17.479 |
| 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.253 | −6.38 |
Intercept 8.87 + feature contributions = 15.811 (log-odds).
Score = sigmoid(15.811) = 1.
| Score | 0.928 |
|---|
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. | 77 | −1.69 |
| 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. | 118.962 | −1.374 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 119 | +1.116 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.014 | +0.807 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 76.842 | +0.664 |
| 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 |
Intercept 0.07 + feature contributions = 0.326 (log-odds).
Score = sigmoid(0.326) = 0.581.
| Score | 0.226 |
|---|
| Score | 13 |
|---|
Run 1
The code is well-structured with a clear class purpose and logical organization. It uses flat nesting, minimal lines, and one action per line. Javadoc comments thoroughly explain parameters and return values, making intent unambiguous. The constructor and getters follow natural reading flow, and the use of Objects.requireNonNull is concise and clear. Minor deductions for verbose comments slightly increasing length, but overall the code is highly readable.
Run 2
The code is highly readable. It has a clear, logical structure with a single purpose: defining a context object. The class is flat with no nested logic or control flow. Intent is explicit through descriptive names and thorough Javadoc. Code length is appropriate—three fields, one constructor, three getters—with no unnecessary code. Each action is on its own line, especially in the constructor. Reading flow is natural, moving from fields to constructor to accessors. Minor deductions: Javadoc is somewhat verbose in places, and the import of java.util.Objects is slightly separated from the package declaration by only a blank line, though this is typical. Overall, it is concise, well-documented, and easy to understand.
Run 3
The code is highly readable. It has a clean, logical structure with a single class containing three private final fields, a constructor, and three getter methods. Nesting is minimal—no conditional blocks or loops. The intent is clear, both from the class name and the comprehensive Javadoc, which explains the purpose of each parameter and return value. The code is concise, with no unnecessary methods or boilerplate. Each statement performs one action, and the constructor uses `Objects.requireNonNull` to make validation explicit. Reading flow is natural: fields, constructor, then getters in a consistent order. Minor room for improvement could be shortening repetitive Javadoc, but overall this is exemplary readability.
Run 1
Code Structure: A logically organized context class with final fields, a constructor, and straightforward accessors. Nesting: Flat, with no nested control flow. Clarity of intent: Descriptive names and detailed documentation clearly explain re-authentication state, nullability, and timing semantics. Code length: Implementation is concise, though documentation repeats substantial details between the constructor and accessors. Action granularity: Each statement performs one clear action, including explicit null validation. Reading flow: Conventional field–constructor–accessor ordering makes the class easy to follow; minor field-order differences and verbose comments slightly interrupt an otherwise natural flow.
Run 2
Code Structure: Logically organized as fields, constructor, and accessors, with a single clear responsibility. Nesting: Flat methods with no nested control flow. Clarity of intent: Descriptive names, final fields, explicit null validation, and documentation clearly explain the context and timing semantics. Code length: Implementation is concise, but lengthy, duplicated documentation adds avoidable reading overhead. Action granularity: Each statement performs one action, and each accessor returns one field. Reading flow: Conventional ordering and consistent formatting make the class easy to follow; the long constructor signature and repetitive comments slightly interrupt the flow.
Run 3
Code Structure: Logically organized into immutable fields, a constructor, and simple accessors. Nesting: Flat, with no nested control flow. Clarity of intent: Descriptive names and detailed documentation clearly explain re-authentication context, nullability, and timing semantics. Code length: Implementation is concise, though repeated Javadoc descriptions make the class longer than necessary. Action granularity: Each statement performs a single assignment, validation, or return. Reading flow: Natural progression from state to initialization to accessors; lengthy duplicated comments slightly interrupt scanning.