Sample

int-7c2799abb981-I01

Remove line comments, block comments, and Javadoc

Matched original source

Lines22

Scores

MethodScoreScale
Posnett0.9990–1; higher is more readable
Scalabrino0.6020–1; higher is more readable
Dorn0.9030–1; higher is more readable
Mi0.6750–1; higher is more readable
LLOC1Logical lines; fewer is more readable
DeepSeek V4 Pro17.670–20; mean of three runs
GPT-6.1 Sol180–20; mean of three runs
BTTF0.6860–1; higher is more readable

Views

Source code

package org.springframework.web.socket.sockjs.frame; 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.454−6.681
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.484 (log-odds).
Score = sigmoid(7.484) = 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.49.391+1.573
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.1+1.001
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.0−0.804
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.943−0.103
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.089+0.073
Indentation frequencyHow rapidly indentation changes from line to line.22+0.024

Intercept 0.07 + feature contributions = 2.231 (log-odds).
Score = sigmoid(2.231) = 0.903.

Score0.675
Score1
Run 1

This is a minimal interface definition that scores highly on readability. The code structure is clear with proper package declaration and a single-purpose interface. There is no nesting whatsoever. The intent is unambiguous - it defines a contract for formatting SockJS frames. The code length is appropriately concise for an interface definition. Action granularity and reading flow are both excellent as there is only one method signature to process. The minor deduction is due to excessive blank lines (13 empty lines between package and interface declaration), which slightly disrupts reading flow and adds unnecessary vertical space. Removing those blank lines would make this a perfect 20.

Run 2

The code is highly readable due to its simplicity and clear structure. It defines a single-purpose interface with one method, making intent unambiguous. The package declaration is appropriate, and there is no unnecessary complexity, nesting, or verbosity. While the many blank lines before the interface slightly reduce compactness, they do not harm readability. Overall, this is almost a model of clean, concise code.

Run 3

The code is a minimal Java interface with a single method, making it very readable. It has a flat structure, no nesting, and clear intent — formatting a SockJS frame. However, the excessive blank lines (13 empty lines between the package declaration and the interface) disrupt the natural reading flow and unnecessarily add to the visual length. Removing those blank lines would make it a near-perfect 20.

Run 1

Code Structure: The package declaration and single-method interface are logically organized. Nesting: Minimal nesting makes the code easy to scan. Clarity of intent: The interface and method names clearly suggest formatting a SockJS frame into a string, though the formatting contract is undocumented. Code length: The code is concise, but excessive blank lines add unnecessary visual length. Action granularity: Each declaration occupies its own line. Reading flow: The declaration sequence is natural, although the large gap after the package declaration interrupts the flow.

Run 2

Code Structure: A logically organized interface containing one method. Nesting: Flat, with no nested control flow. Clarity of intent: The interface and method names clearly indicate formatting a SockJS frame into a string, though the output format is unspecified. Code length: The implementation is minimal, but excessive blank lines add unnecessary visual length. Action granularity: Each declaration occupies its own line. Reading flow: The package-to-interface-to-method sequence is natural, but the large blank gap interrupts scanning.

Run 3

Code Structure: A logically organized interface containing one method, though excessive blank lines separate the package and declaration. Nesting: Minimal, with no nested logic. Clarity of intent: Interface and method names clearly indicate formatting a SockJS frame into a string, although the output format is unspecified. Code length: The implementation is concise, but unnecessary whitespace inflates its visual length. Action granularity: Each declaration occupies its own line. Reading flow: Straightforward package-to-interface-to-method progression, interrupted by excessive vertical spacing.