Sample

int-04dab0fcef32-SRC

Unmodified source class

Lines45

Scores

MethodScoreScale
Posnett00–1; higher is more readable
Scalabrino0.7560–1; higher is more readable
Dorn0.4180–1; higher is more readable
Mi0.530–1; higher is more readable
LLOC22Logical lines; fewer is more readable
DeepSeek V4 Pro13.670–20; mean of three runs
GPT-6.1 Sol170–20; mean of three runs
BTTF0.6040–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) { super.setTarget(chain[0]); ClassVisitor next = v; for (int i = chain.length - 1; i >= 0; 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{"); 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.1553.409−51.263
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.331−6.497

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

Score0.756

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.71.565+0.634
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.838+0.217
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.104−0.065

Intercept 0.07 + feature contributions = -0.333 (log-odds).
Score = sigmoid(-0.333) = 0.418.

Score0.53
Score22
Run 1

The code is generally readable but has several issues. Structure is logical with clear class purpose, but there's inconsistent indentation (tabs vs spaces) in method declarations. Nesting is minimal and acceptable. Intent is mostly clear, though the setTarget logic with reverse iteration is somewhat confusing - it iterates backwards while building the chain forward, requiring careful reading to understand. Code length is appropriate for the functionality. Action granularity is mixed - most lines handle one action, but the loop in setTarget combines assignment and traversal. Reading flow is disrupted by inconsistent formatting and the non-intuitive reverse loop. The visitMethod override is trivial but adds little value. Overall, the code conveys its purpose but could benefit from better formatting consistency and possibly a comment explaining the reverse iteration logic in setTarget.

Run 2

The code is generally readable but has some issues. The class structure is logical and the methods are short, but there are inconsistencies in indentation and the constructor array cloning is reasonable. The setTarget method has a non-obvious loop that builds the chain backwards, which could confuse readers. The visitMethod method simply delegates, adding little value. The toString method is clear but could be simplified with String.join or a stream. Overall, the code is understandable but lacks polish and could benefit from more consistent formatting and clearer comments explaining the backward chain construction.

Run 3

The code has a clear purpose and is generally straightforward, but several issues affect readability. The structure is logical but inconsistent: indentation is mixed in some places (tabs vs spaces), and method annotations are sometimes on separate lines. The `setTarget` method has a non-obvious reverse iteration that builds a chain, which could confuse readers without knowledge of the transformer pattern. Action granularity is mostly good, though the `setTarget` method performs multiple conceptual steps in a few lines. The `toString` method is clear but could be simplified with a helper. Class and method names are descriptive. Overall, the code is readable but could benefit from consistent formatting and clearer explanation of the chain setup logic.

Run 1

Code Structure: The class is logically organized into construction, target wiring, method delegation, and string representation. Nesting: Shallow loops and a single conditional keep complexity low. Clarity of intent: Names and straightforward delegation communicate purpose, though reverse-order chain wiring requires some thought and lacks an explanatory comment. Code length: Compact overall, with modest verbosity in string construction and method forwarding. Action granularity: Each statement performs a distinct action, making execution easy to follow. Reading flow: Methods follow a natural sequence, but inconsistent tabs, spaces, and parameter alignment slightly disrupt readability.

Run 2

Code Structure: Well-organized class with separate methods for construction, chain linking, method delegation, and string representation. Nesting: Shallow overall; only toString contains an if inside a loop. Clarity of intent: Class and method names communicate purpose, but the reverse-order chain wiring requires some thought, and names such as v, cv, and sb are less descriptive. Code length: Concise, with little unnecessary code; string formatting is slightly verbose. Action granularity: Each statement performs a single clear action. Reading flow: Methods follow a natural progression, but inconsistent tab/space indentation and parameter alignment interrupt visual consistency. A brief explanation of chain ordering would improve readability.

Run 3

Code Structure: Methods are logically separated into construction, target wiring, method delegation, and string formatting. Nesting: Mostly flat, with only a simple loop and conditional in toString. Clarity of intent: Class and method names communicate the transformer-chain purpose, though reverse wiring requires some thought and names such as v, cv, and sb are terse. Code length: Concise overall; string formatting is slightly verbose but straightforward. Action granularity: Each statement performs a single clear action. Reading flow: Method ordering is natural, but inconsistent tabs, spaces, and parameter alignment interrupt visual consistency. The unexplained assumption that the chain is nonempty slightly reduces clarity.