Sample
int-170df497d0e2-I06
Invert eligible conditions and exchange their branches
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.627 | 0–1; higher is more readable |
| Dorn | 0.559 | 0–1; higher is more readable |
| Mi | 0.047 | 0–1; higher is more readable |
| LLOC | 29 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 7.33 | 0–20; mean of three runs |
| GPT-6.1 Sol | 13 | 0–20; mean of three runs |
| BTTF | 0.434 | 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. | 2989.84 | −98.665 |
| Source linesThe number of non-empty source lines. | 86 | +34.4 |
| 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.884 | −7.326 |
Intercept 8.87 + feature contributions = -62.721 (log-odds).
Score = sigmoid(-62.721) = 0.
| Score | 0.627 |
|---|
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. | 150.931 | −2.728 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 87 | −2.044 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 75 | +1.857 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 150.977 | +1.631 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 85.803 | +0.79 |
| 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.07 | +0.261 |
Intercept 0.07 + feature contributions = 0.236 (log-odds).
Score = sigmoid(0.236) = 0.559.
| Score | 0.047 |
|---|
| Score | 29 |
|---|
Run 1
The code has a clear class purpose and generally follows logical organization, but readability is severely undermined by distorted control-flow expressions. Lines like `if (!((!topicConfigs.containsKey(...)))) {} else { ... }` and `if (!((this == o))) {} else { return true; }` invert typical boolean logic to the point of obscurity. This creates unnecessary nesting and ambiguous intent. The method `properties` is overly long and mixes multiple concerns: merging configs, conditional retention calculation, and exception handling. Action granularity is inconsistent; some lines bundle multiple operations while others are empty blocks. The static initializer and field declarations are structured reasonably, and naming is mostly clear, but the unnatural conditionals disrupt reading flow and force the reader to mentally negate expressions repeatedly. Overall, the code functions but reads as if it was intentionally obfuscated in places.
Run 2
The code has a clear class purpose and reasonable structure, but readability is severely damaged by bizarre inverted conditional patterns. Constructs like `if (!((condition))) {} else { ... }` invert natural logic with empty if-bodies, creating confusing, deeply nested logic where a simple `if (condition) { ... }` would suffice. The equals() method also uses this awkward style, obscuring intent. Action granularity is generally acceptable, and the Javadoc is helpful, but the unnatural conditionals disrupt reading flow and make the code appear deliberately obfuscated. The ternary-like structure of retention logic is also unnecessarily convoluted. Overall, while the class organization and comments provide some clarity, the pathological conditional style dramatically reduces readability.
Run 3
The code has some positive aspects like descriptive naming, logical class structure, and documentation, but suffers from readability issues. The most jarring problem is the inverted 'if' conditions with empty blocks and logic in 'else' branches, which completely breaks natural reading flow. The line 'if (!((!topicConfigs.containsKey(...)))) {} else {' is especially convoluted. The retention logic is unnecessarily complex: a simple 'if (!containsKey)' with the logic in the block would be clearer. The static initializer adds indirection that could be simplified. Some lines are excessively long, like the CLEANUP_POLICY_CONFIG assignment. The equals() method follows a pattern that is hard to follow due to the inverted conditions. Positive aspects: the class has a clear purpose, methods are relatively short, and variables are well-named. The Javadoc on the properties() method is helpful. However, the overall effect is that the reader must mentally 'flip' logic repeatedly, reducing understandability.
Run 1
Code Structure: Fields, initialization, constructor, configuration logic, and standard overrides are logically organized. Nesting: Generally shallow, but empty if branches followed by else blocks add unnecessary complexity around retention handling and equality checks. Clarity of intent: Descriptive names, documentation, and the configuration-precedence comment help, while negated conditions and redundant parentheses obscure otherwise simple decisions. Code length: Mostly reasonable, though verbose conditional forms and lengthy expressions could be simplified. Action granularity: Most statements perform one action per line; configuration merging is clearly separated. Reading flow: Method ordering and sequential property overrides are natural, but the inverted conditionals interrupt comprehension and force readers to mentally reconstruct straightforward guards.
Run 2
1. Code Structure: Well-organized class with separate initialization, configuration, equality, hashing, and string representation methods. 2. Nesting: Generally shallow, although the retention branch contains a try/catch and unnecessary empty if branches complicate control flow. 3. Clarity of intent: Descriptive names and documentation explain configuration precedence and retention behavior, but negated conditions, redundant parentheses, and empty branches obscure straightforward checks. 4. Code length: Mostly concise; boilerplate is reasonable, but inverted if/else constructs add needless syntax and several lines are overly long. 5. Action granularity: Most statements perform one action per line, making state changes easy to identify. 6. Reading flow: Method ordering and configuration assembly are natural, but the unusual conditional style repeatedly interrupts comprehension, especially in equals. Replacing empty branches with direct conditions would substantially improve readability.
Run 3
Code Structure: The class is logically organized into defaults, construction, configuration, and standard object methods. Nesting: Mostly shallow, but empty if branches followed by else blocks and redundant negations make conditions unnecessarily difficult to parse. Clarity of intent: Descriptive names and documentation explain configuration precedence and retention handling, while convoluted conditions obscure otherwise simple checks. Code length: Reasonably compact overall, though redundant parentheses and empty branches add avoidable clutter; several lines are overly long. Action granularity: Most statements perform one action per line, supporting readability. Reading flow: Method ordering and straightforward map updates provide a natural progression, but inverted checks interrupt the flow, particularly in equals and retention configuration. Conventional direct conditions would substantially improve readability.