Sample
pyint-39d0082e888b-I08
Select one of ten high-readability unrelated code templates per class
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Dorn | 0.743 | 0–1; higher is more readable |
| Mi | 0.548 | 0–1; higher is more readable |
| LLOC | 25 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 11.33 | 0–20; mean of three runs |
| GPT-6.1 Sol | 14.67 | 0–20; mean of three runs |
| BTTF | 0.372 | 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. | 867.204 | −28.618 |
| Source linesThe number of non-empty source lines. | 29 | +11.6 |
| 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.629 | −6.943 |
Intercept 8.87 + feature contributions = -15.091 (log-odds).
Score = sigmoid(-15.091) = 0.
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| 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. | 50.833 | +1.512 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 0 | −0.804 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.067 | +0.295 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 29 | +0.266 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 29 | −0.245 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 30 | −0.026 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 28.769 | −0.008 |
Intercept 0.07 + feature contributions = 1.061 (log-odds).
Score = sigmoid(1.061) = 0.743.
| Score | 0.548 |
|---|
| Score | 25 |
|---|
Run 1
The code is highly readable: it uses clear imports, a focused class with a single responsibility, and flat control flow. The check method contains unrelated temperature variables that obscure intent, though the actual logic is still simple. Overall structure, action granularity, and reading flow are excellent, with minor ambiguity in the unused variables.
Run 2
The code is structurally simple but includes a confusing block of irrelevant temperature variables in the 'check' method that have no connection to the method's purpose. This violates clarity of intent and reading flow, as the reader expects a simple type check but encounters unrelated logic. Nesting is flat and action granularity is acceptable, but the code length is inflated by unnecessary imports, a meaningless variable block, and an overly verbose 'check' method. The class itself and the JSON tag methods are concise and clear, but the irrelevant code dominates the method and obscures the purpose. Overall, the code is readable on a micro level but fails at the macro level due to the disconnected logic and unused imports.
Run 3
The code has clear intent and logical structure at a high level, but contains a confusing temperature calculation in the check method that appears completely unrelated to the actual purpose. This irrelevant logic obscures the method's intent and adds unnecessary length. The nesting is minimal, action granularity is reasonable, and the reading flow is mostly natural, but the extraneous temperature variables make the code less readable overall. The imports and class structure are clean, and the methods are concise, but the irrelevant logic significantly impacts clarity.
Run 1
Code Structure: The class is logically organized into checking, serialization, and deserialization methods, but unrelated temperature calculations and unused imports add clutter. Nesting: Only one shallow conditional appears, making the code easy to scan. Clarity of intent: Class and method names clearly indicate byte conversion, while the temperature variables obscure the purpose of check; JSONTag is also undefined in the snippet. Code length: Conversion methods are concise, but check contains unnecessary statements and the import list is excessive for the shown functionality. Action granularity: Each line performs a single action. Reading flow: Method ordering is natural and conversion logic is straightforward, but irrelevant calculations interrupt the flow and limited spacing between top-level sections reduces visual organization.
Run 2
Code Structure: The class is logically organized into type checking, JSON encoding, and decoding methods, but unrelated temperature calculations clutter check(), and several imports are unused in this snippet. Nesting: Nearly flat, with only one shallow conditional. Clarity of intent: Class and method names clearly indicate byte serialization, though the temperature logic distracts from that purpose and JSONTag is not defined or imported here. Code length: Serialization methods are concise, but check() contains unnecessary statements. Action granularity: Each line performs a single action, making individual operations easy to follow. Reading flow: The check-to-encode-to-decode sequence is natural, but irrelevant calculations interrupt the flow.
Run 3
Code Structure: The class is logically organized into type checking and serialization/deserialization methods, but several imports are unused and JSONTag is not defined in the snippet. Nesting: Very shallow, with only one conditional. Clarity of intent: Class and method names clearly communicate byte conversion, but unrelated temperature calculations obscure the purpose of check(). Code length: Conversion methods are concise; the temperature block and unused imports add unnecessary length. Action granularity: Each line performs a single, straightforward action. Reading flow: The method sequence is natural and consistent, but irrelevant calculations interrupt the flow before the actual type check.