Sample

int-351b5b3a9847-I04

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

Matched original source

Lines185

Scores

MethodScoreScale
Posnett00–1; higher is more readable
Scalabrino0.8570–1; higher is more readable
Dorn0.8130–1; higher is more readable
Mi0.4290–1; higher is more readable
LLOC53Logical lines; fewer is more readable
DeepSeek V4 Pro4.670–20; mean of three runs
GPT-6.1 Sol120–20; mean of three runs
BTTF0.5170–1; higher is more readable

Views

Source code

package org.springframework.jms.config; import java.util.ArrayList; import java.util.List; import org.jspecify.annotations.Nullable; import org.springframework.beans.factory.BeanFactory; import org.springframework.beans.factory.BeanFactoryAware; import org.springframework.beans.factory.InitializingBean; import org.springframework.messaging.handler.annotation.support.DefaultMessageHandlerMethodFactory; import org.springframework.messaging.handler.annotation.support.MessageHandlerMethodFactory; import org.springframework.util.Assert; /** * Helper bean for registering {@link JmsListenerEndpoint} with a {@link JmsListenerEndpointRegistry}. * * @author Stephane Nicoll * @author Juergen Hoeller * @since 4.1 * @see org.springframework.jms.annotation.JmsListenerConfigurer */ public class JmsListenerEndpointRegistrar implements BeanFactoryAware, InitializingBean { private @Nullable JmsListenerEndpointRegistry endpointRegistry; private @Nullable MessageHandlerMethodFactory messageHandlerMethodFactory; private @Nullable JmsListenerContainerFactory<?> containerFactory; private @Nullable String containerFactoryBeanName; private @Nullable BeanFactory beanFactory; private final List<JmsListenerEndpointDescriptor> endpointDescriptors = new ArrayList<>(); private boolean startImmediately; /** * Set the {@link JmsListenerEndpointRegistry} instance to use. */ public void a(@Nullable JmsListenerEndpointRegistry a) { this.endpointRegistry = a; } /** * Return the {@link JmsListenerEndpointRegistry} instance for this * registrar, may be {@code null}. */ public @Nullable JmsListenerEndpointRegistry b() { return this.endpointRegistry; } /** * Set the {@link MessageHandlerMethodFactory} to use to configure the message * listener responsible to serve an endpoint detected by this processor. * <p>By default, {@link DefaultMessageHandlerMethodFactory} is used and it * can be configured further to support additional method arguments * or to customize conversion and validation support. See * {@link DefaultMessageHandlerMethodFactory} javadoc for more details. */ public void c(@Nullable MessageHandlerMethodFactory b) { this.messageHandlerMethodFactory = b; } /** * Return the custom {@link MessageHandlerMethodFactory} to use, if any. */ public @Nullable MessageHandlerMethodFactory d() { return this.messageHandlerMethodFactory; } /** * Set the {@link JmsListenerContainerFactory} to use in case a {@link JmsListenerEndpoint} * is registered with a {@code null} container factory. * <p>Alternatively, the bean name of the {@link JmsListenerContainerFactory} to use * can be specified for a lazy lookup, see {@link #setContainerFactoryBeanName}. */ public void e(JmsListenerContainerFactory<?> c) { this.containerFactory = c; } /** * Set the bean name of the {@link JmsListenerContainerFactory} to use in case * a {@link JmsListenerEndpoint} is registered with a {@code null} container factory. * Alternatively, the container factory instance can be registered directly: * see {@link #setContainerFactory(JmsListenerContainerFactory)}. * @see #setBeanFactory */ public void f(String d) { this.containerFactoryBeanName = d; } /** * A {@link BeanFactory} only needs to be available in conjunction with * {@link #setContainerFactoryBeanName}. */ @Override public void g(BeanFactory e) { this.beanFactory = e; } @Override public void h() { i(); } protected void i() { Assert.state(this.endpointRegistry != null, "No JmsListenerEndpointRegistry set"); for (JmsListenerEndpointDescriptor f : this.endpointDescriptors) { this.endpointRegistry.registerListenerContainer( f.endpoint, j(f)); } this.startImmediately = true; // trigger immediate startup } private JmsListenerContainerFactory<?> j(JmsListenerEndpointDescriptor g) { if (g.containerFactory != null) { return g.containerFactory; } else if (this.containerFactory != null) { return this.containerFactory; } else if (this.containerFactoryBeanName != null) { Assert.state(this.beanFactory != null, "BeanFactory must be set to obtain container factory by bean name"); // Consider changing this if live change of the factory is required... this.containerFactory = this.beanFactory.getBean( this.containerFactoryBeanName, JmsListenerContainerFactory.class); return this.containerFactory; } else { throw new IllegalStateException("Could not resolve the " + JmsListenerContainerFactory.class.getSimpleName() + " to use for [" + g.endpoint + "] no factory was given and no default is set."); } } /** * Register a new {@link JmsListenerEndpoint} alongside the * {@link JmsListenerContainerFactory} to use to create the underlying container. * <p>The {@code factory} may be {@code null} if the default factory should be * used for the supplied endpoint. */ public void k(JmsListenerEndpoint h, @Nullable JmsListenerContainerFactory<?> i) { Assert.notNull(h, "Endpoint must not be null"); Assert.hasText(h.getId(), "Endpoint id must be set"); // Factory may be null, we defer the resolution right before actually creating the container JmsListenerEndpointDescriptor j = new JmsListenerEndpointDescriptor(h, i); if (this.startImmediately) { // register and start immediately Assert.state(this.endpointRegistry != null, "No JmsListenerEndpointRegistry set"); this.endpointRegistry.registerListenerContainer(j.endpoint, j(j), true); } else { this.endpointDescriptors.add(j); } } /** * Register a new {@link JmsListenerEndpoint} using the default * {@link JmsListenerContainerFactory} to create the underlying container. * @see #setContainerFactory(JmsListenerContainerFactory) * @see #registerEndpoint(JmsListenerEndpoint, JmsListenerContainerFactory) */ public void k(JmsListenerEndpoint k) { k(k, null); } private static class JmsListenerEndpointDescriptor { public final JmsListenerEndpoint endpoint; public final @Nullable JmsListenerContainerFactory<?> containerFactory; public JmsListenerEndpointDescriptor(JmsListenerEndpoint l, @Nullable JmsListenerContainerFactory<?> m) { this.endpoint = l; this.containerFactory = m; } } }

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.4074.825−134.469
Source linesThe number of non-empty source lines.185+74
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.933−7.4

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

Score0.857

Feature contributions

FeatureValueContribution
(log-odds)
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.186−5.549
Indentation frequencyHow rapidly indentation changes from line to line.136+3.967
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.184.865+2.174
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.109.984−0.993
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.109.957+0.97
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.052+0.437
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.1+0.398

Intercept 0.07 + feature contributions = 1.473 (log-odds).
Score = sigmoid(1.473) = 0.813.

Score0.429
Score53
Run 1

The code is significantly unreadable due to obfuscated method names (a-k), unclear parameter names, and misleading documentation. The structure resembles tangled code because all methods are renamed without semantic meaning, making intent ambiguous. Nesting is moderate but not problematic; however, action granularity and reading flow are severely impacted by generic names like 'j' and 'k' that conflict with local variables. Clarity of intent is lost—readers cannot infer what each method does without deep analysis. Although the code length is not excessive, the pervasive use of single letters and overloaded methods with identical names but different parameters creates confusion. Overall, this appears deliberately obfuscated and would be extremely difficult to maintain or review.

Run 2

The code structure is severely compromised by meaningless method and parameter names (e.g., a(), b(), c(), j(), k()). This destroys clarity of intent and reading flow, as readers cannot infer purpose from names. Nesting is moderate but the deeply chained if-else in method j() adds complexity. Action granularity is mostly acceptable, but the Javadoc references non-existent method names like setContainerFactoryBeanName, worsening ambiguity. Code length is reasonable, but readability collapses due to cryptic naming and inconsistent documentation. The class has a clear original structure, but the obfuscated identifiers make it practically unreadable.

Run 3

The code has been deliberately obfuscated, making it nearly unreadable. Method and parameter names like 'a', 'b', 'c', and 'j' obscure their purpose, forcing readers to rely on comments or guess intent. The original structure appears logical (registrar pattern), but renaming breaks clarity of intent drastically. Nesting is moderate, but the long conditional block in method 'j' reduces readability. Action granularity is acceptable, but the reading flow is unnatural due to meaningless names. While Javadocs remain, they do not compensate for the loss of self-documenting code. The code performs multiple actions per line in some places, especially the conditional returns and combined calls. Overall, the structure is intact but the naming destroys readability.

Run 1

1. Code Structure: Logically organized into configuration accessors, initialization, factory resolution, registration, and a small descriptor class. 2. Nesting: Shallow loops and conditional branches are easy to follow. 3. Clarity of intent: Descriptive fields and extensive documentation help, but single-letter method and parameter names severely obscure operations; expressions such as j(j) and k(k, null) are especially confusing. Documentation references original method names that no longer match the code. 4. Code length: Implementation is reasonably concise, although accessor documentation adds substantial length. 5. Action granularity: Statements generally perform one action per line, with appropriate wrapping for longer calls. 6. Reading flow: Consistent formatting and logical grouping support navigation, but cryptic names force readers to repeatedly inspect definitions and comments to understand calls.

Run 2

Code Structure: Logically organized into configuration methods, initialization, factory resolution, endpoint registration, and a small descriptor class. Nesting: Shallow loops and conditional branches keep control flow manageable. Clarity of intent: Descriptive fields, types, and documentation help, but single-letter methods and parameters severely obscure purpose; expressions such as j(j) and k(k, null) are particularly confusing. Documentation references also retain method names absent from the code. Code length: Implementation is reasonably concise, though extensive documentation and repetitive accessors increase reading length. Action granularity: Generally one action per statement, with clear separation of validation, object creation, and registration. Reading flow: Method ordering and consistent formatting support navigation, but opaque names force readers to repeatedly infer behavior from implementations and comments.

Run 3

Code Structure: Fields, configuration methods, registration logic, and the descriptor class are logically organized. Nesting: Control flow is shallow, with straightforward loops and conditional branches. Clarity of intent: Descriptive fields and extensive documentation help, but single-letter method and parameter names severely obscure behavior; j(j) and k(k, null) are especially confusing. Documentation references also name methods absent from the code. Code length: Implementation is reasonably concise, though accessor documentation and whitespace add bulk. Action granularity: Statements generally perform one action each, with clear separation of validation, construction, and registration. Reading flow: Configuration followed by initialization and registration is natural, but opaque names force readers to repeatedly inspect implementations to understand calls.