Sample
int-4944185ad66e-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.691 | 0–1; higher is more readable |
| Dorn | 0.106 | 0–1; higher is more readable |
| Mi | 0.11 | 0–1; higher is more readable |
| LLOC | 15 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 3 | 0–20; mean of three runs |
| GPT-6.1 Sol | 13 | 0–20; mean of three runs |
| BTTF | 0.317 | 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. | 1111.82 | −36.69 |
| Source linesThe number of non-empty source lines. | 38 | +15.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.706 | −7.059 |
Intercept 8.87 + feature contributions = -19.679 (log-odds).
Score = sigmoid(-19.679) = 0.
| Score | 0.691 |
|---|
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. | 119.974 | −1.416 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 0 | −0.804 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 38 | +0.577 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 38 | −0.451 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 39 | −0.345 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.084 | +0.123 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 37.802 | +0.119 |
Intercept 0.07 + feature contributions = -2.128 (log-odds).
Score = sigmoid(-2.128) = 0.106.
| Score | 0.11 |
|---|
| Score | 15 |
|---|
Run 1
The code is severely compromised by an extraneous, unrelated block: a factorial computation inserted inside the isolationLevel() method before the return statement. This irrelevant code destroys logical organization, clarity of intent, reading flow, and action granularity. It also creates an unnecessary nested scope and dead code. Beyond that, the class is otherwise straightforward: constructor validation, simple getters, string composition. But the injected block makes the method ambiguous and confusing, violating the explicit evaluation criteria. This appears to be either an accidental paste error or a deliberate obfuscation. Either way, the code is unreadable as presented.
Run 2
The code is mostly readable but contains a severe flaw: an unrelated block of code (a factorial calculation) is randomly inserted inside the isolationLevel() method. This breaks the reading flow, confuses intent, and makes the method perform two unrelated actions. Structure and clarity are otherwise good — the class is logical, fields are final, and methods are simple. However, the nesting is low, action granularity is mostly one per line, and naming is clear. The accidental dead code drops the score significantly; without it, the code would score around 10–14. The inserted block has no connection to the method and would fail compilation if left as-is, further reducing readability. Overall, the code appears almost intentional in its disruption of clarity, hence the low score.
Run 3
The code is primarily unreadable due to a critical structural defect: an extraneous, non-scoped block containing a factorial calculation is embedded inside the isolationLevel() method. This block introduces unrelated logic, disrupts the natural reading flow, and makes the method's intent ambiguous. Outside of this defect, the class structure is acceptable, with clear field declarations, a straightforward constructor using requireNonNull, and simple accessor methods. However, the presence of the stray block severely compromises clarity, nesting, and action granularity. The code length is modest, but the unrelated factorial loop adds unnecessary complexity. Overall, the code fails to maintain logical organization and would confuse any reader attempting to understand the class's purpose.
Run 1
Code Structure: Fields, constructor, accessors, and string representation are logically organized, but an unrelated factorial block disrupts the isolationLevel accessor. Nesting: Mostly flat, with unnecessary block and loop nesting inside that accessor. Clarity of intent: Class and member names clearly describe a current-lag event; the unused factorial calculation has no apparent purpose. Code length: Generally concise, but the factorial calculation adds unnecessary lines. Action granularity: Statements mostly perform one action per line, making individual operations easy to follow. Reading flow: Conventional ordering supports readability, but inconsistent indentation and the abrupt factorial insertion interrupt the otherwise natural flow.
Run 2
Code Structure: The fields, constructor, accessors, and string representation are logically organized, but an unrelated factorial block disrupts the isolationLevel accessor. Nesting: Most code is flat; the unnecessary block and loop introduce avoidable nesting. Clarity of intent: Class and member names clearly convey purpose, while the unused factorial computation is unexplained and distracts from the accessor's intent. Code length: The class is concise overall, but the factorial calculation adds needless lines. Action granularity: Statements generally perform one action per line, supporting readability. Reading flow: The conventional class layout is easy to follow until the poorly indented factorial block interrupts it; inconsistent spacing around that block further weakens the flow.
Run 3
Code Structure: Fields, constructor, accessors, and string representation are logically organized, but an unrelated factorial block disrupts the isolationLevel accessor. Nesting: Mostly flat; the unnecessary block and loop introduce avoidable nesting. Clarity of intent: Class and member names clearly communicate a current-lag event, while the unused factorial calculation obscures the accessor's simple purpose. Code length: Generally concise, but the factorial block adds needless lines. Action granularity: Each statement performs one clear action, making individual operations easy to follow. Reading flow: The conventional class layout supports natural reading, but inconsistent indentation and irrelevant computation interrupt that flow.