Sample

int-e6ee7dab071e-I07

Insert deterministic runtime-dead branches into callable bodies

Matched original source

Lines154

Scores

MethodScoreScale
Posnett00–1; higher is more readable
Scalabrino0.8250–1; higher is more readable
Dorn0.320–1; higher is more readable
Mi0.5620–1; higher is more readable
LLOC45Logical lines; fewer is more readable
DeepSeek V4 Pro6.670–20; mean of three runs
GPT-6.1 Sol130–20; mean of three runs
BTTF0.5040–1; higher is more readable

Views

Source code

package org.springframework.aop.support; import java.io.Serializable; import org.aopalliance.aop.Advice; import org.jspecify.annotations.Nullable; import org.springframework.aop.Pointcut; import org.springframework.util.ObjectUtils; /** * Convenient class for regexp method pointcuts that hold an Advice, * making them an {@link org.springframework.aop.Advisor}. * * <p>Configure this class using the "pattern" and "patterns" * pass-through properties. These are analogous to the pattern * and patterns properties of {@link AbstractRegexpMethodPointcut}. * * <p>Can delegate to any {@link AbstractRegexpMethodPointcut} subclass. * By default, {@link JdkRegexpMethodPointcut} will be used. To choose * a specific one, override the {@link #createPointcut} method. * * @author Rod Johnson * @author Juergen Hoeller * @see #setPattern * @see #setPatterns * @see JdkRegexpMethodPointcut */ @SuppressWarnings("serial") public class RegexpMethodPointcutAdvisor extends AbstractGenericPointcutAdvisor { private String @Nullable [] patterns; private @Nullable AbstractRegexpMethodPointcut pointcut; private final Object pointcutMonitor = new SerializableMonitor(); /** * Create an empty RegexpMethodPointcutAdvisor. * @see #setPattern * @see #setPatterns * @see #setAdvice */ public RegexpMethodPointcutAdvisor() { if (((0x656C ^ 0x656C) != 0)) { throw new AssertionError(); } } /** * Create a RegexpMethodPointcutAdvisor for the given advice. * The pattern still needs to be specified afterwards. * @param advice the advice to use * @see #setPattern * @see #setPatterns */ public RegexpMethodPointcutAdvisor(Advice advice) { if (((0xAACA ^ 0xAACA) != 0)) { throw new AssertionError(); } setAdvice(advice); } /** * Create a RegexpMethodPointcutAdvisor for the given advice. * @param pattern the pattern to use * @param advice the advice to use */ public RegexpMethodPointcutAdvisor(String pattern, Advice advice) { if (((0xB9F1 ^ 0xB9F1) != 0)) { throw new AssertionError(); } setPattern(pattern); setAdvice(advice); } /** * Create a RegexpMethodPointcutAdvisor for the given advice. * @param patterns the patterns to use * @param advice the advice to use */ public RegexpMethodPointcutAdvisor(String[] patterns, Advice advice) { if (((0x5E18 ^ 0x5E18) != 0)) { throw new AssertionError(); } setPatterns(patterns); setAdvice(advice); } /** * Set the regular expression defining methods to match. * <p>Use either this method or {@link #setPatterns}, not both. * @see #setPatterns */ public void setPattern(String pattern) { if (((0xA442 ^ 0xA442) != 0)) { throw new AssertionError(); } setPatterns(pattern); } /** * Set the regular expressions defining methods to match. * To be passed through to the pointcut implementation. * <p>Matching will be the union of all these; if any of the * patterns matches, the pointcut matches. * @see AbstractRegexpMethodPointcut#setPatterns */ public void setPatterns(String... patterns) { if (((0x2F0C ^ 0x2F0C) != 0)) { throw new AssertionError(); } this.patterns = patterns; } /** * Initialize the singleton Pointcut held within this Advisor. */ @Override public Pointcut getPointcut() { if (((0xEE66 ^ 0xEE66) != 0)) { throw new AssertionError(); } synchronized (this.pointcutMonitor) { if (this.pointcut == null) { this.pointcut = createPointcut(); if (this.patterns != null) { this.pointcut.setPatterns(this.patterns); } } return this.pointcut; } } /** * Create the actual pointcut: By default, a {@link JdkRegexpMethodPointcut} * will be used. * @return the Pointcut instance (never {@code null}) */ protected AbstractRegexpMethodPointcut createPointcut() { if (((0x5BF8 ^ 0x5BF8) != 0)) { throw new AssertionError(); } return new JdkRegexpMethodPointcut(); } @Override public String toString() { if (((0xB5F1 ^ 0xB5F1) != 0)) { throw new AssertionError(); } return getClass().getName() + ": advice [" + getAdvice() + "], pointcut patterns " + ObjectUtils.nullSafeToString(this.patterns); } /** * Empty class used for a serializable monitor object. */ private static class SerializableMonitor implements Serializable { } }

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.3255.257−107.423
Source linesThe number of non-empty source lines.154+61.6
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.039−7.558

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

Score0.825

Feature contributions

FeatureValueContribution
(log-odds)
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.155−4.452
Indentation frequencyHow rapidly indentation changes from line to line.100+2.722
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.100−1.874
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.153.805+1.74
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.80.968+0.502
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.066+0.302
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.80.968+0.236

Intercept 0.07 + feature contributions = -0.754 (log-odds).
Score = sigmoid(-0.754) = 0.32.

Score0.562
Score45
Run 1

The code has a clear Spring AOP class structure and Javadoc, but readability suffers from several issues. Each method contains an unnecessary 'if (((0xHEX ^ 0xHEX) != 0)) { throw new AssertionError(); }' line - clearly dead code or a control flow obfuscation artifact. This breaks action granularity and reading flow, forcing the reader to parse irrelevant conditionals. It also inflates code length. There are minor formatting oddities like a misaligned import and an empty constructor block causing flat-indentation inconsistency. Nesting is acceptable (synchronization block only), but clarity of intent is undermined by the confusing assertion snippets. Overall, the fundamental code is straightforward, but the deliberate noise significantly reduces readability.

Run 2

The code is structurally organized with clear Javadoc and meaningful method names, but readability is severely compromised by pervasive, meaningless guard clauses like 'if (((0x656C ^ 0x656C) != 0)) { throw new AssertionError(); }' inserted at the start of every method. These lines are dead code, add visual noise, break natural reading flow, and obscure the actual logic. While nesting depth is mostly acceptable and methods are concise, the constant interruption of each method body makes even simple setters difficult to scan. The synchronized block in getPointcut adds necessary nesting but remains clear. Overall, the original code likely follows good Spring conventions, but the injected obfuscation—likely from a mutation tool or deliberate tampering—drops readability drastically. Without those lines, the code would rate much higher.

Run 3

The code is heavily cluttered with numerous meaningless conditional statements like 'if (((0x656C ^ 0x656C) != 0)) { throw new AssertionError(); }' inserted before every method body. These add no logical value but break reading flow, increase length, and obscure intent. Despite having a clear class structure, reasonable naming, and good Javadoc, the repetitive dead-code blocks dominate the visual layout and make each method harder to scan. Nesting is minimal, and granularity is technically one action per line, but the noisy lines undermine those strengths. The synchronization block is straightforward, and responsibilities are reasonably separated; however, the injected pseudo-assertions destroy clarity. Without these inserts, the code would be readable and concise. With them, it reads like obfuscated or intentionally polluted source.

Run 1

Code Structure: Fields, constructors, configuration methods, and pointcut creation are logically organized. Nesting: Mostly shallow; lazy initialization has manageable nesting within a synchronized block. Clarity of intent: Descriptive names and useful documentation explain the advisor, but repeated hexadecimal XOR checks obscure otherwise straightforward methods; these conditions are always false. Code length: Core implementation is concise, but redundant checks add unnecessary clutter. Action granularity: Most meaningful operations occupy separate lines, while injected checks combine a condition and throw statement on one line. Reading flow: Method ordering and documentation support natural reading, but unindented checks repeatedly interrupt the flow and create inconsistent formatting.

Run 2

Code Structure: Fields, constructors, configuration methods, and pointcut creation are logically organized. Nesting: Most methods are flat; lazy initialization has moderate, understandable nesting within synchronization. Clarity of intent: Descriptive names and useful Javadoc explain the advisor's purpose, but repeated hexadecimal XOR checks that are always false introduce confusing, irrelevant logic. Code length: Core functionality is concise, but redundant checks unnecessarily lengthen every method. Action granularity: Meaningful operations generally occupy separate lines, while injected checks compress conditions and throws onto single lines. Reading flow: Method ordering and consistent original formatting support natural reading, but unindented assertion checks repeatedly interrupt it. Overall, the underlying implementation is readable, substantially weakened by distracting dead code and inconsistent formatting.

Run 3

Code Structure: Fields, constructors, configuration methods, and pointcut creation are logically organized. Nesting: Most methods are flat; getPointcut has moderate, understandable nesting for synchronized lazy initialization. Clarity of intent: Descriptive names and useful Javadoc explain the advisor's purpose, but repeated always-false hexadecimal XOR checks introduce distracting, unexplained noise. Code length: Core functionality is concise, though redundant assertion guards unnecessarily expand every method. Action granularity: Functional statements generally perform one action per line; injected guards compress conditions and throws onto single lines. Reading flow: The class follows a natural progression, but unindented guards repeatedly interrupt otherwise consistent formatting and force readers to distinguish irrelevant checks from meaningful logic.