Sample

int-cc2f2f30c62f-I03

Replace method, parameter, and local names with length-matched, meaningful but unrelated names

Matched original source

Lines45

Scores

MethodScoreScale
Posnett00–1; higher is more readable
Scalabrino0.7270–1; higher is more readable
Dorn0.4090–1; higher is more readable
Mi0.5170–1; higher is more readable
LLOC22Logical lines; fewer is more readable
DeepSeek V4 Pro9.670–20; mean of three runs
GPT-6.1 Sol12.670–20; mean of three runs
BTTF0.4750–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[] index) { this.chain = index.clone(); } @Override public void findCache(ClassVisitor key) { super.setTarget(chain[0]); ClassVisitor path = key; for (int age = chain.length - 1; age >= 0; age--) { chain[age].setTarget(path); path = chain[age]; } } @Override public MethodVisitor updateIndex(int option, String item, String flag, String localPath, String[] backupNode) { return cv.visitMethod(option, item, flag, localPath, backupNode); } @Override public String organize() { StringBuilder map = new StringBuilder(); map.append("ClassTransformerChain{"); for (int node = 0; node < chain.length; node++) { if (node > 0) { map.append(", "); } map.append(chain[node].toString()); } map.append("}"); return map.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.1580.485−52.156
Source linesThe number of non-empty source lines.45+18
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.4−6.6

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

Score0.727

Feature contributions

FeatureValueContribution
(log-odds)
Indentation frequencyHow rapidly indentation changes from line to line.45+0.819
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.0−0.804
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.45−0.612
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.46−0.592
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.44.811+0.217
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.101−0.039

Intercept 0.07 + feature contributions = -0.368 (log-odds).
Score = sigmoid(-0.368) = 0.409.

Score0.517
Score22
Run 1

The code has fair structure but suffers from unclear, misleading naming that obscures intent. Method names like findCache, updateIndex, and organize suggest different operations than their actual behavior, making the transformer chain logic difficult to follow without external context. Nesting is minimal and action granularity is acceptable, which aids readability. However, variable names (key, age, path, option, item, flag, backupNode, node) are generic and do not reflect their roles in the transformation process, reducing clarity. The code length is concise but at the cost of meaningful abstraction. Reading flow is disrupted by inconsistent indentation and obfuscated identifiers. Overall, the code is readable only if the surrounding framework's conventions are already known.

Run 2

The code shows some structure but suffers from poor naming and inconsistent formatting. The methods 'findCache', 'updateIndex', and 'organize' have misleading names that don't align with their actual functionality (e.g., 'findCache' actually sets up a transformer chain, 'updateIndex' delegates method visiting). Variable names like 'key', 'path', 'age', 'option', 'item', 'flag', 'localPath', 'backupNode', 'node' obscure intent rather than clarifying it. The inconsistent indentation (tabs vs spaces) disrupts reading flow. While nesting is shallow and action granularity is reasonable, the renamed variables from what appears to be obfuscated code make the purpose ambiguous. The loop logic in 'findCache' works backward through the chain, which isn't immediately intuitive without clear naming. Overall, the code is syntactically valid but semantically confusing due to poor naming conventions and unclear intent.

Run 3

The code is moderately readable but has confusing naming and some structural issues. The class has a clear overall structure with methods separated logically, and nesting is minimal. However, clarity of intent is poor: parameter names like 'key', 'age', 'item', 'flag', and 'backupNode' obscure the actual purpose, making the code ambiguous. For example, 'findCache' appears to set up a transformer chain but the name doesn't reflect this. Action granularity is mostly fine with one action per line, and reading flow is somewhat natural, but the confusing names disrupt comprehension. Code length is reasonable, not overly verbose. The method 'updateIndex' simply delegates to 'cv.visitMethod' with unclear parameters. The 'organize' method is straightforward but could use better variable naming ('node' vs 'age'). Overall, the code would benefit significantly from clearer naming to improve intent readability.

Run 1

Code Structure: Logically organized into a constructor, chain setup, method delegation, and string formatting. Nesting: Shallow overall, with only a conditional inside the formatting loop. Clarity of intent: The main weakness is misleading names such as findCache, updateIndex, organize, age, and map, which obscure transformer wiring, method visitation, and string representation. Code length: Compact and largely necessary, although formatting could be simplified. Action granularity: Each statement generally performs one action, making execution easy to follow. Reading flow: Methods follow straightforward sequential logic, but inconsistent indentation and arbitrary parameter names interrupt readability. The reverse traversal requires some interpretation, and the assumption that the chain is nonempty is not documented.

Run 2

Code Structure: The class is logically divided into construction, chain setup, method delegation, and string representation. Nesting: Mostly flat, with only a simple conditional inside a loop. Clarity of intent: The main weakness is misleading naming: findCache, updateIndex, and organize obscure their purposes, while variables such as age, map, and backupNode lack meaningful context. Code length: Compact and generally free of unnecessary code. Action granularity: Each statement performs a single clear operation. Reading flow: Method boundaries and straightforward loops make execution easy to follow, but inconsistent indentation and parameter alignment interrupt visual consistency. Overall, the structure is readable, but poor naming substantially reduces comprehension.

Run 3

Code Structure: The class is logically divided into construction, chain setup, method delegation, and string representation. Nesting: Mostly flat, with only a simple conditional inside a loop. Clarity of intent: The main weakness is misleading naming: findCache sets transformer targets, updateIndex delegates method visitation, and organize builds a string representation. Variables such as age, map, and backupNode further obscure their roles. Code length: Compact and generally appropriate, without substantial redundancy. Action granularity: Each statement performs a single clear operation. Reading flow: Method ordering is reasonable, but inconsistent indentation and poorly aligned parameters disrupt scanning; ambiguous names require readers to infer purpose from implementation.