Sample
int-8c9e0b56eed9-I02
Shorten method, parameter, and local names without collisions
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.513 | 0–1; higher is more readable |
| Dorn | 0.316 | 0–1; higher is more readable |
| Mi | 0.477 | 0–1; higher is more readable |
| LLOC | 38 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 6.33 | 0–20; mean of three runs |
| GPT-6.1 Sol | 13 | 0–20; mean of three runs |
| BTTF | 0.501 | 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. | 3833.324 | −126.5 |
| Source linesThe number of non-empty source lines. | 107 | +42.8 |
| Byte entropyHow varied the bytes in the source text are. Repeated bytes give a lower value; a more even mixture gives a higher value. | 5.009 | −7.513 |
Intercept 8.87 + feature contributions = -82.343 (log-odds).
Score = sigmoid(-82.343) = 0.
| Score | 0.513 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 108 | −2.788 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 91 | +2.41 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 91 | −1.667 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 106.869 | +1.084 |
| 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. | 105.991 | −0.824 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 100.148 | +0.811 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.084 | +0.13 |
Intercept 0.07 + feature contributions = -0.773 (log-odds).
Score = sigmoid(-0.773) = 0.316.
| Score | 0.477 |
|---|
| Score | 38 |
|---|
Run 1
The code has a clear purpose but suffers from poor readability due to cryptic variable names (tar, tar2, met, par, ope), abbreviated method names (gen, do2, create), and inconsistent parameter naming (cache2, cache3, par2, par3). These obscure intent despite logical class structure and documentation. The code is relatively flat with simple nesting, but the generics and casts harm clarity. Action granularity is mostly acceptable, yet parameter lists are long. The adaptation logic between Spring and JCache APIs is not immediately obvious. Overall, the code functions but requires extra effort to understand, making it less readable.
Run 2
The code has significant readability issues. Method names like 'gen', 'do2', 'tar', 'tar3', 'par2', 'par3', 'ope2', 'tar4', 'par4', and 'cache2', 'cache3' are cryptic and fail to convey intent. The constructor parameters are inconsistently named (cache2/tar, cache3/tar2). The 'do2' method has moderate nesting and unclear logic regarding varargs handling. While the class structure is logical, the get() method mixes two different delegate types into an Object return, obscuring intent. The code has reasonable length and one action per line, but the terrible naming destroys clarity. Reading flow is disrupted by having to mentally map numbered variables to their meaning. The structure is acceptable but execution falls far short of the Spring framework's usual readability standards.
Run 3
The code is difficult to read due to poor naming conventions (e.g., cache2, tar, tar2, par, par2, ope2, do2, gen) that obscure intent. The structure is tangled: the class mixes adapter logic, method logic, and helper methods without clear separation of concerns. The use of two constructors with nearly identical parameter types but different meanings adds confusion. Nesting is moderate but the reading flow is disrupted by ambiguous variable names and unclear method purposes. Action granularity is acceptable, but the method names and parameters make it hard to follow the logic. Concise but not self-documenting; the comments are helpful but don't compensate for poor naming and structure.
Run 1
Code Structure: The class is logically organized into constructors, delegation methods, parameter handling, and context creation, with well-separated responsibilities. Nesting: Mostly shallow; the loop with an internal conditional is easy to follow. Clarity of intent: Documentation and descriptive type names explain the adapter's purpose, but names such as gen, do2, tar3, ope2, and par4 obscure individual operations and data roles. Code length: Reasonably concise, with little unnecessary implementation detail; constructor duplication is understandable for different generator types. Action granularity: Statements generally perform one action per line, although some expressions combine several method calls. Reading flow: Consistent formatting and straightforward control flow help, but cryptic names require repeated cross-referencing. Additionally, gen marked @Override appears inconsistent with KeyGenerator's generate method, creating confusion about the intended interface implementation.
Run 2
Code Structure: The adapter is logically divided into constructors, delegation, parameter processing, and context creation. Nesting: Mostly shallow, with only a loop containing an if/else. Clarity of intent: Documentation and descriptive type names explain the overall purpose, but names such as gen, do2, tar3, ope2, and par4 obscure individual operations. Code length: Reasonably concise, although repeated constructor validation and verbose documentation add some length. Action granularity: Statements generally perform one action per line; the compound varargs condition remains manageable. Reading flow: Method ordering and consistent formatting support sequential reading, but cryptic identifiers force readers to repeatedly infer roles. Additionally, gen appears inconsistent with the KeyGenerator interface's generate method, making the override confusing.
Run 3
Code Structure: The adapter is logically divided into constructors, generator selection, delegation, parameter handling, and context creation. Nesting: Mostly shallow, with only a loop containing an if/else. Clarity of intent: Documentation and descriptive type names explain the purpose, but cryptic identifiers such as tar3, ope2, par4, do2, and gen substantially obscure behavior. Code length: Reasonably concise, with limited duplication in constructor validation. Action granularity: Statements generally perform one action per line; the multiline condition remains understandable. Reading flow: Method ordering and consistent formatting support sequential reading, but numbered variable names and vague helper names force readers to infer meaning repeatedly. The gen method's @Override also appears inconsistent with KeyGenerator's generate method, creating additional confusion.