Sample
int-c0ac116ff9be-I09
Select one of ten low-readability unrelated code templates per class
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0.046 | 0–1; higher is more readable |
| Scalabrino | 0.853 | 0–1; higher is more readable |
| Dorn | 0.766 | 0–1; higher is more readable |
| Mi | 0.382 | 0–1; higher is more readable |
| LLOC | 15 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 18.33 | 0–20; mean of three runs |
| GPT-6.1 Sol | 19 | 0–20; mean of three runs |
| BTTF | 0.687 | 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. | 1135.35 | −37.467 |
| 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.828 | −7.241 |
Intercept 8.87 + feature contributions = -3.038 (log-odds).
Score = sigmoid(-3.038) = 0.046.
| Score | 0.853 |
|---|
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. | 57 | +1.234 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 98.699 | +0.788 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 81.832 | +0.734 |
| 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.88 | −0.565 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.053 | +0.431 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
Intercept 0.07 + feature contributions = 1.188 (log-odds).
Score = sigmoid(1.188) = 0.766.
| Score | 0.382 |
|---|
| Score | 15 |
|---|
Run 1
The code is highly readable due to its logical structure and clear intent. The interface declaration is straightforward, with a concise yet informative Javadoc explaining the behavior and contract deviations. Method declarations are flat, with no nesting, and each method is presented on a single line, making the structure easy to scan. The use of @Override and @CanIgnoreReturnValue annotations is consistent, and the brief comments for each method clarify the intended use when return values are ignored. Imports are organized and limited. The code avoids unnecessary length, with only essential methods and documentation. Reading flow is natural, grouping related read methods logically. Overall, this is an exemplary implementation of a well-documented, minimal interface.
Run 2
The code is highly readable. The structure is logical, clearly defining an interface that extends DataInput. The class-level Javadoc is exemplary, explaining purpose, behavior differences, and implications. Method declarations are concise and follow a consistent pattern. The nesting is minimal, mainly from the interface scope. Each method is on its own line with clear @Override annotations, and the use of @CanIgnoreReturnValue with brief comments directly explains intent for each method. Reading flow is natural, starting with a thorough overview, then simple read methods, followed by more specialized ones. Minor deductions: the comments on skipBytes and readLine could be slightly more formal, but this does not significantly impact readability. Overall, it is very clear, maintainable, and well-documented.
Run 3
The code is highly readable due to its clear, logical structure as a simple interface extending DataInput. It has almost no nesting, with each method declared on a single flat level. Intent is well-documented via the class-level Javadoc (explaining the IOException contract difference) and concise per-method @CanIgnoreReturnValue comments clarifying usage. Code length is minimal—each method signature is only one line and avoids unnecessary boilerplate. Action granularity is excellent: one annotation, one comment, and one method declaration per line, maintaining natural top-to-bottom reading flow. Minor deductions are for the import of Nullable (which may be unnecessary) and the slightly verbose Javadoc warning paragraph, but these do not meaningfully hinder readability.
Run 1
Code Structure: The interface is logically organized, with related read operations grouped consistently. Nesting: The code is flat, with no nested control flow. Clarity of intent: Familiar DataInput method names and clear documentation explain the interface's purpose, unchecked failure behavior, and return-value annotations. Code length: The declarations are concise; repeated annotations and comments add some visual bulk but convey useful contract details. Action granularity: Each method declaration occupies its own line, with annotations clearly associated with it. Reading flow: Consistent spacing and ordering make the interface easy to scan. Minor readability limitations include abbreviated parameter names and repetitive 'to skip some bytes' comments.
Run 2
Code Structure: A well-organized interface with consistently formatted method declarations and logical grouping of related reads. Nesting: Flat, with no nested control flow. Clarity of intent: The interface name, standard DataInput method names, and class documentation clearly explain its purpose and exception behavior; comments clarify return-value handling. Code length: Concise for the API provided, though repeated annotations and skip comments add minor visual repetition. Action granularity: Each method declaration occupies its own line, with annotations clearly separated; there are no combined operations. Reading flow: Predictable ordering and blank lines make scanning easy. Minor weaknesses include abbreviated parameter names and limited spacing around the package and imports.
Run 3
Code Structure: The interface is logically organized, grouping bulk reads, skipping, and typed reads consistently. Nesting: Completely flat apart from the interface scope. Clarity of intent: The Javadoc clearly explains the purpose and exception-contract difference; annotations and comments clarify return-value handling. Code length: Concise for the API exposed, with necessary method declarations and modest annotation repetition. Action granularity: Each declaration occupies its own line, with no bundled operations. Reading flow: Consistent formatting and spacing make the method list easy to scan. Minor readability weaknesses include terse parameter names (b, off, len, n), repetitive comments, and the lack of separation between the package declaration and imports.