Sample
int-4a063e532a75-SRC
Unmodified source class
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.64 | 0–1; higher is more readable |
| Dorn | 0.572 | 0–1; higher is more readable |
| Mi | 0.046 | 0–1; higher is more readable |
| LLOC | 29 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 17 | 0–20; mean of three runs |
| GPT-6.1 Sol | 18 | 0–20; mean of three runs |
| BTTF | 0.473 | 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. | 2824.481 | −93.208 |
| Source linesThe number of non-empty source lines. | 86 | +34.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.873 | −7.309 |
Intercept 8.87 + feature contributions = -57.247 (log-odds).
Score = sigmoid(-57.247) = 0.
| Score | 0.64 |
|---|
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. | 150.931 | −2.728 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 87 | −2.044 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 75 | +1.857 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 150.977 | +1.631 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 85.862 | +0.79 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.065 | +0.313 |
Intercept 0.07 + feature contributions = 0.288 (log-odds).
Score = sigmoid(0.288) = 0.572.
| Score | 0.046 |
|---|
| Score | 29 |
|---|
Run 1
The code is well-structured and readable. Class hierarchy and static initialization are clear, with logical organization. Nesting is minimal, with only one try-catch block in the properties method. The intent is clearly documented with Javadoc and inline comments explaining the override precedence rules. Code length is appropriate for the functionality. Action granularity is mostly good, with one operation per line. Reading flow is natural, with methods in a logical order. Minor deductions: the static initializer could be simplified with a method, and the try-catch variable naming ('swallow') is slightly unconventional but acceptable. Overall, this is highly maintainable code.
Run 2
The code is well-structured and readable. It follows a clear logical organization: constants, fields, constructor, then overridden methods. Nesting is minimal, with only one level inside the properties method. Intent is mostly clear, especially the static initializer for default overrides and the documented retention logic. Action granularity is appropriate, with one operation per line in most places. The reading flow is natural, though the long putAll chains in properties() could be slightly more explicit. The main weakness is the try-catch block with a swallowed ArithmeticException — the variable name 'swallow' clarifies intent, but the logic remains slightly dense. Field visibility and missing final modifiers on class/fields slightly reduce clarity. Overall, the code is concise, well-documented, and maintainable with only minor readability improvements possible.
Run 3
The code is highly readable with clear structure and intent. It has a logical organization, with constants, fields, constructor, and overridden methods well-separated. Nesting is minimal, with early returns in equals() and only one level of conditional logic in properties(). The purpose is unambiguous, supported by meaningful Javadoc and variable names. Code length is appropriate—no excessive verbosity or duplication. Action granularity is mostly one action per line, though the long put() line in the static block and chained equals() conditions slightly reduce readability. Reading flow is natural, guiding the reader from setup through configuration to standard object methods. Minor improvements could include breaking the long static initialization line and extracting the overflow handling into a helper method.
Run 1
Code Structure: Well-organized class with defaults, constructor, configuration logic, and standard object methods clearly separated. Nesting: Shallow overall; only the retention check contains a nested try/catch. Clarity of intent: Descriptive names and documentation explain configuration precedence and retention adjustment, although inherited fields require external context and the exception variable 'swallow' is unconventional. Code length: Appropriately concise, with modest boilerplate for equals, hashCode, and toString. Action granularity: Statements generally perform one action per line; long configuration expressions slightly reduce scanability. Reading flow: Natural progression from initialization to behavior and utility methods, aided by whitespace and early returns. Minor drawbacks include several long lines, limited import spacing, and unnecessarily boxed primitive comparisons in equals.
Run 2
Code Structure: Well-organized class with distinct initialization, configuration, and standard object methods. Nesting: Mostly flat, with only a shallow if and try/catch in properties. Clarity of intent: Descriptive names and comments explain configuration precedence, retention adjustment, and overflow handling; inherited fields require some external context. Code length: Appropriately concise, though standard object-method boilerplate adds length. Action granularity: Each statement performs a clear action, with no compressed multi-statement lines. Reading flow: Natural progression from defaults and constructor to behavior and object methods. Minor readability issues include long declarations and configuration lines, slightly awkward documentation, and using Objects.equals for primitive retention values rather than direct comparison.
Run 3
Code Structure: Well-organized class with defaults, state, construction, configuration logic, and standard object methods clearly separated. Nesting: Shallow overall; only the retention calculation introduces a try/catch inside an if. Clarity of intent: Descriptive names and documentation explain configuration precedence and retention behavior, although the overflow fallback could use an explanatory comment. Code length: Appropriately concise, with conventional equals, hashCode, and toString boilerplate. Action granularity: Each statement performs one clear action; long expressions slightly reduce scanability. Reading flow: Initialization and configuration merging follow a natural sequence, and equals uses clear early returns. Minor readability drawbacks include long lines, sparse spacing around imports, and the vague exception variable name 'swallow'.