Sample

int-f152c4d9936f-I04

Replace method, parameter, and local names with deterministic ProGuard-style short identifiers

Matched original source

Lines61

Scores

MethodScoreScale
Posnett00–1; higher is more readable
Scalabrino0.8660–1; higher is more readable
Dorn0.5230–1; higher is more readable
Mi0.2250–1; higher is more readable
LLOC6Logical lines; fewer is more readable
DeepSeek V4 Pro150–20; mean of three runs
GPT-6.1 Sol15.670–20; mean of three runs
BTTF0.7970–1; higher is more readable

Views

Source code

package org.springframework.http.converter.cbor; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.dataformat.cbor.CBORFactory; import org.springframework.http.MediaType; import org.springframework.http.converter.json.AbstractJackson2HttpMessageConverter; import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder; import org.springframework.util.Assert; /** * Implementation of {@link org.springframework.http.converter.HttpMessageConverter * HttpMessageConverter} that can read and write the <a href="https://cbor.io/">CBOR</a> * data format using <a href="https://github.com/FasterXML/jackson-dataformats-binary/tree/master/cbor"> * the dedicated Jackson 2.x extension</a>. * * <p>By default, this converter supports the {@link MediaType#APPLICATION_CBOR_VALUE} * media type. This can be overridden by setting the {@link #setSupportedMediaTypes * supportedMediaTypes} property. * * <p>The default constructor uses the default configuration provided by * {@link Jackson2ObjectMapperBuilder}. * * @author Sebastien Deleuze * @since 5.0 * @deprecated since 7.0 in favor of {@link JacksonCborHttpMessageConverter} */ @Deprecated(since = "7.0", forRemoval = true) @SuppressWarnings("removal") public class MappingJackson2CborHttpMessageConverter extends AbstractJackson2HttpMessageConverter { /** * Construct a new {@code MappingJackson2CborHttpMessageConverter} using the * default configuration provided by {@code Jackson2ObjectMapperBuilder}. */ public MappingJackson2CborHttpMessageConverter() { this(Jackson2ObjectMapperBuilder.cbor().build()); } /** * Construct a new {@code MappingJackson2CborHttpMessageConverter} with a * custom {@link ObjectMapper} (must be configured with a {@code CBORFactory} * instance). * <p>You can use {@link Jackson2ObjectMapperBuilder} to build it easily. * @see Jackson2ObjectMapperBuilder#cbor() */ public MappingJackson2CborHttpMessageConverter(ObjectMapper a) { super(a, MediaType.APPLICATION_CBOR); Assert.isInstanceOf(CBORFactory.class, a.getFactory(), "CBORFactory required"); } /** * {@inheritDoc} * <p>The {@code ObjectMapper} must be configured with a {@code CBORFactory} instance. */ @Override public void a(ObjectMapper b) { Assert.isInstanceOf(CBORFactory.class, b.getFactory(), "CBORFactory required"); super.setObjectMapper(b); } }

Loading feature diagnosis…

Source regions

Feature contributions

Feature contributions

FeatureValueContribution
(log-odds)
Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones.1060.744−35.005
Source linesThe number of non-empty source lines.61+24.4
Byte entropyHow varied the bytes in the source text are. Repeated bytes give a lower value; a more even mixture gives a higher value.5.177−7.766

Intercept 8.87 + feature contributions = -9.501 (log-odds).
Score = sigmoid(-9.501) = 0.

Score0.866

Feature contributions

FeatureValueContribution
(log-odds)
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.62−1.159
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.103.968+0.873
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−0.74
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.041+0.539
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.60.895+0.441
Indentation frequencyHow rapidly indentation changes from line to line.33+0.404
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.33−0.336

Intercept 0.07 + feature contributions = 0.092 (log-odds).
Score = sigmoid(0.092) = 0.523.

Score0.225
Score6
Run 1

The code is generally well-structured with clear class-level documentation and logical constructor chaining. Nesting is minimal, and action granularity is acceptable—most lines perform one clear operation. However, readability is hurt by poor method/parameter naming: 'a' and 'b' obscure intent in the ObjectMapper constructor and setter override; names like 'objectMapper' would clarify purpose. The overriding method 'a(ObjectMapper b)' lacks clarity, despite Javadoc trying to explain it. Imports are not strictly ordered alphabetically (objectmapper vs cbor factory), though minor. Overall the class is concise and follows Spring conventions, but ambiguous naming prevents a higher score.

Run 2

The code is well-structured with clear package organization, meaningful imports, and comprehensive Javadoc documentation. The class has a single responsibility and follows Spring Framework conventions. Nesting is minimal with only one level in method bodies. Intent is clearly communicated through descriptive naming and documentation, including deprecation notices. Code length is concise for what it accomplishes, avoiding unnecessary verbosity. Each method performs one logical action per line. Reading flow is natural with constructors arranged logically and the override method following parent class conventions. Minor deductions: the parameter names 'a' and 'b' are not descriptive and could be more meaningful, slightly reducing clarity. Additionally, the override method name 'a' appears to be a placeholder or obfuscated name that should reflect its actual purpose for better readability.

Run 3

The code is largely readable due to clear Javadoc comments, a simple class structure, and straightforward constructors. However, it is significantly degraded by poor naming conventions: parameter names like 'a' and 'b', and method name 'a' (likely meant to be 'setObjectMapper') introduce ambiguity and harm clarity of intent. The code is mostly flat with minimal nesting, one action per line, and a logical structure, but the obscure naming negatively affects readability. The class also has a deprecated annotation with suppression, which adds minor clutter. Overall, the structure and comments are good, but variable and method names must be descriptive to improve readability.

Run 1

Code Structure: The class is logically organized into constructors and a mapper-setting method, with consistent formatting. Nesting: There is no nested control flow, making the implementation easy to scan. Clarity of intent: Class names, documentation, and explicit CBORFactory checks explain the converter's purpose, but the method name 'a' and parameter names 'a' and 'b' obscure intent. The @Override annotation on 'a' also appears inconsistent with the superclass setter it delegates to, creating confusion. Code length: The implementation is concise; documentation is substantial but useful rather than unnecessary. Action granularity: Each statement performs one clear operation, with only straightforward builder chaining. Reading flow: Construction, validation, and configuration follow a natural sequence, although cryptic identifiers and minor spacing inconsistencies interrupt readability.

Run 2

Code Structure: Well organized into constructors and a mapper-setting method, with consistent documentation. Nesting: Flat method bodies make execution easy to follow. Clarity of intent: Class names, assertions, and Javadoc clearly explain CBOR conversion, but parameters named 'a' and 'b' and a method named 'a' obscure meaning. The latter also conflicts with the apparent intent to override setObjectMapper, making the @Override annotation confusing. Code length: Implementation is concise; documentation is substantial but useful. Action granularity: Each statement performs a distinct action, with a straightforward builder chain. Reading flow: Imports, class documentation, constructors, and the final method follow a natural sequence, though weak identifiers and minor whitespace inconsistencies interrupt readability.

Run 3

Code Structure: Clearly organized into imports, class documentation, constructors, and an override, with consistent validation. Nesting: Flat methods with no conditional or loop nesting. Clarity of intent: Documentation and explicit CBORFactory checks explain the converter's purpose, but names a and b obscure the mapper parameters, and method a hides its setter role and makes the override questionable. Code length: Implementation is concise; documentation is somewhat verbose but useful. Action granularity: Each statement performs one primary action, with straightforward constructor delegation. Reading flow: The progression from default construction to custom configuration is natural, though cryptic naming, missing spacing after the package declaration, and an extra blank line slightly disrupt readability.