Sample

int-1bd7d6d96248-I11

Split eligible integer literals into pairs of short-named intermediate variables

Matched original source

Lines55

Scores

MethodScoreScale
Posnett00–1; higher is more readable
Scalabrino0.7320–1; higher is more readable
Dorn0.3650–1; higher is more readable
Mi0.520–1; higher is more readable
LLOC32Logical lines; fewer is more readable
DeepSeek V4 Pro5.670–20; mean of three runs
GPT-6.1 Sol120–20; mean of three runs
BTTF0.4050–1; higher is more readable

Views

Source code

package org.springframework.cglib.transform; import org.springframework.asm.ClassVisitor; import org.springframework.asm.MethodVisitor; import org.springframework.cglib.core.ClassTransformer; public class ClassTransformerChain extends AbstractClassTransformer { private ClassTransformer[] chain; public ClassTransformerChain(ClassTransformer[] chain) { this.chain = chain.clone(); } @Override public void setTarget(ClassVisitor v) { final int a = 1; final int b = -1; super.setTarget(chain[(a + b)]); ClassVisitor next = v; final int c = 2; final int d = -1; final int e = 1; final int f = -1; for (int i = chain.length - (c + d); i >= (e + f); i--) { chain[i].setTarget(next); next = chain[i]; } } @Override public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { return cv.visitMethod(access, name, desc, signature, exceptions); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("ClassTransformerChain{"); final int g = 1; final int h = -1; for (int i = (g + h); i < chain.length; i++) { final int j = 1; final int k = -1; if (i > (j + k)) { sb.append(", "); } sb.append(chain[i].toString()); } sb.append("}"); return sb.toString(); } }

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.2149.608−70.937
Source linesThe number of non-empty source lines.55+22
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.236−6.354

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

Score0.732

Feature contributions

FeatureValueContribution
(log-odds)
Indentation frequencyHow rapidly indentation changes from line to line.55+1.165
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.56−0.946
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.55−0.841
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.0−0.804
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.73+0.573
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.54.905+0.358
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.11−0.128

Intercept 0.07 + feature contributions = -0.554 (log-odds).
Score = sigmoid(-0.554) = 0.365.

Score0.52
Score32
Run 1

The code has reasonable class structure and method separation, but readability is severely hindered by obfuscated arithmetic expressions (e.g., `chain[(a + b)]`, `chain.length - (c + d)`, `i >= (e + f)`) that obscure simple values like 0 and 1. Variable names (`a`, `b`, `c`, `d`, `e`, `f`, `g`, `h`, `j`, `k`) are meaningless and add unnecessary noise. Nesting is shallow and action granularity is acceptable, but the reading flow is disrupted by these artificial constructs. The `toString()` method has a convoluted loop with redundant variables, making it hard to follow. While the overall structure is logical and the code is not overly long, the lack of clarity in intent and the deliberate obfuscation significantly reduce readability.

Run 2

The code has poor readability due to unnecessary complexity and confusing constructs. The use of variables like 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'j', and 'k' to represent simple arithmetic operations (e.g., 'a + b' for 0, 'c + d' for 1, 'e + f' for 0) is obfuscating and makes the code much harder to understand than necessary. The setTarget method has confusing logic where 'super.setTarget(chain[0])' is called but then the loop reassigns targets in a way that's hard to follow. The toString method has similar issues with the comma-separated logic. While the code structure is logical and methods are appropriately separated, the excessive use of meaningless variable names and unnecessary arithmetic operations severely impacts clarity of intent. The nesting is acceptable and action granularity is mostly reasonable, but the overall reading flow is disrupted by these obfuscation patterns. This code could be significantly simplified by using direct numeric literals or meaningful constants.

Run 3

This code is intentionally obfuscated, making it extremely difficult to read. Magic numbers are replaced with meaningless variables (a, b, c, d, etc.) that perform simple arithmetic to yield values like 0 or 1, obscuring intent. The setTarget method uses confusing index manipulation and reassigns the visitor in a non-obvious order. The loop conditions and toString method also hide trivial operations behind unnecessary local variables. While the structure is shallow and each line performs a single action, the clarity of intent is severely compromised. The code is concise but at the cost of readability; it reads as a puzzle rather than a clear implementation. Overall, the obfuscation directly violates the principle of self-documenting code, making it nearly unreadable despite its simple structure.

Run 1

Code Structure: Methods are logically separated into construction, target wiring, delegation, and string formatting. Nesting: Mostly shallow, with only a conditional inside a loop. Clarity of intent: Class and method names communicate purpose, but meaningless variables a through k and arithmetic disguising 0 and 1 obscure indexing and loop boundaries. Code length: Unnecessary constant declarations make simple operations substantially longer. Action granularity: Generally one action per line, aiding inspection. Reading flow: Method ordering is natural, but redundant arithmetic and inconsistent tab/space indentation interrupt readability. Replacing the artificial constants with direct literals and standardizing formatting would significantly improve clarity.

Run 2

Code Structure: Methods are logically separated into construction, target wiring, delegation, and string formatting. Nesting: Shallow overall, with only a loop containing a simple conditional. Clarity of intent: Class and method names communicate purpose, but meaningless variables a–k and arithmetic expressions obscure straightforward zero and one constants. Code length: Unnecessarily inflated by redundant constant declarations and calculations. Action granularity: Generally good, with one declaration or operation per line. Reading flow: Method order is natural, but repeated arithmetic distractions and inconsistent indentation interrupt comprehension. The underlying implementation is simple and organized, yet artificial complexity significantly reduces readability.

Run 3

Code Structure: Methods are logically separated into construction, chain setup, method delegation, and string formatting. Nesting: Shallow loops and one conditional keep complexity manageable. Clarity of intent: Class and method names communicate purpose, but meaningless variables a through k and arithmetic expressions obscure simple zero and one constants. Code length: Unnecessary constant declarations inflate otherwise concise methods. Action granularity: Each statement generally performs one action, making individual operations easy to follow. Reading flow: The overall sequence is natural, but distracting arithmetic and inconsistent tab/space indentation interrupt scanning and make loop boundaries harder to interpret.