Sample

int-ab75a09d0b6c-I07

Insert deterministic runtime-dead branches into callable bodies

Matched original source

Lines22

Scores

MethodScoreScale
Posnett0.9990–1; higher is more readable
Scalabrino0.6020–1; higher is more readable
Dorn0.2340–1; higher is more readable
Mi0.0120–1; higher is more readable
LLOC1Logical lines; fewer is more readable
DeepSeek V4 Pro18.670–20; mean of three runs
GPT-6.1 Sol190–20; mean of three runs
BTTF0.6370–1; higher is more readable

Views

Source code

package org.springframework.web.socket.sockjs.frame; /** * Applies a transport-specific format to the content of a SockJS frame resulting * in a content that can be written out. Primarily for use in HTTP server-side * transports that push data. * * <p>Formatting may vary from simply appending a new line character for XHR * polling and streaming transports, to a jsonp-style callback function, * surrounding script tags, and more. * * <p>For the various SockJS frame formats in use, see implementations of * {@link org.springframework.web.socket.sockjs.transport.handler.AbstractHttpSendingTransportHandler#getFrameFormat(org.springframework.http.server.ServerHttpRequest) AbstractHttpSendingTransportHandler.getFrameFormat} * * @author Rossen Stoyanchev * @since 4.0 */ public interface SockJsFrameFormat { String format(SockJsFrame frame); }

Loading feature diagnosis…

Source regions

Feature contributions

Feature contributions

FeatureValueContribution
(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.

Score0.602

Feature contributions

FeatureValueContribution
(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.

Score0.012
Score1
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

The code is highly readable. It consists of a single, well-defined interface with a clear purpose. The Javadoc is thorough, explaining the intent, usage, and context of the interface, which aids clarity. The structure is logical, with the package declaration, imports (none needed), and interface declaration properly organized. There is no nesting, and the code is concise with only one method signature. Action granularity and reading flow are natural, as the documentation flows logically from general description to specific examples. Minor deductions are due to the slightly long Javadoc that could be trimmed, but overall it is excellent.

Run 3

This code is a clean, minimal interface definition with excellent readability. The structure is logical: a single package declaration, a well-placed Javadoc comment describing the purpose and usage, and one concise abstract method. There is no nesting or complex logic, making it completely flat. The intent is unambiguous—the interface clearly defines a contract for formatting SockJS frames. Code length is minimal, with no boilerplate or redundancy. Action granularity is perfect; there is only one method signature, so no multiple actions per line. The reading flow is natural: the Javadoc explains the 'why' before the code, then the interface name and method signature clearly express the 'what'. Overall, it is an ideal example of clean, maintainable Java.

Run 1

Code Structure: A logically organized interface with one focused method. Nesting: No nested control flow or unnecessary structural complexity. Clarity of intent: Descriptive interface and method names, typed input, and Javadoc clearly explain transport-specific frame formatting; method-level documentation could clarify the return value. Code length: The implementation is minimal, though the documentation includes a long, visually cumbersome cross-reference. Action granularity: The sole method declaration occupies its own line. Reading flow: Conventional ordering from package to documentation to interface and method makes the code easy to follow.

Run 2

Code Structure: A single, focused interface with a logically placed method declaration. Nesting: No nested control flow or unnecessary structural complexity. Clarity of intent: The interface name, format method, parameter type, and Javadoc clearly communicate transport-specific SockJS frame formatting, although the method lacks explicit parameter and return documentation. Code length: The implementation is minimal; the explanatory Javadoc is useful but contains a lengthy cross-reference. Action granularity: One declaration per line, with no combined actions. Reading flow: Natural progression from package to documentation to interface and method, with whitespace improving scanability.

Run 3

Code Structure: A logically organized interface with one clearly scoped method. Nesting: No nested control flow or unnecessary structural complexity. Clarity of intent: The interface name, method signature, and Javadoc clearly explain transport-specific SockJS frame formatting, though the method lacks its own parameter and return documentation. Code length: The implementation is minimal; the explanatory documentation is useful, but its long cross-reference slightly reduces readability. Action granularity: The single method declaration occupies its own line, with no combined actions. Reading flow: The package, documentation, interface declaration, and method follow a natural Java layout.