Sample
int-f2638f2c076b-SRC
Unmodified source class
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.863 | 0–1; higher is more readable |
| Dorn | 0.272 | 0–1; higher is more readable |
| Mi | 0.468 | 0–1; higher is more readable |
| LLOC | 31 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 17.33 | 0–20; mean of three runs |
| GPT-6.1 Sol | 18 | 0–20; mean of three runs |
| BTTF | 0.581 | 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. | 2136.485 | −70.504 |
| Source linesThe number of non-empty source lines. | 134 | +53.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.609 | −6.913 |
Intercept 8.87 + feature contributions = -14.947 (log-odds).
Score = sigmoid(-14.947) = 0.
| Score | 0.863 |
|---|
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. | 135 | −3.744 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 64 | +1.477 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 133.812 | +1.461 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 64 | −1.048 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 95.548 | +0.737 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.032 | +0.633 |
| 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. | 99.993 | −0.57 |
Intercept 0.07 + feature contributions = -0.984 (log-odds).
Score = sigmoid(-0.984) = 0.272.
| Score | 0.468 |
|---|
| Score | 31 |
|---|
Run 1
The code is highly readable with clear structure and purpose. It uses flat nesting, descriptive names, and concise methods. Javadoc explains intent well, and the overall flow is logical and easy to follow.
Run 2
The code is generally well-structured with clear separation of constructors, fields, and methods. Javadoc is thorough, and comments explain non-obvious logic (like safe range handling). Nesting is minimal, and most lines perform one action. However, readability is hindered by a few aspects: the 'escape' method contains a dense conditional expression that combines multiple checks with mixed operators, reducing clarity of intent. The field declarations lack blank lines between them, making the top section slightly less scannable. The code length is justified but could benefit from helper methods for the complex condition. Overall, the code is maintainable and predictable, but not maximally readable due to the compact conditional logic and minor formatting choices.
Run 3
The code is highly readable, exhibiting clear logical organization with well-separated fields, constructors, and methods. Nesting is minimal—only shallow conditionals and loops are used, preserving a flat structure. Intent is explicit through descriptive names, thorough Javadoc, and focused method responsibilities. While some comments (e.g., GWT-specific checks) and method contracts are verbose, they provide necessary context without being excessive. Each line mostly performs one action, and the reading flow is natural: documentation first, then fields, constructors, and methods in a logical sequence. Minor deductions stem from slightly long lines in the escape method condition and verbose Javadoc, but overall it is exemplary, production-quality code.
Run 1
Code Structure: Fields, constructors, and escaping methods are logically organized with clear responsibilities. Nesting: Control flow is shallow, with at most two nested conditional levels and early returns. Clarity of intent: Descriptive names and thorough documentation explain replacement lookup, safe ranges, and subclass behavior; the compound condition in escape(String) requires slightly more attention. Code length: Implementation is concise, though constructor documentation repeats information and some field comments are redundant. Action granularity: Statements generally perform one action per line; the conventional loop header is appropriate. Reading flow: Constructor delegation and the progression from string scanning to character handling to the abstract fallback are natural. Minor distractions include tightly grouped imports, unusual type-annotation syntax, and an unresolved naming TODO.
Run 2
Code Structure: Fields, constructors, and escaping methods are logically organized, with constructor delegation avoiding duplicated initialization. Nesting: Control flow is shallow, with at most two nested conditional levels and early returns. Clarity of intent: Descriptive names and thorough documentation explain replacement lookup, safe ranges, and subclass responsibilities; the compound escape condition and unusual nullable-array syntax require some attention. Code length: Implementation is concise, although repeated constructor documentation and extensive comments slightly increase reading overhead. Action granularity: Statements generally perform one action per line, making initialization and character processing easy to follow. Reading flow: The progression from configuration to string scanning, character escaping, and the extension hook is natural. Minor distractions include sparse spacing around imports and fields, parameter reassignment when normalizing the safe range, and the unresolved naming TODO.
Run 3
Code Structure: Fields, constructors, and escaping methods are logically organized, with constructor delegation avoiding duplicated initialization. Nesting: Shallow control flow and early returns keep both escaping methods easy to follow. Clarity of intent: Descriptive names and thorough documentation explain replacement precedence, safe ranges, and subclass responsibilities; the compound escape condition and unusual nullable array syntax require some attention. Code length: Executable code is concise, though constructor documentation repeats information and some field comments are redundant. Action granularity: Statements generally perform one action per line, with checks, assignments, and returns clearly separated. Reading flow: Initialization naturally precedes string scanning, individual character handling, and the extension hook. Minor formatting issues, verbose comments, and the unresolved naming TODO slightly reduce otherwise strong readability.