Sample
int-7d4d612cfbbe-I05
Rewrite eligible decimal integer literals in hexadecimal notation
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.739 | 0–1; higher is more readable |
| Dorn | 0.408 | 0–1; higher is more readable |
| Mi | 0.53 | 0–1; higher is more readable |
| LLOC | 22 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 7.33 | 0–20; mean of three runs |
| GPT-6.1 Sol | 16 | 0–20; mean of three runs |
| BTTF | 0.41 | 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. | 1589.315 | −52.447 |
| 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.354 | −6.532 |
Intercept 8.87 + feature contributions = -32.109 (log-odds).
Score = sigmoid(-32.109) = 0.
| Score | 0.739 |
|---|
Feature contributions
| Feature | Value | Contribution (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 |
| 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 (horizontal)How rapidly the visual pattern of identifier characters changes from left to right. It measures spatial frequency, not the meaning of the names. | 72.652 | +0.588 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 44.878 | +0.217 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.103 | −0.057 |
Intercept 0.07 + feature contributions = -0.371 (log-odds).
Score = sigmoid(-0.371) = 0.408.
| Score | 0.53 |
|---|
| Score | 22 |
|---|
Run 1
The code has a logical purpose (chaining class transformers) but suffers from several readability issues. The use of hexadecimal literals (0x0, 0x1) is unnecessarily cryptic and hinders quick comprehension. Inconsistency: setTarget method is called on chain[0x0] but the loop then iterates backward, not clearly explaining its logic. There is also mixed indentation (tabs vs spaces) and inconsistent formatting. The visitMethod delegates directly, adding little value. While the toString method is reasonable, the overall structure could be clearer with constants or comments explaining the chain ordering. The code is not deeply nested but lacks clarity of intent. It is concise but sacrifices readability through non-standard numeric notation and inconsistent style, making it harder to maintain or review.
Run 2
The code has clear intent and a logical structure, but suffers from several readability issues. The use of hexadecimal literals (0x0, 0x1) for simple integers is confusing and unnecessary. The setTarget method has inverted logic that is difficult to follow at first glance, with the loop iterating backwards through the chain. Inconsistent indentation in the toString method disrupts reading flow. Some methods are concise, but the visitMethod override adds no value and could be removed. Overall, while the class is small and functionally straightforward, these stylistic choices significantly reduce readability.
Run 3
The code scores low due to several readability issues. The use of hexadecimal numbers (0x0, 0x1) instead of standard decimal literals is confusing and unconventional. Inconsistent indentation and mixing tabs/spaces disrupt the reading flow. The setTarget method's reverse iteration logic lacks comments explaining why transformations are chained backward, making intent unclear. The visitMethod override appears trivial and adds little value. Variable names like 'v' are ambiguous. The toString method is straightforward but could use streams or a join operation for conciseness. Overall, the structure is understandable for experienced developers familiar with transformer patterns, but the unconventional formatting and unexplained logic significantly reduce clarity and maintainability.
Run 1
Code Structure: Methods are logically separated into initialization, chain wiring, method delegation, and string representation. Nesting: Shallow overall, with only a loop containing a simple conditional in toString. Clarity of intent: Class and method names convey purpose, but hexadecimal literals for zero and one are distracting, and names such as v, cv, and sb are terse. The reverse-order chain wiring requires some interpretation. Code length: Concise, with little unnecessary code. Action granularity: Each statement performs a single action, making operations easy to follow. Reading flow: Method ordering is natural, but inconsistent tab/space indentation and awkward parameter alignment reduce visual consistency.
Run 2
Code Structure: Methods are logically organized, separating construction, chain wiring, method delegation, and string formatting. Nesting: Shallow loops and a single conditional keep complexity low. Clarity of intent: Class and method names convey purpose, but hexadecimal literals for zero and one add unnecessary cognitive overhead; abbreviated names such as v, cv, and sb are less descriptive. Code length: Concise overall, with modest boilerplate in delegation and string formatting. Action granularity: Each statement performs one action, making execution easy to follow. Reading flow: The layout follows a natural progression, although inconsistent tab/space indentation disrupts visual consistency, and the reverse-order chain wiring would benefit from a brief explanatory comment.
Run 3
Code Structure: Methods are logically separated into construction, chain setup, delegation, and string formatting. Nesting: Control flow is shallow, with only one conditional inside a loop. Clarity of intent: Class and method names convey purpose, but hexadecimal literals for ordinary indices and short names such as v and sb reduce clarity. The reverse wiring of the transformer chain requires some interpretation. Code length: The implementation is concise, with little unnecessary code. Action granularity: Each statement performs one clear action. Reading flow: Method order is natural, but mixed tabs and spaces, uneven parameter alignment, and the lack of spacing after the package declaration interrupt visual consistency.