Sample
int-fa8c5dc0e89c-I06
Invert eligible conditions and exchange their branches
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 1 | 0–1; higher is more readable |
| Scalabrino | 0.899 | 0–1; higher is more readable |
| Dorn | 0.728 | 0–1; higher is more readable |
| Mi | 0.399 | 0–1; higher is more readable |
| LLOC | 1 | 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.747 | 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. | 51 | +20.4 |
| Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones. | 382.574 | −12.625 |
| 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.905 | −7.358 |
Intercept 8.87 + feature contributions = 9.288 (log-odds).
Score = sigmoid(9.288) = 1.
| Score | 0.899 |
|---|
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. | 52 | −0.805 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.015 | +0.793 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 95.962 | +0.744 |
| 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. | 95.981 | −0.4 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 50.845 | +0.301 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 18 | −0.115 |
Intercept 0.07 + feature contributions = 0.986 (log-odds).
Score = sigmoid(0.986) = 0.728.
| Score | 0.399 |
|---|
| Score | 1 |
|---|
Run 1
This code demonstrates excellent readability. The interface is well-structured with clear separation between documentation, constants, and the method signature. Javadoc comments are thorough and explain the purpose, parameters, and exceptions in detail. The method signature is concise yet descriptive, with clear parameter names (ps, paramIndex, sqlType, typeName) and proper use of @Nullable annotation. Nesting is minimal since this is a single interface declaration. The code follows Spring Framework conventions, making it familiar to experienced Java developers. While the Javadoc is comprehensive, it's not excessive for a public API. The single constant TYPE_UNKNOWN is well-documented. The code achieves strong clarity of intent - it clearly defines a callback interface for setting complex SQL type values. Overall, this is exemplary Java API code that balances thorough documentation with clean implementation.
Run 2
The code is highly readable due to its clear structure and concise documentation. The interface is logically organized with a single constant and a single method, both preceded by Javadoc that clearly explains their purpose and parameters. Nesting is minimal, with straightforward control flow. The intent is unambiguous: to define a callback for setting database-specific types. The code length is appropriate—no unnecessary methods or fields—and each action, such as declaring the constant or method signature, is presented clearly. Javadoc formatting aids natural reading flow, despite being slightly verbose. Overall, this is a textbook example of well-structured Java interface code.
Run 3
The code is highly readable. It has a clear, logical structure as an interface with one constant and one method. Nesting is essentially flat, with no complex conditional logic. Intent is explicitly documented through a comprehensive Javadoc comment explaining the interface's purpose, usage, and relationships. Code length is minimal and focused, with no unnecessary code bloat. Action granularity is clear—each declaration is on its own line with well-formatted signatures. Reading flow follows a natural progression: package, imports, documentation, constant, then method. The only minor issue is the line break in the method signature, which is slightly awkward but still standard Java formatting.
Run 1
Code Structure: Logically organized into imports, interface documentation, a constant, and one method declaration. Nesting: Minimal, with only the interface scope and no nested control flow. Clarity of intent: Descriptive names and thorough Javadoc clearly explain the database-specific parameter-setting callback, optional type name, and exception behavior. Code length: The implementation is concise, though the documentation contains slightly repetitive wording. Action granularity: Each declaration has a single purpose; the wrapped throws clause remains easy to follow. Reading flow: Natural top-to-bottom progression and consistent formatting make scanning straightforward. Minor extra blank lines and the lack of spacing between the package and imports slightly reduce polish.
Run 2
Code Structure: A logically organized interface with imports, a constant, and a single method. Nesting: Flat, with no nested control flow. Clarity of intent: Descriptive names and thorough Javadoc clearly explain the purpose, parameters, optional type name, and exception behavior; 'ps' is slightly abbreviated. Code length: The implementation is minimal, though documentation contains some repetitive wording. Action granularity: Each declaration has a single responsibility, with no combined actions. Reading flow: The progression from interface overview to constant and method is natural; minor extra blank lines and the wrapped throws clause do not meaningfully interrupt readability.
Run 3
Code Structure: The interface is logically organized into imports, interface documentation, a constant, and a callback signature. Nesting: Minimal nesting makes it easy to scan. Clarity of intent: Descriptive names, detailed Javadoc, and the Nullable annotation clearly communicate the callback's purpose and parameter contract; ps is slightly abbreviated. Code length: The executable declarations are concise, although some documentation is repetitive. Action granularity: Each declaration has a single responsibility, with no combined actions. Reading flow: The progression from interface purpose to constant semantics to callback details is natural. Minor excess whitespace and verbose comments slightly reduce readability.