Sample
int-51e8f8a5db0d-I06
Invert eligible conditions and exchange their branches
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.585 | 0–1; higher is more readable |
| Dorn | 0.266 | 0–1; higher is more readable |
| Mi | 0.127 | 0–1; higher is more readable |
| LLOC | 18 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 11.67 | 0–20; mean of three runs |
| GPT-6.1 Sol | 12.67 | 0–20; mean of three runs |
| BTTF | 0.475 | 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. | 2541.796 | −83.879 |
| Source linesThe number of non-empty source lines. | 67 | +26.8 |
| 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.963 | −7.444 |
Intercept 8.87 + feature contributions = -55.653 (log-odds).
Score = sigmoid(-55.653) = 0.
| Score | 0.585 |
|---|
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. | 184 | −4.128 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 184 | +2.164 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 68 | −1.371 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 51 | +1.027 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 66.93 | +0.526 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.066 | +0.298 |
Intercept 0.07 + feature contributions = -1.017 (log-odds).
Score = sigmoid(-1.017) = 0.266.
| Score | 0.127 |
|---|
| Score | 18 |
|---|
Run 1
The code has a clear class purpose and good Javadoc, but readability suffers from several issues. The main problems are unnecessarily complex conditional expressions with double negatives (e.g., 'if (!((tokenEndpointUrl.getProtocol().toLowerCase(Locale.ROOT).equals("file"))))' and 'if (!((delegate == null))) {} else { throw ... }'). The inline if-else statements compress multiple actions into single lines, hurting readability. The retrieve() method uses a confusing empty if block with an else clause instead of a straightforward null check. The configure() method mixes configuration setup and delegation logic. While the overall structure is logical, the nesting depth in conditionals and the use of negation patterns make the code harder to parse than necessary. The method names are clear, but the actual implementation style undermines the otherwise good organization.
Run 2
The code is generally organized with clear class structure and imports, but readability is hampered by several issues. The configure method contains a long, complex conditional with awkward negation and single-line if-else that hurts clarity. The null-check in retrieve() uses a weird pattern with an empty block and negation which is confusing. Magic strings like 'file' could be constants. Some lines are excessively long, violating the 'one action per line' principle. The Javadoc is thorough but dense. The flow is mostly logical but the conditional expressions require extra mental effort. Nesting is shallow which is positive. Variable names like 'cu' are too abbreviated. Overall, the code works but could be significantly more readable with clearer conditionals, better naming, and line breaks.
Run 3
The code has a clear class structure and good documentation but suffers from poor readability in several key areas. The conditional logic is unnecessarily complex: the token endpoint protocol check uses double negation and a one-line if-else with multiple statements, making it hard to parse. Similarly, the retrieve() method contains a bizarre construct that checks for null on one branch but throws on the else, obfuscating the intent. Variable names are inconsistent - 'cu' is cryptic while 'tokenEndpointUrl' is descriptive. The configure method performs multiple actions per line in the conditional statement, violating action granularity principles. Reading flow is disrupted by these convoluted conditionals. The overall structure with a delegate pattern is sound, and imports are organized, but the implementation details significantly reduce clarity.
Run 1
Code Structure: The class is logically organized into configuration, retrieval, cleanup, and delegate access, with a straightforward delegation design. Nesting: Nesting is shallow, but excessive parentheses and inverted conditions complicate otherwise simple checks. Clarity of intent: Method names and delegation make the purpose clear; however, the empty if branch in retrieve() obscures the null guard, and the documentation references formatter classes rather than the actual HTTP retriever. Code length: The implementation is compact, but compression of conditionals sacrifices readability rather than eliminating unnecessary logic. Action granularity: Both conditionals put conditions, branches, and actions on a single line, making them harder to scan. Reading flow: The overall method order is natural, but dense conditional formatting, redundant negation, the abbreviated variable cu, and tightly packed imports interrupt smooth reading.
Run 2
Code Structure: The class is logically organized into configuration, retrieval, cleanup, and delegate access methods. Nesting: Nesting is shallow, but redundant parentheses and negated conditions make simple branches harder to parse. Clarity of intent: Delegation and URL-based implementation selection are understandable; however, the empty if branch in retrieve() obscures a straightforward null check, and the documentation names formatter classes rather than the actual HTTP retriever. Code length: Methods are concise, though the documentation is comparatively verbose. Action granularity: Most statements occupy separate lines, but both conditional blocks are compressed onto single lines, mixing checks and actions. Reading flow: Method ordering is natural, but dense conditionals, double negatives, and the abbreviated variable name cu interrupt otherwise clear flow.
Run 3
Code Structure: The class is logically organized into configuration, retrieval, cleanup, and delegate access methods. Nesting: Nesting is shallow, but unnecessary parentheses and negated conditions make branches harder to parse. Clarity of intent: Names and delegation make the overall purpose clear, though the empty if branch in retrieve() obscures a simple null check, and the documentation references formatter classes rather than the actual HTTP retriever. Code length: The implementation is compact, but excessive parentheses and verbose documentation add avoidable clutter. Action granularity: Both conditionals compress branches and statements onto single lines, weakening readability despite most other lines containing one action. Reading flow: Method order is natural, but dense conditionals, inverted logic, and tightly packed imports interrupt otherwise straightforward flow.