Sample
int-37c188cbc8b1-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.757 | 0–1; higher is more readable |
| Dorn | 0.546 | 0–1; higher is more readable |
| Mi | 0.603 | 0–1; higher is more readable |
| LLOC | 26 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 9.67 | 0–20; mean of three runs |
| GPT-6.1 Sol | 13.33 | 0–20; mean of three runs |
| BTTF | 0.263 | 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. | 1824.395 | −60.205 |
| Source linesThe number of non-empty source lines. | 61 | +24.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.631 | −6.947 |
Intercept 8.87 + feature contributions = -33.882 (log-odds).
Score = sigmoid(-33.882) = 0.
| Score | 0.757 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Indentation frequencyHow rapidly indentation changes from line to line. | 58 | +1.269 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 62 | −1.159 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 58 | −0.91 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 97 | +0.761 |
| 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. | 96.935 | −0.441 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 60.816 | +0.44 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.081 | +0.156 |
Intercept 0.07 + feature contributions = 0.186 (log-odds).
Score = sigmoid(0.186) = 0.546.
| Score | 0.603 |
|---|
| Score | 26 |
|---|
Run 1
The code is generally readable but contains a severe structural issue: a misplaced block of unrelated code (an even-number counting loop) inserted inside maybeRethrowFirstException(), breaking the method flow and clarity. The class structure is mostly logical with a clear purpose and single responsibility, but this anomaly creates confusion. Nesting is minimal, mostly flat conditionals. Clarity of intent is good at the class level, with Javadoc explaining purpose and logging statements aiding understanding. However, the stray block makes the code ambiguous and disrupts action granularity, as the loop performs multiple actions in lines unrelated to the method. Reading flow is natural until encountering the unexpected block, which disorients the reader. Method lengths are concise, but the presence of the unrelated code inflates some sections unnecessarily. Overall, the code would be readable if not for the structural error.
Run 2
The code is poorly readable due to a major structural defect: a stray, unrelated code block (the evenNumberCount loop) is inserted inside the maybeRethrowFirstException() method. This breaks logical organization, reading flow, and intent. Additionally, the code has moderate nesting issues, a long and repetitive conditional expression, and multiple actions packed into single lines (e.g., log + FaultHandlerException construction). While the class purpose and most methods are clear, the injected junk block makes the code confusing and disorganized. Overall, it fails basic structural clarity and requires cleanup.
Run 3
The code is mostly straightforward, but it contains a severe structural flaw: an unrelated block of code (counts even numbers) is accidentally inserted inside the maybeRethrowFirstException method. This breaks logical organization, intent, and reading flow. Nesting is minimal and most methods are short, with one action per line, which helps readability. Naming is clear and the class has a concise purpose. However, the repeated null checks for 'cause' make handleFault slightly verbose, and the inserted unrelated loop makes the overall code confusing and unreadable. Without the erroneous block, the code would score higher (around 17). The accidental nesting and dead code significantly lower the score due to ambiguity and poor structure.
Run 1
Code Structure: The class is logically organized into focused methods, but an unrelated counting block disrupts maybeRethrowFirstException. Nesting: Most code is shallow; the extraneous block adds unnecessary nesting with a loop and conditional. Clarity of intent: Naming and documentation clearly explain fault capture and rethrow behavior, but evenNumberCount is unused and its purpose is ambiguous. Code length: Generally concise, though the counting block adds needless length and the exception construction is somewhat cumbersome. Action granularity: Statements mostly perform one action per line, making individual operations easy to follow. Reading flow: Method ordering is natural, but inconsistent indentation in the inserted block and the multiline ternary interrupt otherwise straightforward reading.
Run 2
Code Structure: The class is logically organized into fields, a constructor, fault handling, and accessors, but an unrelated counting block disrupts maybeRethrowFirstException. Nesting: Most methods are shallow; the counting block adds unnecessary block, loop, and conditional nesting. Clarity of intent: Descriptive method names and the class comment explain fault handling, while the unused evenNumberCount has no apparent purpose. Code length: Generally concise, but the counting block is unnecessary and exception construction is slightly cumbersome. Action granularity: Statements generally perform one action per line, with conventional loop syntax. Reading flow: The main fault-handling sequence is natural, but inconsistent indentation and the unrelated block interrupt it; the multiline ternary also requires extra attention.
Run 3
Code Structure: The class is logically organized into fields, constructor, and focused methods, but an unrelated counting block disrupts maybeRethrowFirstException. Nesting: Most code is shallow; the counting block introduces unnecessary block, loop, and conditional nesting. Clarity of intent: Descriptive names and documentation make fault handling clear, but the unused evenNumberCount has no apparent purpose. Code length: Generally concise, with avoidable length from the counting block and slightly verbose exception construction. Action granularity: Statements generally perform one action per line, although the ternary combines conditional selection with exception construction. Reading flow: Method ordering is natural, but inconsistent indentation in the inserted block and the multiline ternary interrupt smooth reading.