Sample
int-5b1574407ef6-I06
Invert eligible conditions and exchange their branches
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.246 | 0–1; higher is more readable |
| Dorn | 0.159 | 0–1; higher is more readable |
| Mi | 0.13 | 0–1; higher is more readable |
| LLOC | 49 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 3.67 | 0–20; mean of three runs |
| GPT-6.1 Sol | 12.33 | 0–20; mean of three runs |
| BTTF | 0.408 | 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. | 7865.223 | −259.552 |
| Source linesThe number of non-empty source lines. | 158 | +63.2 |
| Byte entropyHow varied the bytes in the source text are. Repeated bytes give a lower value; a more even mixture gives a higher value. | 5.051 | −7.577 |
Intercept 8.87 + feature contributions = -195.059 (log-odds).
Score = sigmoid(-195.059) = 0.
| Score | 0.246 |
|---|
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. | 159 | −4.593 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 119 | +3.379 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 119 | −2.31 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 157.939 | +1.798 |
| 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. | 113.969 | −1.162 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 113.981 | +1.035 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.085 | +0.12 |
Intercept 0.07 + feature contributions = -1.664 (log-odds).
Score = sigmoid(-1.664) = 0.159.
| Score | 0.13 |
|---|
| Score | 49 |
|---|
Run 1
The code is virtually unreadable due to deliberately obfuscated conditionals like `if (!((!(overrideAnnotation instanceof TestBean testBean)))) {} else {` and `if (!((!methodName.isBlank())))`. These inverted, double-negative structures with empty if-blocks make control flow extremely difficult to follow. Nesting is deep in the factory method resolution. Variable names like `indexOfHash` are unclear. Multiple actions occur per line in some expressions. The action granularity is inconsistent, with empty blocks and meaningless negations adding noise. Reading flow is severely disrupted by the pattern of empty if branches and work in else blocks. The intent is obscured by the unnatural conditional constructs despite otherwise standard Spring code structure.
Run 2
The code has some positive aspects like descriptive method names and Javadoc, but several major readability issues exist. The most egregious problem is the bizarre negation pattern like 'if (!((!(...))))' which makes boolean logic unnecessarily confusing. The conditional logic is inverted in many places (checking for empty/null conditions as the else branch when the if branch does nothing). Method names like 'findTestBeanFactoryMethod' are verbose but clear, and actions are mostly separated per line. However, the structure is convoluted with inverted conditionals, empty blocks, and complex nested logic. The static method search logic at lines 100-110 is particularly dense. While the code follows some good practices like proper indentation and meaningful variable names, the intentional obfuscation of boolean expressions and empty if-branches severely impairs readability. The code appears to have been deliberately distorted from cleaner original code in ways that make it harder to follow the actual logic flow.
Run 3
This code is extremely unreadable due to bizarre and obfuscated conditional patterns. Lines like `if (!((!(overrideAnnotation instanceof TestBean testBean)))) {} else { ... }` invert logic using double negatives combined with empty blocks, which is confusing and error-prone. The same anti-pattern appears in multiple places (`if (!((!methodName.isBlank())))`), making the intent ambiguous. Deep nesting is present, particularly in loops with nested assertions and try-catch blocks. Action granularity is poor: many lines contain multiple operations. The structure is tangled, mixing validation, lookup, and exception handling in hard-to-follow ways. While the method Javadoc is fairly clear, the implementation deviates sharply from readability best practices. Overall, the logic could be simplified dramatically with standard control flow, but as written it is very hard to follow.
Run 1
Code Structure: Responsibilities are logically separated into handler creation, factory-method lookup, and recursive search, with useful documentation. Nesting: Generally moderate, but fully qualified method handling combines a loop, conditional, try/catch, and validation. Clarity of intent: Descriptive names and comments help, but redundant negations and empty if branches obscure straightforward conditions, especially annotation validation. Code length: Mostly justified by reflection and diagnostics, though excessive parentheses and empty branches add unnecessary noise. Action granularity: Statements generally perform one action per line; multiline predicates and exception messages remain reasonably organized. Reading flow: Lookup proceeds in a logical sequence, but inverted conditions, empty branches, and dense reflection expressions repeatedly interrupt comprehension. The annotation pattern variable's unusual control-flow placement also makes its scope difficult to reason about.
Run 2
Code Structure: Responsibilities are logically separated into handler creation, factory-method lookup, and recursive discovery, with useful documentation. Nesting: Mostly moderate, but the fully qualified lookup combines branching, exception handling, and validation. Clarity of intent: Descriptive names and detailed Javadoc help, while redundant negations and empty if branches obscure otherwise simple conditions. Code length: Reasonable for the reflection and hierarchy-search requirements, though verbose conditional syntax adds unnecessary clutter. Action granularity: Most statements perform one action, but compound predicates and inline formatting require extra parsing. Reading flow: The overall progression is coherent, but inverted branches, empty blocks, and comments such as 'Otherwise' appearing before the explicit-method branch interrupt natural reading. Straightforward conditions and consistently ordered branches would substantially improve readability.
Run 3
Code Structure: Responsibilities are reasonably separated into handler creation, factory-method lookup, and recursive search, though the main lookup method combines several concerns. Nesting: Generally moderate, but empty if branches followed by substantive else blocks create unnecessary complexity. Clarity of intent: Descriptive names, documentation, and diagnostic messages explain the purpose well; repeated negations and excessive parentheses obscure otherwise simple conditions. Code length: Mostly justified by validation and reflection logic, but verbose conditionals and the lengthy lookup method could be simplified. Action granularity: Most statements perform one action per line; multiline assertions and stream expressions remain reasonably cohesive. Reading flow: Method ordering and comments provide a logical progression, but inverted branching, empty blocks, and dense predicates repeatedly interrupt it. Additionally, the initial pattern-variable check does not clearly establish testBean's scope for subsequent use, and the documented zero-argument requirement is not visibly enforced in the method filter, weakening trust in the code's expressed intent.