Sample
int-096c8b821135-I06
Invert eligible conditions and exchange their branches
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.676 | 0–1; higher is more readable |
| Dorn | 0.873 | 0–1; higher is more readable |
| Mi | 0.822 | 0–1; higher is more readable |
| LLOC | 36 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 17.33 | 0–20; mean of three runs |
| GPT-6.1 Sol | 19 | 0–20; mean of three runs |
| BTTF | 0.74 | 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. | 2903.683 | −95.822 |
| Source linesThe number of non-empty source lines. | 126 | +50.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. | 5.023 | −7.535 |
Intercept 8.87 + feature contributions = -44.086 (log-odds).
Score = sigmoid(-44.086) = 0.
| Score | 0.676 |
|---|
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. | 127 | −3.46 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 119 | +3.379 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 125.805 | +1.349 |
| 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. | 116.969 | −1.289 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 116.961 | +1.083 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.056 | +0.398 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
Intercept 0.07 + feature contributions = 1.927 (log-odds).
Score = sigmoid(1.927) = 0.873.
| Score | 0.822 |
|---|
| Score | 36 |
|---|
Run 1
The code is highly readable due to its clear structure: it is organized into logical sections (WebSocketContainer methods and ServerContainer methods) with comments separating them. Nesting is completely flat, with no conditional blocks or deep indentation. Each method has a clear, single purpose—either returning a simple value or throwing an UnsupportedOperationException—making the intent unambiguous. The code is concise and avoids unnecessary verbosity, with one action per line for throws and returns. Reading flow is natural, following the interface method order and grouping related functionality. Import statements and class-level Javadoc are clean. The only minor deduction is the slight repetition in exception messages, which could be refactored to a helper method, but this does not significantly harm readability.
Run 2
This code is highly readable due to its clear structure, flat organization, and consistent patterns. The class logically groups methods into sections (WebSocketContainer vs ServerContainer), each implementing a single interface method, making the intent immediately obvious. Nesting is minimal with no deep conditional logic. Each method has a single responsibility and typically contains one action per line, especially in the unsupported operation methods. The naming convention is consistent and self-documenting - getters/setters follow standard JavaBean patterns while unsupported methods clearly identify their purpose through descriptive exceptions. The code is concise without sacrificing clarity, avoiding unnecessary verbosity despite the repetitive nature of mock implementations. Reading flow follows a natural progression from configuration methods to unsupported operations, with logical grouping that aids comprehension. The only slight deductions are for some minor line-wrapping in method signatures and the inherent repetition of exception throwing, though these are necessary for proper interface implementation and don't significantly impact readability.
Run 3
The code is highly readable. It has a clear, logical structure: fields are grouped first, followed by interface method implementations organized under section comments ('WebSocketContainer', 'ServerContainer'). Nesting is minimal—only one level for method bodies. Intent is explicit; getters/setters are straightforward, and unsupported operations use descriptive exception messages. Code length is appropriate, though repetitive, which is typical for mock implementations. Action granularity is good, with one action per line in most cases, and method signatures are formatted consistently. Reading flow is natural: the class follows a predictable getter/setter pattern before more complex methods. Minor deductions are for import verbosity and some long exception messages, but overall it is very clean and maintainable.
Run 1
Code Structure: Fields and methods are logically organized, with comments separating the two interface responsibilities. Nesting: Methods are flat, with no nested control flow. Clarity of intent: Descriptive names, class documentation, and explicit exception messages clearly communicate the mock's supported properties and unsupported operations; abbreviated parameters such as cec and sec are slightly less clear. Code length: Repeated accessors and exception-throwing methods add length, but largely reflect interface requirements rather than unnecessary complexity. Action granularity: Each statement performs a single action. Reading flow: Consistent formatting, paired getters and setters, and predictable method bodies make the code easy to scan; occasional long signatures and repeated messages introduce minor visual overhead.
Run 2
Code Structure: Fields and methods are logically organized, with interface-specific sections clearly labeled. Nesting: Methods are flat, with no nested control flow. Clarity of intent: Descriptive names, class documentation, and explicit exception messages clearly communicate the mock's supported state and unsupported operations. Code length: Getter/setter and exception boilerplate makes the class somewhat repetitive, but most of it is required by the interface. Action granularity: Each statement performs one simple action; wrapped signatures and messages remain readable. Reading flow: Consistent formatting and predictable method ordering make the code easy to scan. Minor drawbacks include abbreviated parameter names such as cec and sec, several long lines, and the lack of spacing between the package declaration and imports.
Run 3
Code Structure: Fields and methods are logically organized, with clear sections separating WebSocketContainer and ServerContainer responsibilities. Nesting: Methods are flat, with no nested control flow. Clarity of intent: Descriptive names, class documentation, and explicit unsupported-operation messages clearly communicate the mock's limited functionality; abbreviated parameters such as cec and sec are slightly less clear. Code length: The implementation is concise for the required interface, although repetitive exception messages and accessor boilerplate add length. Action granularity: Each statement performs a single action, and line wrapping preserves readability. Reading flow: Consistent formatting and predictable getter/setter ordering make the code easy to scan; minor spacing inconsistencies and long signatures slightly interrupt the flow.