Sample
int-0bb756ecd21c-I08
Select one of ten high-readability unrelated code templates per class
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0.884 | 0–1; higher is more readable |
| Scalabrino | 0.967 | 0–1; higher is more readable |
| Dorn | 0.849 | 0–1; higher is more readable |
| Mi | 0.77 | 0–1; higher is more readable |
| LLOC | 3 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 20 | 0–20; mean of three runs |
| GPT-6.1 Sol | 19 | 0–20; mean of three runs |
| BTTF | 0.691 | 0–1; higher is more readable |
Views
Loading feature diagnosis…
Source regions
Feature contributions
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| 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.704 | −7.055 |
| Source linesThe number of non-empty source lines. | 16 | +6.4 |
| Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones. | 187.296 | −6.181 |
Intercept 8.87 + feature contributions = 2.034 (log-odds).
Score = sigmoid(2.034) = 0.884.
| Score | 0.967 |
|---|
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. | 65.941 | +0.872 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 17 | +0.434 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 12 | −0.322 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 66 | +0.26 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.076 | +0.203 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 15.806 | −0.189 |
Intercept 0.07 + feature contributions = 1.727 (log-odds).
Score = sigmoid(1.727) = 0.849.
| Score | 0.77 |
|---|
| Score | 3 |
|---|
Run 1
The code is exceptionally readable. It is a small, highly focused interface with a clear purpose: defining operations for concurrent long addition. The package and import are minimal and correct, and the Javadoc succinctly explains the abstraction. The methods are named using standard conventions (`increment`, `add`, `sum`) and have unambiguous signatures. No nesting exists, and action granularity is ideal—one declaration per line. The structure follows standard Java interface organization, and the reading flow is natural: documentation, then method declarations in a logical order. Concise without being terse.
Run 2
The code is highly readable. It has a clear and logical structure: a package declaration, a single import, a succinct Javadoc, and a well-defined interface. Nesting is completely flat. Intent is unambiguous — the interface and method names clearly describe the purpose of adding longs and retrieving the sum. The code is concise with no unnecessary length or boilerplate. Each method is declared on its own line, with self-explanatory names (increment, add, sum), maintaining one action per line. Reading flow is natural, moving from general documentation to specific method contracts. The Javadoc, though brief, adequately communicates the interface's purpose.
Run 3
The code is exemplary in readability. It is extremely concise, containing only a focused interface with three clearly named methods. The structure is logical: package declaration, imports, Javadoc, annotation, and interface definition. There is no nesting at all. Each method declaration is on its own line, and the method names (`increment`, `add`, `sum`) unambiguously convey their purpose. The Javadoc and `@GwtCompatible` annotation add useful context without clutter. The reading flow follows standard Java conventions perfectly.
Run 1
Code Structure: A logically organized interface with a package declaration, import, documentation, annotation, and three related methods. Nesting: No nested logic; all declarations are flat. Clarity of intent: The documentation and method names clearly convey accumulation and retrieval, though add(long x) could use a more descriptive parameter name and sum() could document concurrency semantics. Code length: Minimal and appropriate for the interface. Action granularity: Each method declaration occupies its own line. Reading flow: Natural top-to-bottom progression, with blank lines separating methods; a blank line between the package and import would slightly improve formatting.
Run 2
Code Structure: A small, logically organized interface with package, import, documentation, annotation, and method declarations. Nesting: No nested control flow or unnecessary structural depth. Clarity of intent: The documentation and method names clearly describe adding long values and retrieving their sum, though the parameter name 'x' is generic and concurrency semantics are unspecified. Code length: Concise, with no redundant implementation or declarations. Action granularity: Each method declaration occupies its own line. Reading flow: Natural top-to-bottom organization and blank lines between methods make scanning easy; a blank line after the package declaration would slightly improve formatting.
Run 3
Code Structure: The package, import, documentation, annotation, and interface are logically organized. Nesting: There is only one shallow interface scope. Clarity of intent: The documentation and method names clearly convey concurrent long accumulation, though the parameter name 'x' is generic and concurrency semantics are not detailed. Code length: The interface is concise with no unnecessary implementation or boilerplate. Action granularity: Each method declaration occupies its own line and expresses one operation. Reading flow: The conventional Java layout and spacing between methods make the code easy to scan; a blank line after the package declaration would slightly improve separation.