Sample

int-714f8bef2a85-I01

Remove line comments, block comments, and Javadoc

Matched original source

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 Pro14.330–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 has a clear purpose but suffers from inconsistent indentation and mixing of tabs/spaces, which hurts readability. The class structure is logical and methods are short, with reasonable action granularity. However, the setTarget logic (reverse-order chain wiring) is non-obvious and lacks a comment explaining why the loop runs backwards. Nesting is shallow, and naming is mostly clear, though 'cv' and 'v' are somewhat terse. The toString method is straightforward but could be simplified with streams or String.join. Overall, the code is understandable to an experienced developer but would benefit from formatting cleanup and a brief explanatory comment on the transformer chaining mechanism.

Run 2

The code is relatively readable but suffers from inconsistent indentation and unclear intent in the setTarget method. The chain initialization logic is concise but the loop reversing through the array is slightly confusing without explanation. The visitMethod override simply delegates, which is clear but unnecessary if cv is already set. The toString method is straightforward with reasonable formatting. Naming is good, and the class structure is logical. However, the mixed indentation (tabs vs spaces) disrupts reading flow, and the lack of comments explaining the chain setup reduces clarity. The action granularity is generally acceptable.

Run 3

The code is generally clear and logically organized, with a straightforward class structure and concise methods. It avoids deep nesting and maintains one action per line in most cases. The purpose of chaining class transformers is evident from the class name and method logic. However, minor readability issues exist: inconsistent indentation (e.g., @Override annotations and method bodies), mixed tabs/spaces, and a slightly confusing loop in setTarget where chain[0] is pre-set before the reverse iteration. The visitMethod override is redundant but not harmful. Overall, the code is readable but would benefit from formatting consistency and minor refactoring for clarity.

Run 1

Code Structure: Methods are logically separated into construction, chain configuration, method delegation, and string representation. Nesting: Minimal, with simple loops and only one nested conditional. Clarity of intent: Class and method names communicate their purposes, although reverse chain wiring requires some thought and names such as v, cv, and sb are less descriptive. Code length: Compact and mostly necessary; string formatting is slightly verbose but straightforward. Action granularity: Each statement performs one clear action, with no compressed multi-action lines. Reading flow: The method order is natural and control flow is easy to follow, but inconsistent tab/space indentation and parameter alignment reduce visual consistency.

Run 2

Code Structure: Logically organized into construction, target wiring, method delegation, and string representation. Nesting: Shallow overall, with only a loop and conditional in toString. Clarity of intent: Class and method names communicate purpose; reverse chain wiring requires some thought, and names like v, cv, and sb are less descriptive. Code length: Compact, with little unnecessary code, though string formatting is somewhat verbose. Action granularity: Each statement performs a single clear action. Reading flow: Methods follow a natural sequence, but inconsistent tabs, spaces, and parameter alignment interrupt visual consistency. The nonempty-chain assumption is implicit rather than documented.

Run 3

Code Structure: Well-organized class with separate methods for construction, chain wiring, method delegation, and string representation. Nesting: Shallow overall; only toString has a conditional inside a loop. Clarity of intent: Class and method names communicate purpose, although reverse-order chain wiring requires some thought and names like v and cv provide limited context. Code length: Compact, with little unnecessary code; string formatting is slightly verbose but straightforward. Action granularity: Each statement performs one clear action, making execution easy to follow. Reading flow: Methods follow a natural sequence, but inconsistent tab/space indentation and parameter alignment disrupt visual consistency. Overall, the code is highly readable with minor naming and formatting weaknesses.