Sample

int-0a96ae2ca415-I10

Remove about 40% of line-break groups while retaining structure

Matched original source

Lines45

Scores

MethodScoreScale
Posnett0.9990–1; higher is more readable
Scalabrino0.8630–1; higher is more readable
Dorn0.5970–1; higher is more readable
Mi0.1920–1; higher is more readable
LLOC1Logical lines; fewer is more readable
DeepSeek V4 Pro16.330–20; mean of three runs
GPT-6.1 Sol170–20; mean of three runs
BTTF0.7230–1; higher is more readable

Views

Source code

package org.springframework.jdbc.core; import java.sql.PreparedStatement; import java.sql.SQLException; import org.jspecify.annotations.Nullable; import org.springframework.jdbc.support.JdbcUtils; /** * Interface to be implemented for setting values for more complex database-specific * types not supported by the standard {@code setObject} method. This is * effectively an extended variant of {@link org.springframework.jdbc.support.SqlValue}. * * <p>Implementations perform the actual work of setting the actual values. They must * implement the callback method {@code setTypeValue} which can throw SQLExceptions * that will be caught and translated by the calling code. This callback method has * access to the underlying Connection via the given PreparedStatement object, if that * should be needed to create any database-specific objects. * * @author Thomas Risberg * @author Juergen Hoeller * @since 1.1 * @see java.sql.Types * @see java.sql.PreparedStatement#setObject * @see JdbcOperations#update(String, Object[], int[]) * @see org.springframework.jdbc.support.SqlValue */ public interface SqlTypeValue { /** * Constant that indicates an unknown (or unspecified) SQL type. * Passed into {@code setTypeValue} if the original operation method * does not specify an SQL type. * @see java.sql.Types * @see JdbcOperations#update(String, Object[]) */ int TYPE_UNKNOWN = JdbcUtils.TYPE_UNKNOWN; /** * Set the type value on the given PreparedStatement. * @param ps the PreparedStatement to work on * @param paramIndex the index of the parameter for which we need to set the value * @param sqlType the SQL type of the parameter we are setting * @param typeName the type name of the parameter (optional) * @throws SQLException if an SQLException is encountered while setting parameter values * @see java.sql.Types * @see java.sql.PreparedStatement#setObject */ void setTypeValue(PreparedStatement ps, int paramIndex, int sqlType, @Nullable String typeName) throws SQLException; }

Loading feature diagnosis…

Source regions

Feature contributions

Feature contributions

FeatureValueContribution
(log-odds)
Source linesThe number of non-empty source lines.45+18
Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones.382.574−12.625
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.896−7.344

Intercept 8.87 + feature contributions = 6.901 (log-odds).
Score = sigmoid(6.901) = 0.999.

Score0.863

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.116.935−1.288
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.116.957+1.083
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.015+0.793
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.45−0.557
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.1+0.398
Indentation frequencyHow rapidly indentation changes from line to line.12−0.322
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.44.763+0.216

Intercept 0.07 + feature contributions = 0.393 (log-odds).
Score = sigmoid(0.393) = 0.597.

Score0.192
Score1
Run 1

The code is generally well-structured and highly readable, typical of Spring Framework style. The interface has a clear purpose, documented thoroughly with Javadoc. The single method signature is clean and parameters are well-named. However, the readability is slightly reduced by the package and import statements being compressed onto a single line at the top, which disrupts the natural reading flow and deviates from standard formatting conventions. The nesting is flat, action granularity is appropriate, and the code is concise without being unnecessarily short. Overall, clarity of intent is strong despite the minor formatting inconsistency.

Run 2

The code is well-structured overall with clear Javadoc and logical method ordering. However, readability is slightly reduced by the package declaration, imports, and class Javadoc appearing on the same line, which disrupts the natural vertical reading flow. Nesting is flat, intent is clearly communicated, and the interface is concise without unnecessary code. Each line performs a single logical action, and the method signature is easy to understand. Javadoc comments are informative and appropriately detailed for a public API.

Run 3

The code is moderately readable. The interface declaration, javadoc, and method signature are clear and well-documented. However, the structure is damaged by poor formatting: imports are collapsed onto the same line as the package declaration, and javadoc blocks are merged with code lines. This breaks natural reading flow and violates the 'one action per line' principle. Nesting is flat, and intent is clear, but the lack of line breaks after imports and before javadoc increases visual clutter and reduces scannability.

Run 1

Code Structure: The interface is logically organized into imports, documentation, a constant, and a callback signature, but several declarations share lines with unrelated elements. Nesting: Minimal nesting makes the code easy to scan. Clarity of intent: Descriptive names, parameter documentation, and the nullable annotation clearly explain the contract. Code length: The implementation is concise; documentation is extensive but mostly useful, with some repetitive wording. Action granularity: Most declarations occupy separate lines, but the package and first import share a line, and documentation starts on the same lines as an import and the interface declaration. Reading flow: The progression is natural, though inconsistent spacing and attached comment openings interrupt visual flow.

Run 2

Code Structure: The interface is logically organized into imports, documentation, a constant, and a method declaration, though several boundaries are compressed onto shared lines. Nesting: Essentially flat, with no nested control flow. Clarity of intent: Descriptive names and detailed Javadoc clearly explain the database-specific callback and unknown-type constant. Code length: The implementation is minimal; documentation is useful but somewhat repetitive. Action granularity: Declarations generally occupy separate lines, but the package and first import share a line, and opening Javadoc markers share lines with an import and the interface declaration. Reading flow: The overall order is natural, but inconsistent spacing, extra blank lines, and compressed section boundaries interrupt an otherwise straightforward reading experience.

Run 3

Code Structure: The interface is logically organized into imports, documentation, a constant, and one method. Nesting: Flat, with no nested control flow. Clarity of intent: Descriptive names, parameter documentation, and references clearly explain the database-specific parameter-setting purpose. Code length: The implementation is minimal; documentation is useful but somewhat repetitive. Action granularity: Declarations generally occupy separate lines, but the package and first import share a line, and documentation starts on the same lines as an import and the interface declaration. Reading flow: The overall sequence is natural, although compressed declaration/comment boundaries and inconsistent blank-line spacing interrupt scanning.