Sample
int-e14ee86bdb32-I03
Replace method, parameter, and local names with length-matched, meaningful but unrelated names
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 | 0–20; mean of three runs |
| GPT-6.1 Sol | 18.33 | 0–20; mean of three runs |
| BTTF | 0.536 | 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.753 | −7.129 |
| Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones. | 108.048 | −3.566 |
Intercept 8.87 + feature contributions = 6.975 (log-odds).
Score = sigmoid(6.975) = 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 an interface with a single method, making it inherently readable. The structure is logical and clear, with a well-organized Javadoc that explains the purpose and context of the interface. There is no nesting or complex control flow. The naming is clear ('SockJsFrameFormat', 'update', 'event'), and the intent is unambiguous. The code is concise, with no unnecessary length. Action granularity is appropriate: the single method signature fits on one line. The reading flow is natural, introducing the interface, its purpose, and its single responsibility. Minor deduction only because the Javadoc is lengthy for such a small interface, but it is informative and not excessive.
Run 2
The code is an interface with clear, consistent naming and a single, well-defined method. Javadoc documentation is concise, purposeful, and explains when and why formatting is used, including concrete use cases. There is no nesting, no unnecessary length, and one action per method signature line. Reading flow is logical: package, import-free (none needed), Javadoc, interface declaration, method. The only minor deduction is that the method name 'update' could be slightly more descriptive (e.g., 'formatFrame'), but overall readability is excellent.
Run 3
This is a very readable interface definition. The code structure is logical and straightforward, with a single clear method. Nesting is nonexistent since it is an interface. The Javadoc clearly explains the purpose and usage context, and the method name 'update' combined with the parameter type 'SockJsFrame' communicates intent well, though a method name like 'format' could be marginally clearer. The code is concise with no unnecessary elements. Action granularity and reading flow are excellent—the single line method declaration is natural and intentional. Minor deductions come from the slightly generic 'update' method name and a Javadoc link that is somewhat verbose, but they do not meaningfully reduce readability.
Run 1
Code Structure: A well-organized interface with one focused method and documentation directly above it. Nesting: No nested logic, making the code easy to scan. Clarity of intent: The Javadoc clearly explains transport-specific frame formatting, but the generic method name 'update' and parameter name 'event' are less descriptive than 'format' and 'frame'; method-level documentation could clarify the returned string. Code length: The implementation is minimal, although the long Javadoc link slightly reduces readability. Action granularity: The single method declaration occupies its own line. Reading flow: The conventional package-documentation-interface-method order is natural and coherent.
Run 2
Code Structure: A logically organized interface with a single, focused method. Nesting: No nested control flow or unnecessary structural complexity. Clarity of intent: The interface name and Javadoc clearly explain transport-specific frame formatting, though the generic method name 'update' and parameter name 'event' are less precise than 'format' and 'frame'. Code length: The implementation is minimal; the documentation is proportionate and useful, although the long Javadoc link is slightly cumbersome. Action granularity: The method declaration occupies its own line and expresses one operation. Reading flow: The conventional package, documentation, interface, and method order makes the code easy to scan.
Run 3
Code Structure: A logically organized interface with one method and supporting documentation. Nesting: No nested control flow or unnecessary structural complexity. Clarity of intent: The interface name and Javadoc clearly explain transport-specific frame formatting, although update is less descriptive than format, and event is less precise than frame. Code length: The implementation is minimal; the documentation is useful but includes a long, visually cumbersome link. Action granularity: The single method declaration occupies its own line, with no combined actions. Reading flow: The package, documentation, interface, and method follow a natural Java layout. Overall, highly readable with minor naming and documentation improvements possible.