Sample

int-70df69f7a826-SRC

Unmodified source class

Lines51

Scores

MethodScoreScale
Posnett10–1; higher is more readable
Scalabrino0.8990–1; higher is more readable
Dorn0.7280–1; higher is more readable
Mi0.3990–1; higher is more readable
LLOC1Logical lines; fewer is more readable
DeepSeek V4 Pro18.330–20; mean of three runs
GPT-6.1 Sol190–20; mean of three runs
BTTF0.7470–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.51+20.4
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.905−7.358

Intercept 8.87 + feature contributions = 9.288 (log-odds).
Score = sigmoid(9.288) = 1.

Score0.899

Feature contributions

FeatureValueContribution
(log-odds)
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.52−0.805
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.015+0.793
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.95.962+0.744
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.95.981−0.4
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.50.845+0.301
Indentation frequencyHow rapidly indentation changes from line to line.18−0.115

Intercept 0.07 + feature contributions = 0.986 (log-odds).
Score = sigmoid(0.986) = 0.728.

Score0.399
Score1
Run 1

This code is highly readable. It follows a clear and logical structure: package declaration, imports, Javadoc, interface declaration, a single constant, and a single method. Nesting is nonexistent, as the body is flat. The intent is unambiguous — the interface's purpose as an extended SqlValue for setting complex database types is well-documented. Code length is concise and appropriate for the interface's scope. Action granularity is clean, with one logical element per declaration. Reading flow is natural, guiding the reader from high-level documentation to specific method contracts. The only minor drawback is the slightly verbose Javadoc, but it provides valuable context for a framework-level API, which justifies its presence.

Run 2

The code is highly readable due to its logical structure and clear intent. It is a simple interface with one constant and one method, keeping nesting minimal and actions separated. The Javadoc is thorough, explaining the purpose, parameters, and context. Naming conventions are consistent with Spring Framework standards, and the use of annotations like @Nullable and @see improves clarity. Reading flow is natural, starting with package and imports, followed by documentation, then declarations. There is no unnecessary complexity or code duplication. The only minor drawback is the slightly long method signature wrapped across lines, but this is standard for Java interfaces with multiple parameters and documented exceptions.

Run 3

The code is highly readable due to its clear structure and organization. It starts with package declaration, followed by imports and a well-written Javadoc explaining the interface's purpose, usage, and context. The nesting is completely flat, containing only one interface and one method declaration. The intent is explicit: it defines a callback for setting complex database-specific types. The code is concise with no unnecessary length. Action granularity is minimal but appropriate for an interface—there are no multiple actions per line or complex logic. The reading flow is natural, moving from high-level documentation to specific method signature. Javadoc parameters and exceptions are clearly documented. Overall, the code follows idiomatic Java style, maintains excellent documentation practices, and avoids any complexity or ambiguity, making it easy to understand and maintain.

Run 1

Code Structure: Logically organized into imports, interface documentation, a constant, and a single callback method. Nesting: Minimal, with only the interface scope and no nested control flow. Clarity of intent: Descriptive names and thorough Javadoc clearly explain database-specific parameter setting, SQL types, nullability, and exception handling. Code length: The implementation is concise; documentation is somewhat verbose and repetitive but useful for a public API. Action granularity: Each declaration has a single responsibility, with no combined operations. Reading flow: Conventional Java ordering and consistent formatting make the code easy to follow. Minor drawbacks include the abbreviated parameter name 'ps', extra blank lines, and slightly redundant documentation.

Run 2

Code Structure: A logically organized interface with imports, descriptive documentation, a constant, and one callback method. Nesting: Flat, with no nested control flow. Clarity of intent: The interface name, method signature, nullability annotation, and Javadoc clearly explain its database-specific parameter-setting purpose; 'ps' is slightly abbreviated but documented. Code length: The executable declarations are minimal, though the Javadoc contains some repetitive wording. Action granularity: Each declaration serves a single purpose, with no combined operations. Reading flow: Natural progression from interface overview to constant and method contract; extra blank lines and the wrapped throws clause introduce only minor visual interruptions.

Run 3

Code Structure: Cleanly organized interface with imports, a constant, and one callback method. Nesting: Flat, with no nested control flow. Clarity of intent: Descriptive naming and detailed Javadoc clearly explain the interface's purpose, parameters, and exception behavior; nullability is explicit. Code length: The implementation is minimal, although documentation contains some repetitive wording. Action granularity: Each declaration serves a single purpose, and the wrapped method signature remains readable. Reading flow: Natural progression from interface overview to constant and method contract. Minor drawbacks are the abbreviated parameter name 'ps', redundant prose, and slightly excessive blank-line spacing.