Sample
int-3bb746968f2a-I06
Invert eligible conditions and exchange their branches
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0.999 | 0–1; higher is more readable |
| Scalabrino | 0.602 | 0–1; higher is more readable |
| Dorn | 0.234 | 0–1; higher is more readable |
| Mi | 0.012 | 0–1; higher is more readable |
| LLOC | 1 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 18.67 | 0–20; mean of three runs |
| GPT-6.1 Sol | 19 | 0–20; mean of three runs |
| BTTF | 0.637 | 0–1; higher is more readable |
Views
Loading feature diagnosis…
Source regions
Feature contributions
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Source linesThe number of non-empty source lines. | 22 | +8.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.749 | −7.124 |
| Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones. | 106.198 | −3.505 |
Intercept 8.87 + feature contributions = 7.042 (log-odds).
Score = sigmoid(7.042) = 0.999.
| Score | 0.602 |
|---|
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. | 220 | −5.653 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 220 | +2.745 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 1 | +1.001 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.013 | +0.817 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 8 | −0.46 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 21.905 | −0.104 |
Intercept 0.07 + feature contributions = -1.186 (log-odds).
Score = sigmoid(-1.186) = 0.234.
| Score | 0.012 |
|---|
| Score | 1 |
|---|
Run 1
The code is a well-documented, single-purpose interface. It has a clear logical structure, with a concise Javadoc explaining intent, context, and usage. There is no nesting, and the single method declaration makes the action granularity and reading flow straightforward. The code length is minimal and appropriate for an interface definition. The only minor deduction is that the Javadoc could be slightly shorter, but it remains highly readable overall.
Run 2
This interface demonstrates excellent readability. The code structure is clean and logical—a single-purpose interface with one method. Nesting is nonexistent since there are no conditional blocks or loops. Intent is clear: the Javadoc explains the interface's role in applying transport-specific formatting to SockJS frames, and the method name 'format' is self-evident. Code length is minimal and concise—just the interface signature, one method declaration, and descriptive documentation. Action granularity is optimal with only one meaningful action per line. Reading flow is natural and well-organized with proper package declaration, imports section (implicitly referenced in Javadoc), class-level documentation, and a single method declaration. The Javadoc provides useful context including implementation examples and references, making the abstraction easy to understand without having to inspect the codebase. This is a model example of clear, maintainable interface design.
Run 3
The code is a clean, well-documented Java interface. The structure is logical with a single clear method, and nesting is nonexistent. The extensive Javadoc clearly explains the purpose, usage, and variations of frame formatting. The code is concise, with no unnecessary complexity or length. Action granularity and reading flow are excellent, as the interface declares one action and the documentation flows naturally. Minor points deducted only because the Javadoc link is quite long, slightly impacting readability of the comment.
Run 1
Code Structure: A clearly organized interface contains a single formatting method. Nesting: No nested control flow or implementation complexity. Clarity of intent: The interface name, method signature, and Javadoc clearly explain transport-specific SockJS frame formatting, though method-level documentation could clarify the return value. Code length: The declaration is minimal; documentation is useful but includes a lengthy link. Action granularity: Each declaration occupies its own line, with no combined actions. Reading flow: Package, documentation, interface, and method appear in a conventional, natural order.
Run 2
Code Structure: A logically organized interface with a single responsibility. Nesting: No nested logic, making it easy to scan. Clarity of intent: Descriptive interface and method names, supported by Javadoc explaining transport-specific formatting; method-level documentation could clarify the return value. Code length: The implementation is minimal, and most documentation provides useful context, though the long Javadoc link slightly reduces readability. Action granularity: One method declaration on its own line, with no combined actions. Reading flow: The package declaration, explanatory documentation, interface declaration, and method follow a natural, conventional order.
Run 3
Code Structure: A logically organized interface with one clearly defined responsibility. Nesting: No nested control flow or unnecessary structural complexity. Clarity of intent: The interface name, method signature, and Javadoc clearly explain transport-specific frame formatting, though the method lacks its own parameter and return documentation. Code length: The implementation is minimal; the descriptive Javadoc is useful, but its long cross-reference slightly reduces readability. Action granularity: The sole method declaration occupies its own line. Reading flow: The package declaration, explanatory documentation, interface declaration, and method follow a natural, conventional Java order.