Sample
int-a2a09193c42f-I11
Split eligible integer literals into pairs of short-named intermediate variables
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.822 | 0–1; higher is more readable |
| Dorn | 0.747 | 0–1; higher is more readable |
| Mi | 0.195 | 0–1; higher is more readable |
| LLOC | 21 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 18.33 | 0–20; mean of three runs |
| GPT-6.1 Sol | 18 | 0–20; mean of three runs |
| BTTF | 0.661 | 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. | 1829.317 | −60.367 |
| Source linesThe number of non-empty source lines. | 115 | +46 |
| 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.834 | −7.251 |
Intercept 8.87 + feature contributions = -12.749 (log-odds).
Score = sigmoid(-12.749) = 0.
| Score | 0.822 |
|---|
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. | 109 | −2.823 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 72 | +1.753 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 114.55 | +1.191 |
| 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.94 | −0.991 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 109.966 | +0.97 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.044 | +0.515 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
Intercept 0.07 + feature contributions = 1.083 (log-odds).
Score = sigmoid(1.083) = 0.747.
| Score | 0.195 |
|---|
| Score | 21 |
|---|
Run 1
The code is highly readable, following clear structure and best practices. It uses a logical class organization with grouped fields, multiple well-documented constructors, and clearly named accessor methods. Nesting is minimal; the only conditional logic appears in short, flat helper methods. Each constructor and method has a distinct, single responsibility. Action granularity is excellent—each line performs one clear operation or assignment. Javadoc comments thoroughly explain intent, parameters, and edge cases, making the ambiguity low. The code length is appropriate for the class's purpose, with concise implementation and no redundancy. Reading flow is natural: class documentation, fields, constructors in order of increasing specificity, then getters. Null-safety annotations improve clarity. Minor deductions are only theoretical, such as the slight duplication between Class-based and String-based constructors, but overall this is exemplary readable production code.
Run 2
The code exhibits a clear, logical structure with a predictable exception hierarchy and well-organized constructors. Nesting is minimal, with only simple conditional checks in getters. The intent is unambiguous—each constructor and accessor has a distinct purpose and is documented with Javadoc. Code length is appropriate for the functionality provided, avoiding unnecessary verbosity while maintaining clarity. Action granularity is mostly one action per line, though constructor delegation lines are slightly longer. Reading flow is natural: fields, constructors, then accessors, each with explanatory comments. Minor deductions: parameter lists in multi-arg constructors could be slightly more compact, and the class-level @SuppressWarnings could merit a brief comment. Overall, this is highly readable, maintainable framework code.
Run 3
The code demonstrates excellent readability. Structure is logical with clear separation of fields, constructors, and methods. Nesting is minimal—only simple conditional checks are present, and they are flat. Intention is unambiguous, supported by concise Javadocs on all public APIs. The class is reasonably concise for an exception type with multiple constructor variants. Each action is consistently one per line, and reading flow follows a natural top-to-bottom pattern. Minor deductions are for slight duplication across similar constructors, but this is common and acceptable in exception classes.
Run 1
Code Structure: Fields, grouped constructor overloads, and accessors are logically organized. Nesting: Methods are flat, with only one simple conditional. Clarity of intent: Descriptive names, Javadoc, and nullability annotations clearly explain the exception's purpose; storing either a Class or String in an Object field slightly obscures its representation. Code length: Implementations are concise, although repeated constructor documentation and message construction add some redundancy. Action granularity: Each assignment and return performs a single clear action; multiline constructor calls remain easy to follow. Reading flow: Consistent formatting and predictable ordering support natural reading, with minor interruptions from lengthy signatures and repeated overloads.
Run 2
Code Structure: Fields, constructors, and accessors are logically grouped, with constructor delegation reducing duplication. Nesting: Almost entirely flat, with only one simple conditional. Clarity of intent: Descriptive names, Javadoc, and nullability annotations clearly explain the exception's purpose and available metadata; storing either a Class or String in an Object field slightly obscures the representation. Code length: Appropriate for the supported overloads, though repeated constructor documentation and message construction add some verbosity. Action granularity: Each statement performs a single clear action; multiline constructor calls remain easy to follow. Reading flow: Consistent formatting and a natural progression from state to initialization to accessors make the class easy to scan. Long message expressions and similar overloads introduce minor reading friction.
Run 3
Code Structure: Fields, constructors, and accessors are logically grouped, with constructor delegation reducing duplication. Nesting: Almost entirely flat, with only one simple conditional. Clarity of intent: Descriptive names, Javadoc, and nullability annotations clearly communicate the exception's purpose and API behavior; storing either a Class or String in an Object field slightly obscures its representation. Code length: Appropriate for the supported overloads, though repeated documentation and message construction add some verbosity. Action granularity: Each assignment and return performs one clear action; multiline constructor calls remain easy to follow. Reading flow: Consistent formatting and a natural progression from initialization to retrieval make the class easy to scan, with minor friction from long constructor signatures and message expressions.