Sample
int-778b126c83bc-I01
Remove line comments, block comments, and Javadoc
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.62 | 0–1; higher is more readable |
| Dorn | 0.192 | 0–1; higher is more readable |
| Mi | 0.363 | 0–1; higher is more readable |
| LLOC | 16 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 18 | 0–20; mean of three runs |
| GPT-6.1 Sol | 17 | 0–20; mean of three runs |
| BTTF | 0.653 | 0–1; higher is more readable |
Views
Loading feature diagnosis…
Source regions
Feature contributions
Feature contributions
| Feature | Value | Contribution (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. | 1628.86 | −53.752 |
| Source linesThe number of non-empty source lines. | 73 | +29.2 |
| 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.853 | −7.279 |
Intercept 8.87 + feature contributions = -22.962 (log-odds).
Score = sigmoid(-22.962) = 0.
| Score | 0.62 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Indentation frequencyHow rapidly indentation changes from line to line. | 73 | +1.788 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 74 | −1.584 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 73 | −1.254 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 0 | −0.804 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 72.831 | +0.608 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.117 | −0.197 |
| 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. | 87.986 | −0.062 |
Intercept 0.07 + feature contributions = -1.434 (log-odds).
Score = sigmoid(-1.434) = 0.192.
| Score | 0.363 |
|---|
| Score | 16 |
|---|
Run 1
The code is highly readable with clear structure and organization. Package and imports are properly declared, followed by a single public utility class with well-named methods. Each method has a single, focused purpose: getting package names, initializing classes, and creating proxies. Nesting is minimal—only one try-catch block and one conditional ternary expression. Intent is clear from method names and parameter types. Code length is concise without being cryptic. Most lines contain a single logical action, improving comprehension. The reading flow is natural: package declaration, imports, class definition, then methods in logical order with private constructor at the end. The only minor deduction is for the unnecessary blank lines between methods and the slightly repetitive overloaded getPackageName methods, but these are trivial style preferences. Overall, this code exemplifies clean, maintainable Java utility code.
Run 2
The code is highly readable. It is well-structured into a final class with a private constructor, and methods are logically grouped. Nesting is minimal—only one try-catch block and no deeply nested conditionals. Intent is clear from method names and Javadoc placeholders, though the many empty comment blocks slightly disrupt flow. Code length is concise; methods are short and focused. Action granularity is appropriate, with one main action per line in most cases. The reading flow is natural, moving from simple utility methods to more complex ones. Minor deductions are for the excessive placeholder Javadocs and slightly awkward line breaks in the proxy creation.
Run 3
The code demonstrates excellent readability. Structure is logical, grouping package name utilities, initialization, and proxy creation with clear method separation. Nesting is minimal, with only one loop and try-catch, maintaining flat structure. Intents are clear - method names precisely describe their actions. Code length is concise with no unnecessary verbosity. Most actions are on separate lines, with Proxy.newProxyInstance arguments cleanly distributed. Reading flow follows natural progression from simple to complex operations. The static imports reduce clutter, Javadoc sections provide context, and exception handling is straightforward. Minor deductions for multiple blank lines and slightly dense proxy creation code.
Run 1
Code Structure: Well-organized utility class with focused methods and a private constructor. Nesting: Mostly flat; initialize has a modest loop and try-catch nesting. Clarity of intent: Descriptive method and parameter names make package extraction and proxy creation clear, although initialize requires some knowledge of Java class loading. Code length: Implementations are concise, but excessive blank lines unnecessarily expand the file. Action granularity: Each statement performs a distinct action; the multiline proxy call remains easy to follow. Reading flow: Related overloads are adjacent and method logic proceeds naturally, though inconsistent vertical spacing interrupts scanning.
Run 2
Code Structure: Small, logically separated utility methods provide clear organization. Nesting: Mostly flat; initialize uses a straightforward loop containing try/catch, with manageable depth. Clarity of intent: Descriptive method and parameter names make package extraction, class initialization, and proxy creation understandable, though forced initialization and the AssertionError choice could benefit from brief documentation. Code length: Implementations are concise, but excessive blank lines unnecessarily expand the file. Action granularity: Each statement performs a focused action; the multiline proxy invocation remains easy to follow. Reading flow: Method bodies read naturally, and the private constructor clearly prevents instantiation. However, inconsistent whitespace and large gaps between methods disrupt scanning.
Run 3
Code Structure: Well-organized utility class with focused methods and a private constructor. Nesting: Mostly flat; the loop and try/catch in initialize add only modest depth. Clarity of intent: Descriptive method and parameter names make package extraction and proxy creation clear, though initialize requires familiarity with Class.forName semantics. Code length: Implementations are concise, but excessive blank lines unnecessarily expand the file. Action granularity: Each statement performs a distinct action, and the wrapped proxy call remains readable. Reading flow: Method order and delegation are natural, but irregular whitespace interrupts scanning. Overall, the code is highly readable despite distracting formatting and minor reliance on reflection knowledge.