Sample
int-4b95f2996fa1-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.81 | 0–1; higher is more readable |
| Dorn | 0.29 | 0–1; higher is more readable |
| Mi | 0.195 | 0–1; higher is more readable |
| LLOC | 26 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 11 | 0–20; mean of three runs |
| GPT-6.1 Sol | 14.33 | 0–20; mean of three runs |
| BTTF | 0.53 | 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. | 2048.244 | −67.592 |
| Source linesThe number of non-empty source lines. | 124 | +49.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.84 | −7.261 |
Intercept 8.87 + feature contributions = -16.383 (log-odds).
Score = sigmoid(-16.383) = 0.
| Score | 0.81 |
|---|
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. | 125 | −3.39 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 81 | +2.065 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 81 | −1.438 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 123.694 | +1.319 |
| 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. | 109.984 | −0.993 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 109.984 | +0.97 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.046 | +0.5 |
Intercept 0.07 + feature contributions = -0.897 (log-odds).
Score = sigmoid(-0.897) = 0.29.
| Score | 0.195 |
|---|
| Score | 26 |
|---|
Run 1
The code starts as a well-structured exception class with clear Javadoc, logical constructors, and sensible field usage. However, readability is severely damaged by a stray, unrelated temperature-comparison code block inserted inside the getIdentifier() method. This breaks action granularity, reading flow, and clarity of intent. Additionally, the getIdentifier() method has unnecessary extra blank lines and braces. Nesting is mostly flat, and method lengths are reasonable, but the inclusion of irrelevant logic makes the overall purpose ambiguous and confusing. Fixing that section would significantly improve the score.
Run 2
The code is generally well-structured for readability, featuring clear naming, thorough Javadoc, and flat methods with low nesting. However, it contains a critical, confusing block of unrelated code inside getIdentifier(), severely breaking logical organization and reading flow. This stray code defines temperature variables and an if-statement, completely disconnected from the exception's purpose, making the method ambiguous. While constructors are clear and documentation is strong, this insertion means the code fails to maintain clear intent throughout. The rest of the class is concise and appropriately granular, with one action per line mostly, but the erroneous block undermines overall readability.
Run 3
The code is generally well-structured with logical organization, clear Javadoc comments, and sensible constructor overloading typical of a Spring exception class. However, there is a critical readability issue: an extraneous block of unrelated temperature variable code appears inside the getIdentifier() method before the return statement, making the purpose ambiguous and the reading flow disorganized. Apart from this, the code is flat, uses one action per line, and is fairly concise. The intrusion of the unrelated code significantly lowers the overall score despite the otherwise clean implementation.
Run 1
Code Structure: Fields, constructors, and getters are logically organized, but an unrelated temperature-calculation block disrupts getIdentifier(). Nesting: Mostly flat, with only shallow conditionals; the unnecessary block adds avoidable nesting. Clarity of intent: Descriptive names, documentation, and nullability annotations clearly explain the exception API, while the unused temperature calculation creates confusion. Code length: Constructor delegation keeps implementation concise, though repeated documentation and the irrelevant block add length. Action granularity: Statements generally perform one action per line, making individual operations easy to follow. Reading flow: Consistent formatting and predictable member ordering support natural reading until the poorly integrated temperature block abruptly interrupts the getter.
Run 2
Code Structure: Fields, constructors, and accessors are logically grouped, but an unrelated temperature-calculation block disrupts getIdentifier(). Nesting: Mostly flat; the extra block and its conditional add modest, unnecessary nesting. Clarity of intent: Descriptive names, Javadoc, and nullability annotations clarify the exception's purpose, but the unused temperature calculation is confusing and unrelated. Code length: Constructor delegation keeps implementation concise, although repeated documentation, similar overloads, and the extraneous block add length. Action granularity: Statements generally perform one action per line, making individual operations easy to follow. Reading flow: Consistent formatting and conventional member ordering support natural reading until the abruptly inserted, inconsistently indented temperature block breaks the flow.
Run 3
Code Structure: Fields, constructors, and getters are logically organized, but an unrelated temperature-calculation block disrupts getIdentifier(). Nesting: Generally shallow; the extra block and conditional add unnecessary nesting. Clarity of intent: Descriptive names, documentation, and nullability annotations make the exception's purpose clear, while the unused temperature calculation is confusing. Code length: Reasonably concise for the supported constructor overloads, though repeated documentation and message construction add some verbosity, and the unrelated block is unnecessary. Action granularity: Statements generally perform one action per line, supporting readability. Reading flow: Consistent ordering and constructor delegation create a natural flow, but the temperature block's inconsistent indentation and irrelevant logic sharply interrupt it.