Sample
int-5946df404c78-I08
Select one of ten high-readability unrelated code templates per class
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.512 | 0–1; higher is more readable |
| Dorn | 0.293 | 0–1; higher is more readable |
| Mi | 0.467 | 0–1; higher is more readable |
| LLOC | 43 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 9 | 0–20; mean of three runs |
| GPT-6.1 Sol | 14.33 | 0–20; mean of three runs |
| BTTF | 0.376 | 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. | 4005.061 | −132.167 |
| Source linesThe number of non-empty source lines. | 116 | +46.4 |
| 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.936 | −7.403 |
Intercept 8.87 + feature contributions = -84.3 (log-odds).
Score = sigmoid(-84.3) = 0.
| Score | 0.512 |
|---|
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. | 117 | −3.106 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 100 | +2.722 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 100 | −1.874 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 115.867 | +1.21 |
| 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. | 111.94 | −1.076 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 110.026 | +0.971 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.076 | +0.202 |
Intercept 0.07 + feature contributions = -0.881 (log-odds).
Score = sigmoid(-0.881) = 0.293.
| Score | 0.467 |
|---|
| Score | 43 |
|---|
Run 1
The code generally follows good structure and clarity, but it is severely compromised by an unrelated, nonsensical code block injected into the doGenerate method. This block computes a 'lowerTemperature' variable but never uses it, completely breaking the reading flow and intent. Additionally, the method then proceeds with the actual key generation logic, but the insertion makes the method confusing and ambiguous. Other issues include multiple actions in the if-else block (state assertion plus method call), and the cast in createCacheKeyInvocationContext contains a suppressed warning but lacks an explanatory comment. While naming and organization are otherwise acceptable, the presence of dead, irrelevant code and the abrupt disruption in logic drastically reduce readability.
Run 2
The code structure is generally logical but contains a severe, unrelated code block (temperature variables) inserted inside the doGenerate method, which destroys reading flow and clarity of intent. The nesting is moderate, mostly flat, but the mixed responsibilities and the inexplicable unrelated block create confusion. Action granularity is mostly one action per line, but the method generate is somewhat long and combines validation, context creation, and delegation. The code length is acceptable for the functionality, but the redundant constructor logic could be simplified. The biggest issues are the unrelated inserted code block, duplicated null-check logic, and lack of clear separation between JSR-107 and Spring key generation paths. Overall, it is readable in parts but significantly undermined by the inserted irrelevant code and some verbose conditional handling.
Run 3
The code has clear imports, class-level Javadoc, and consistent method naming, which helps intent. However, the `doGenerate` method contains an unexplained hard-coded weather-temperature block that is completely unrelated to caching logic, breaking clarity and reading flow. Nesting is generally shallow, but the method mixes parameter-processing logic with this dead code. There is also a redundant `else` after `NewNumber`-style assertion in `generate`, and the parameter handling loop includes a verbose branching condition for varargs, which increases cognitive load. The adapter’s two constructors and target resolution logic are clean, but the unrelated snippet seriously undermines maintainability and readability.
Run 1
Code Structure: Constructors, delegation, and parameter handling are logically separated, but an unrelated temperature-calculation block disrupts doGenerate. Nesting: Generally shallow, with modest loop-and-conditional nesting; the extraneous block adds needless scope. Clarity of intent: Descriptive names, assertions, and documentation explain the adapter's purpose, while unused temperature variables introduce confusing, irrelevant intent. Code length: Mostly proportionate to its responsibilities, though the temperature block and some repeated constructor validation add verbosity. Action granularity: Statements consistently perform one action per line. Reading flow: Method ordering and delegation are natural, but inconsistent indentation in the inserted block and its abrupt topic change significantly interrupt comprehension.
Run 2
Code Structure: The adapter is logically organized into constructors, delegation, parameter handling, and context creation, but an unrelated temperature-calculation block disrupts cohesion. Nesting: Mostly shallow, with manageable loop and conditional nesting; the extraneous block adds needless scope. Clarity of intent: Descriptive names and Javadoc clearly explain key-generator adaptation, while the unused temperature variables introduce confusion. Code length: Methods are reasonably concise, but the irrelevant block and some repeated validation add unnecessary length. Action granularity: Statements generally perform one action per line, making operations easy to follow. Reading flow: The main delegation and parameter-processing paths read naturally, but inconsistent indentation and the unexpected temperature logic interrupt the flow.
Run 3
Code Structure: Constructors, delegation, parameter processing, and context creation are logically separated, but the unrelated temperature block disrupts cohesion. Nesting: Generally shallow, with manageable conditionals inside one loop; the extra standalone block adds needless nesting. Clarity of intent: Descriptive names, documentation, and assertions explain the adapter's purpose, but the unused temperature calculation is confusing and irrelevant. Code length: Mostly concise, although the temperature block and some repeated validation add overhead. Action granularity: Statements generally perform one action per line, making individual operations easy to follow. Reading flow: The adapter follows a natural progression from construction to key generation and helper methods, but inconsistent indentation and the abrupt temperature example interrupt that flow.