Sample
int-2b3c92ff8316-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.867 | 0–1; higher is more readable |
| Dorn | 0.424 | 0–1; higher is more readable |
| Mi | 0.265 | 0–1; higher is more readable |
| LLOC | 21 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 12.67 | 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. | 1865.919 | −61.575 |
| Source linesThe number of non-empty source lines. | 82 | +32.8 |
| 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.844 | −7.267 |
Intercept 8.87 + feature contributions = -27.172 (log-odds).
Score = sigmoid(-27.172) = 0.
| Score | 0.867 |
|---|
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. | 83 | −1.902 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 52 | +1.061 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 52 | −0.772 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 81.851 | +0.734 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 89.301 | +0.636 |
| 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. | 100 | −0.57 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.052 | +0.437 |
Intercept 0.07 + feature contributions = -0.305 (log-odds).
Score = sigmoid(-0.305) = 0.424.
| Score | 0.265 |
|---|
| Score | 21 |
|---|
Run 1
The code is generally well-structured and readable, with clear method names and Javadoc. However, it contains an unexplained, dead code block inside newProxy() — an unrelated local computation (startingPosition, endingPosition, travelDistance) that serves no purpose and disrupts reading flow. This block is neither commented nor related to the method's intent, making the code confusing. Otherwise, nesting is minimal, actions are mostly one per line, and the utility class follows standard conventions.
Run 2
The code is generally well-structured and documented, with clear intent and good use of helper methods. However, there is a significant readability issue: the `newProxy` method contains an extraneous block of code that calculates `travelDistance` and serves no purpose related to the method's functionality. This dead code introduces confusion and disrupts the reading flow. Additionally, the nested `try-catch` inside the `initialize` method is slightly more complex than necessary but remains acceptable. Overall, the code is mostly readable, but the unrelated code block in `newProxy` lowers its score substantially, as it violates clarity of intent and action granularity.
Run 3
The code is generally well-structured with clear Javadoc and meaningful method names, but there is a significant readability problem: a stray block of unrelated code (startingPosition, endingPosition, travelDistance) appears inside the newProxy method. This block has no connection to the method's purpose, disrupts the reading flow, and violates the 'one action per line' and 'clarity of intent' criteria. Nesting is mostly flat and acceptable, with a simple try-catch in initialize(). The getPackageName methods are concise and clear. The newProxy method, aside from the stray block, is readable and follows logical steps. Overall, the code would be much more readable without the unrelated block, which lowers the score substantially.
Run 1
Code Structure: Utility methods are logically organized, but newProxy contains an unrelated distance-calculation block that disrupts cohesion. Nesting: Generally shallow; initialize uses a reasonable loop with try/catch, while the extraneous block adds unnecessary nesting. Clarity of intent: Descriptive names and Javadoc clearly explain the reflection utilities, but the unused travelDistance calculation has no apparent purpose. Code length: Most methods are concise; the unrelated block adds unnecessary lines. Action granularity: Statements generally perform one action per line, and the multiline proxy creation remains readable. Reading flow: Method ordering and delegation are natural, but inconsistent indentation and the unexpected arithmetic block interrupt the flow. Overall, the reflection logic is readable, with a significant localized distraction.
Run 2
Code Structure: Small, logically separated utility methods are undermined by an unrelated distance-calculation block inside newProxy. Nesting: Mostly shallow; initialize uses reasonable loop/try-catch nesting, while the extraneous block adds unnecessary nesting. Clarity of intent: Descriptive method names and thorough Javadocs clarify reflection operations, but the unused distance calculation has no apparent purpose. Code length: Core implementations are concise; the irrelevant block unnecessarily increases length. Action granularity: Statements generally perform one action per line, and the multiline proxy invocation remains understandable. Reading flow: Method ordering and documentation support natural reading, but the poorly indented injected block abruptly interrupts newProxy and distracts from its validation and proxy creation.
Run 3
Code Structure: Most utilities are logically separated into small methods, but the unrelated travel-distance block disrupts newProxy. Nesting: Generally shallow; initialize has reasonable loop/try-catch nesting, while the extra block and conditional in newProxy add unnecessary depth. Clarity of intent: Descriptive method names and detailed Javadocs explain reflection operations well, but the unused distance calculation has no apparent purpose. Code length: Core implementations are concise; the unrelated block adds avoidable length. Action granularity: Statements generally perform one action per line, and the multiline proxy construction remains readable. Reading flow: Method grouping and validation-before-construction provide a natural flow, interrupted by the poorly indented, irrelevant block.