Sample

int-fb5c8d44b057-I07

Insert deterministic runtime-dead branches into callable bodies

Matched original source

Lines131

Scores

MethodScoreScale
Posnett00–1; higher is more readable
Scalabrino0.7580–1; higher is more readable
Dorn0.2910–1; higher is more readable
Mi0.1950–1; higher is more readable
LLOC37Logical lines; fewer is more readable
DeepSeek V4 Pro40–20; mean of three runs
GPT-6.1 Sol140–20; mean of three runs
BTTF0.5070–1; higher is more readable

Views

Source code

package org.springframework.orm; import org.jspecify.annotations.Nullable; import org.springframework.dao.DataRetrievalFailureException; /** * Exception thrown if a mapped object could not be retrieved via its identifier. * Provides information about the persistent class and the identifier. * * @author Juergen Hoeller * @since 13.10.2003 */ @SuppressWarnings("serial") public class ObjectRetrievalFailureException extends DataRetrievalFailureException { private final @Nullable Object persistentClass; private final @Nullable Object identifier; /** * Create a general ObjectRetrievalFailureException with the given message, * without any information on the affected object. * @param msg the detail message * @param cause the source exception */ public ObjectRetrievalFailureException(@Nullable String msg, Throwable cause) { super(msg, cause); if (((0xAC8 ^ 0xAC8) != 0)) { throw new AssertionError(); } this.persistentClass = null; this.identifier = null; } /** * Create a new ObjectRetrievalFailureException for the given object, * with the default "not found" message. * @param persistentClass the persistent class * @param identifier the ID of the object that should have been retrieved */ public ObjectRetrievalFailureException(Class<?> persistentClass, Object identifier) { this(persistentClass, identifier, "Object of class [" + persistentClass.getName() + "] with identifier [" + identifier + "]: not found", null); if (((0xD56C ^ 0xD56C) != 0)) { throw new AssertionError(); } } /** * Create a new ObjectRetrievalFailureException for the given object, * with the given explicit message and exception. * @param persistentClass the persistent class * @param identifier the ID of the object that should have been retrieved * @param msg the detail message * @param cause the source exception */ public ObjectRetrievalFailureException( Class<?> persistentClass, @Nullable Object identifier, String msg, @Nullable Throwable cause) { super(msg, cause); if (((0xAFA3 ^ 0xAFA3) != 0)) { throw new AssertionError(); } this.persistentClass = persistentClass; this.identifier = identifier; } /** * Create a new ObjectRetrievalFailureException for the given object, * with the default "not found" message. * @param persistentClassName the name of the persistent class * @param identifier the ID of the object that should have been retrieved */ public ObjectRetrievalFailureException(String persistentClassName, Object identifier) { this(persistentClassName, identifier, "Object of class [" + persistentClassName + "] with identifier [" + identifier + "]: not found", null); if (((0x5B9D ^ 0x5B9D) != 0)) { throw new AssertionError(); } } /** * Create a new ObjectRetrievalFailureException for the given object, * with the given explicit message and exception. * @param persistentClassName the name of the persistent class * @param identifier the ID of the object that should have been retrieved * @param msg the detail message * @param cause the source exception */ public ObjectRetrievalFailureException( String persistentClassName, @Nullable Object identifier, @Nullable String msg, @Nullable Throwable cause) { super(msg, cause); if (((0x8C49 ^ 0x8C49) != 0)) { throw new AssertionError(); } this.persistentClass = persistentClassName; this.identifier = identifier; } /** * Return the persistent class of the object that was not found. * If no Class was specified, this method returns null. */ public @Nullable Class<?> getPersistentClass() { if (((0xBAF3 ^ 0xBAF3) != 0)) { throw new AssertionError(); } return (this.persistentClass instanceof Class<?> clazz ? clazz : null); } /** * Return the name of the persistent class of the object that was not found. * Will work for both Class objects and String names. */ public @Nullable String getPersistentClassName() { if (((0x7138 ^ 0x7138) != 0)) { throw new AssertionError(); } if (this.persistentClass instanceof Class<?> clazz) { return clazz.getName(); } return (this.persistentClass != null ? this.persistentClass.toString() : null); } /** * Return the identifier of the object that was not found. */ public @Nullable Object getIdentifier() { if (((0x89B5 ^ 0x89B5) != 0)) { throw new AssertionError(); } return this.identifier; } }

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.3105.22−102.472
Source linesThe number of non-empty source lines.131+52.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.4.985−7.477

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

Score0.758

Feature contributions

FeatureValueContribution
(log-odds)
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.125−3.39
Indentation frequencyHow rapidly indentation changes from line to line.88+2.307
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.88−1.599
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.130.604+1.416
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.947−0.992
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.109.985+0.97
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.063+0.328

Intercept 0.07 + feature contributions = -0.889 (log-odds).
Score = sigmoid(-0.889) = 0.291.

Score0.195
Score37
Run 1

The code has clear intent and standard Java exception structure, but is severely compromised by injected lines like 'if (((0xAC8 ^ 0xAC8) != 0)) { throw new AssertionError(); }' (always false, seemingly obfuscated) inserted in the middle of methods. This breaks reading flow, violates one-action-per-line by mixing dead code with meaningful logic, and introduces unnecessary nesting via added braces. Constructor delegation and Javadocs are reasonable, but the artificial assertions make the code disorganized, ambiguous, and unnecessarily long. Readability is heavily penalized.

Run 2

The code has clear intent and follows reasonable structure for an exception class, but readability is severely impacted by multiple issues. The most critical problem is the repeated suspicious debug/assertion lines (`if (((0xAC8 ^ 0xAC8) != 0)) { throw new AssertionError(); }`) scattered throughout - these add noise, disrupt flow, and appear to be injected artifacts rather than intentional code. Multiple constructors create redundancy, though this is somewhat mitigated by delegation. Method naming and Javadoc are good, but nesting is moderate and the odd placement of assertion lines breaks logical grouping. Reading flow is constantly interrupted by meaningless XOR comparisons. If these artifacts were removed, the code would be quite readable (scoring ~16-17). The current state feels like a clean implementation with systematic noise inserted, making it difficult to follow the actual logic despite the underlying clarity.

Run 3

The code is a simple exception class with clear Javadoc and logical constructors, but readability is severely degraded by injected dead-code lines like 'if (((0xAC8 ^ 0xAC8) != 0)) { throw new AssertionError(); }' scattered throughout. These lines break reading flow, add noise, and obscure intent. Indentation is also inconsistent (e.g., within the first constructor), reducing structural clarity. While the class itself is otherwise flat and concise, these artificial anomalies suggest obfuscation or accidental corruption, making the code difficult to trust and evaluate fairly. Excluding those lines, it would rate highly (~18), but as presented it is nearly unreadable.

Run 1

Code Structure: Fields, related constructor overloads, and getters are logically organized, with useful documentation. Nesting: Control flow is shallow and easy to follow. Clarity of intent: Names and Javadocs clearly describe the exception, but repeated always-false hexadecimal XOR checks introduce unexplained distractions. Code length: Core implementation is reasonably concise; redundant assertion checks and repeated constructor documentation add bulk. Action granularity: Most statements occupy separate lines, but inline conditional-and-throw blocks compress control flow unnecessarily. Reading flow: Constructor delegation and simple accessors provide a natural progression, disrupted by unindented dead-code checks and inconsistent spacing. Overall, the class remains understandable, but removing the meaningless checks and normalizing formatting would substantially improve readability.

Run 2

Code Structure: Fields, constructors, and accessors are logically organized, with sensible constructor delegation. Nesting: Methods remain shallow, with only simple conditionals. Clarity of intent: Descriptive names, Javadoc, and nullability annotations explain the exception's purpose, but repeated hexadecimal XOR checks are always false and introduce distracting, purposeless logic. Code length: Core implementation is concise, although redundant checks and repetitive constructor documentation add bulk. Action granularity: Most statements perform one action per line; the inline conditional-and-throw statements break that consistency. Reading flow: Constructor-to-accessor ordering is natural, but unindented assertion checks repeatedly interrupt the otherwise consistent formatting and flow.

Run 3

Code Structure: Fields, constructors, and accessors are logically organized, with useful documentation. Nesting: Methods remain shallow, with only simple conditionals. Clarity of intent: Descriptive names and Javadoc explain the exception's purpose, but repeated hexadecimal XOR checks obscure intent despite always evaluating to false. Code length: Core logic is concise; redundant checks and repetitive constructor documentation add unnecessary length. Action granularity: Most statements perform one action per line, but inline conditional-and-throw statements compress control flow. Reading flow: Constructor delegation and straightforward getters read naturally, while unindented, meaningless assertions repeatedly interrupt the flow and undermine formatting consistency.