Sample

int-9ce974d808c2-I02

Shorten method, parameter, and local names without collisions

Matched original source

Lines45

Scores

MethodScoreScale
Posnett00–1; higher is more readable
Scalabrino0.7790–1; higher is more readable
Dorn0.4330–1; higher is more readable
Mi0.6030–1; higher is more readable
LLOC22Logical lines; fewer is more readable
DeepSeek V4 Pro100–20; mean of three runs
GPT-6.1 Sol140–20; mean of three runs
BTTF0.5790–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[] cha) { this.chain = cha.clone(); } @Override public void set(ClassVisitor v) { super.setTarget(chain[0]); ClassVisitor nex = v; for (int i = chain.length - 1; i >= 0; i--) { chain[i].setTarget(nex); nex = chain[i]; } } @Override public MethodVisitor visit(int acc, String nam, String des, String sig, String[] exc) { return cv.visitMethod(acc, nam, des, sig, exc); } @Override public String to() { StringBuilder sb = new StringBuilder(); sb.append("ClassTransformerChain{"); for (int i = 0; i < chain.length; i++) { if (i > 0) { 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.1575.226−51.982
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.301−6.452

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

Score0.779

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
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.68.935+0.745
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 (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.44.9+0.218
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.109−0.112

Intercept 0.07 + feature contributions = -0.268 (log-odds).
Score = sigmoid(-0.268) = 0.433.

Score0.603
Score22
Run 1

The code has some structural organization, but it suffers from multiple readability issues. Naming is overly terse ('v', 'nex', 'nam', 'des', 'sig', 'acc', 'exc', 'cha') which obscures intent. Method parameters are inconsistently formatted, with visit() using multi-line parameters while others use single-line. Indentation is inconsistent, with @Override annotations sometimes on the same line as the method signature and sometimes not. The set() method shows unclear logic: it calls super.setTarget(chain[0]) but then also sets targets on each chain element in a loop, creating ambiguity about what actually happens. The to() method is straightforward but verbose for what it does. The chain transformation logic is conceptually complex but not explained through comments or clear naming. Single-letter variable names reduce clarity, and the mixed formatting style breaks reading flow. Overall, the code is functional but requires significant effort to understand.

Run 2

The code is logically structured and relatively flat, but suffers from several readability issues. Variable names are cryptic ('nam', 'des', 'sig', 'exc', 'nex', 'cha', 'v'), reducing clarity of intent. Parameter names in methods like visit() are unnecessarily abbreviated, making the code harder to understand without context. Action granularity is generally good, with one main operation per line. The set() method's reverse iteration logic for chaining visitors is somewhat clear but lacks explanatory comments for why the order matters. Override annotations are inconsistently formatted (some on separate lines), disrupting visual flow. The to() method is readable but could use a stream or join for conciseness. Overall, the code is maintainable but would benefit from better naming and consistent formatting to improve understanding for developers unfamiliar with the framework.

Run 3

The code is generally understandable but has several readability issues. There is inconsistent indentation (mixing tabs and spaces) for methods like set(), visit(), and to(). The variable names are unclear: 'nam', 'des', 'sig', 'exc', 'v', 'nex', and 'cha' are cryptic and should be descriptive. The set() method logic is not obvious without careful analysis; it chains visitors backwards but this intent is not documented. The structure is logical enough, but the action granularity is uneven (multiple operations in the for loop). Code length is appropriate, but the reading flow is disrupted by poor naming and formatting. The class purpose is clear, but the method bodies could be more self-explanatory.

Run 1

Code Structure: The class is logically organized into construction, chain setup, method delegation, and string formatting. Nesting: Shallow loops and a single conditional keep complexity low. Clarity of intent: Transformer chaining is understandable, but abbreviated names such as cha, nex, acc, nam, and des obscure meaning; method names set, visit, and to also provide limited context. Code length: The implementation is concise, with little unnecessary code. Action granularity: Most lines perform one clear action, making individual operations easy to follow. Reading flow: Method order is natural, but inconsistent indentation and awkward parameter alignment interrupt scanning. The reverse iteration in chain setup requires some thought and would benefit from a brief explanation.

Run 2

Code Structure: The class is logically organized into construction, chain setup, method delegation, and string formatting. Nesting: Shallow loops and one simple conditional keep complexity low. Clarity of intent: The transformer-chain purpose is understandable, but abbreviated names such as cha, nex, acc, nam, and des, plus vague method names set, visit, and to, obscure intent. Code length: Compact overall, with little unnecessary code. Action granularity: Each statement generally performs one action per line. Reading flow: Method order is natural, but inconsistent indentation and awkward parameter alignment interrupt scanning. Reverse chain wiring requires some thought, and the unexplained overridden method names make the API harder to interpret.

Run 3

Code Structure: The class is logically organized into construction, chain setup, method delegation, and string formatting. Nesting: Shallow loops and one simple conditional keep complexity low. Clarity of intent: Transformer chaining is understandable, but abbreviated names such as cha, nex, acc, nam, and des reduce clarity; method names set, visit, and to are vague. Code length: The implementation is compact without substantial unnecessary code. Action granularity: Each statement generally performs one action, making individual steps easy to follow. Reading flow: Method order is natural, but mixed tabs and spaces, uneven parameter alignment, and the reverse chain-building loop introduce reading friction.