Sample

int-caddab134025-I01

Remove line comments, block comments, and Javadoc

Matched original source

Lines60

Scores

MethodScoreScale
Posnett0.8750–1; higher is more readable
Scalabrino0.6480–1; higher is more readable
Dorn0.4020–1; higher is more readable
Mi0.4390–1; higher is more readable
LLOC5Logical lines; fewer is more readable
DeepSeek V4 Pro14.330–20; mean of three runs
GPT-6.1 Sol150–20; mean of three runs
BTTF0.640–1; higher is more readable

Views

Source code

package org.apache.kafka.connect.connector.policy; import org.apache.kafka.common.Configurable; import org.apache.kafka.common.annotation.InterfaceAudience; import org.apache.kafka.common.config.ConfigDef; import org.apache.kafka.common.config.ConfigValue; import org.apache.kafka.connect.components.ConnectPlugin; import java.util.List; @InterfaceAudience.Public public interface ConnectorClientConfigOverridePolicy extends Configurable, AutoCloseable, ConnectPlugin { List<ConfigValue> validate(ConnectorClientConfigRequest connectorClientConfigRequest); @Override default ConfigDef config() { return new ConfigDef(); } @Override default String version() { return "undefined"; } }

Loading feature diagnosis…

Source regions

Feature contributions

Feature contributions

FeatureValueContribution
(log-odds)
Source linesThe number of non-empty source lines.60+24
Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones.724.925−23.923
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.665−6.998

Intercept 8.87 + feature contributions = 1.95 (log-odds).
Score = sigmoid(1.95) = 0.875.

Score0.648

Feature contributions

FeatureValueContribution
(log-odds)
Indentation frequencyHow rapidly indentation changes from line to line.60+1.338
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.61−1.123
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.0−0.804
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.104.951−0.78
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.59.887+0.427
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.1+0.398
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.089+0.077

Intercept 0.07 + feature contributions = -0.397 (log-odds).
Score = sigmoid(-0.397) = 0.402.

Score0.439
Score5
Run 1

The code is highly readable. It has a clear structure: a single public interface with a logical purpose, followed by two simple default methods. Nesting is virtually nonexistent, which keeps the flow flat and easy to follow. The intent is unambiguous—the interface defines a contract for validating connector client configuration overrides. The code is concise and avoids unnecessary length; the large blank spaces are the only minor visual inefficiency. Action granularity is appropriate, with each method declaration on a single line. Reading flow is natural and straightforward. Minor deductions for excessive blank lines and slightly cluttered imports, but overall the code is very clean and understandable.

Run 2

The code is highly readable with a clear, focused interface definition. The structure is logical, starting with package and imports, followed by a well-documented public interface. Nesting is minimal—only default methods within the interface, which is standard. Intent is unambiguous: define a policy validation contract. The code is concise, avoiding unnecessary complexity. Action granularity is appropriate, with each method signature and return statement on its own line. Reading flow is natural, with a single abstract method clearly highlighted and default implementations (config, version) neatly separated. Minor deductions for excessive blank lines between method declarations and the interface-level Javadoc being sparse, but these do not impede readability. Overall, the code exemplifies clean, maintainable interface design.

Run 3

The code is an interface with a clear purpose, but it is marred by excessive blank lines and spacing. The logical structure is straightforward—imports, interface declaration, method signature, and default methods—but the excessive blank lines disrupt the reading flow and make the code appear longer than necessary. Nesting is minimal, and clarity of intent is decent, but the visual clutter undermines it. Action granularity is fine, but the multiple blank lines between methods and annotations are unnecessary. Formatting aside, the interface itself is concise and well-organized; proper formatting could raise the score significantly.

Run 1

Code Structure: The interface is logically organized, with imports followed by validation and default methods. Nesting: Minimal nesting makes it easy to scan. Clarity of intent: Descriptive interface and method names communicate the purpose, though the validation contract and the "undefined" version fallback lack explanation. Code length: Executable code is concise, but excessive blank lines unnecessarily inflate the snippet. Action granularity: Each declaration and return statement occupies its own line. Reading flow: Method order is natural, but large whitespace gaps interrupt continuity and make the code harder to read as a cohesive unit.

Run 2

Code Structure: The package, imports, and interface methods are logically organized. Nesting: Minimal nesting makes the code easy to follow. Clarity of intent: Descriptive interface and method names communicate the policy's purpose, although validation behavior and default values are undocumented. Code length: The functional code is concise, but excessive blank lines unnecessarily inflate its visual length. Action granularity: Each declaration and return statement occupies its own line. Reading flow: Method ordering is natural, but large gaps between elements disrupt scanning and make this small interface feel fragmented.

Run 3

Code Structure: The package, imports, and interface methods are logically organized. Nesting: Minimal nesting makes the code easy to follow. Clarity of intent: Descriptive interface and method names communicate the purpose, though validate lacks documentation and the "undefined" version provides little context. Code length: The implementation is concise, but excessive blank lines unnecessarily inflate its visual length. Action granularity: Each declaration or return statement occupies its own line. Reading flow: Method order is straightforward, but large whitespace gaps repeatedly interrupt scanning.