Sample
int-a8d7f48b893e-I06
Invert eligible conditions and exchange their branches
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.534 | 0–1; higher is more readable |
| Dorn | 0.764 | 0–1; higher is more readable |
| Mi | 0.29 | 0–1; higher is more readable |
| LLOC | 50 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 9 | 0–20; mean of three runs |
| GPT-6.1 Sol | 13 | 0–20; mean of three runs |
| BTTF | 0.359 | 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. | 4941.324 | −163.064 |
| Source linesThe number of non-empty source lines. | 129 | +51.6 |
| 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.984 | −7.475 |
Intercept 8.87 + feature contributions = -110.069 (log-odds).
Score = sigmoid(-110.069) = 0.
| Score | 0.534 |
|---|
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. | 130 | −3.567 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 116 | +3.275 |
| 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. | 123.977 | −1.586 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 128.904 | +1.392 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 123.985 | +1.196 |
| 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.097 | −0.002 |
Intercept 0.07 + feature contributions = 1.176 (log-odds).
Score = sigmoid(1.176) = 0.764.
| Score | 0.29 |
|---|
| Score | 50 |
|---|
Run 1
The code has a clear class purpose and documentation, but readability is severely hindered by bizarre inverted conditional patterns like 'if (!((source == null))) {} else { return null; }' and 'if (!((!copyRequired && sourceMap.isEmpty()))) {} else { return sourceMap; }'. These empty-if blocks with inverted logic are confusing, non-idiomatic Java, and add unnecessary nesting and mental overhead. The class does maintain good separation of concerns via helper methods and a small inner class, and line-level granularity is acceptable. However, the inverted conditions break natural reading flow and make intent hard to discern. Additionally, some duplicate logic and verbose null checks further reduce clarity. Overall, the structure is sound but the conditional style is a major readability flaw.
Run 2
The code has clear intent and logical structure but is marred by bizarre inverted conditionals like `if (!((source == null))) {} else { return null; }`. This pattern appears multiple times, severely hurting readability despite the code being otherwise well-organized. The nesting is flat, method granularity is one action per line, and naming is clear. However, the inverted empty-if blocks force the reader to mentally invert logic repeatedly, breaking reading flow and clarity. The class is appropriately concise for its purpose, and helper methods are well-separated. The Javadoc is helpful. Straightforward `if (source == null)` expressions would improve readability dramatically. The code shows good structure overall, but the unusual conditionals are a significant obstacle.
Run 3
The code has clear structure and methods are logically organized, but readability is severely compromised by bizarre conditional patterns like `if (!((source == null))) {} else { return null; }`. These empty-if blocks with negated conditions are unintuitive and obfuscate intent. Nesting is mostly flat, but the strange conditionals disrupt reading flow. Several methods are reasonably concise, but the conversion logic mixes concerns and performs multiple actions per iteration (converting key/value, checking for changes, adding entries). The class and method names are clear, and the Javadoc provides good context, but these strengths are outweighed by the confusing conditional style. The use of `MapEntry` as an intermediate structure adds clarity for batch processing, yet the overall execution path is hard to follow due to repeated inverted logic patterns. A reader must mentally invert each condition to understand when actions occur, which significantly hampers maintainability and quick comprehension.
Run 1
Code Structure: Logically organized into conversion, compatibility checks, and focused helpers, with a small entry class. Nesting: Generally shallow, though empty if branches followed by else blocks add needless complexity. Clarity of intent: Descriptive names and documentation explain map conversion well, but repeatedly negated, over-parenthesized conditions obscure straightforward checks. Code length: Mostly justified, although verbose conditional forms and boilerplate inflate the implementation. Action granularity: Most statements perform one action per line; compact empty-branch conditionals are a notable exception. Reading flow: The progression from validation through entry conversion to map construction is coherent, but inverted conditions repeatedly interrupt natural reading. Replacing these with direct guard clauses would substantially improve readability.
Run 2
Code Structure: Well-organized converter with separate key/value helpers and a small entry class. Nesting: Mostly shallow, with straightforward loops and early returns, although empty if branches followed by else blocks add needless complexity. Clarity of intent: Descriptive names and documentation explain map conversion, but repeated negations and redundant parentheses obscure simple conditions. Code length: Reasonably focused overall, though malformed-looking conditionals and some boilerplate make it longer than necessary. Action granularity: Most statements perform one action per line; compressed empty branches are the main exception. Reading flow: Conversion proceeds logically from validation through entry conversion to map creation, but readers must repeatedly decode inverted conditions, interrupting an otherwise natural flow.
Run 3
Code Structure: Well-organized converter with focused helper methods and an isolated entry class. Nesting: Generally shallow, with simple loops and early returns, but empty if branches followed by else blocks add needless complexity. Clarity of intent: Descriptive names and documentation explain map conversion well; repeatedly negated, over-parenthesized conditions obscure otherwise straightforward checks. Code length: Mostly reasonable, though verbose conditional forms and the intermediate entry wrapper add reading overhead. Action granularity: Most lines perform one clear action; compressed empty branches reduce visual clarity. Reading flow: Conversion proceeds logically from validation through entry conversion to map creation, but inverted conditions repeatedly interrupt that flow and require mental simplification.