Sample
int-579ad1da43e1-SRC
Unmodified source class
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 1 | 0–1; higher is more readable |
| Scalabrino | 0.986 | 0–1; higher is more readable |
| Dorn | 0.835 | 0–1; higher is more readable |
| Mi | 0.831 | 0–1; higher is more readable |
| LLOC | 9 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 19 | 0–20; mean of three runs |
| GPT-6.1 Sol | 20 | 0–20; mean of three runs |
| BTTF | 0.709 | 0–1; higher is more readable |
Views
Loading feature diagnosis…
Source regions
Feature contributions
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Source linesThe number of non-empty source lines. | 49 | +19.6 |
| Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones. | 280.461 | −9.255 |
| 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.795 | −7.192 |
Intercept 8.87 + feature contributions = 12.022 (log-odds).
Score = sigmoid(12.022) = 1.
| Score | 0.986 |
|---|
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. | 46 | −0.592 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.036 | +0.59 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 82.94 | +0.534 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 48.595 | +0.269 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 27 | +0.197 |
| 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. | 82.94 | +0.152 |
Intercept 0.07 + feature contributions = 1.618 (log-odds).
Score = sigmoid(1.618) = 0.835.
| Score | 0.831 |
|---|
| Score | 9 |
|---|
Run 1
This interface demonstrates excellent readability. The structure is logical, with a clear package declaration and well-organized method definitions. Nesting is non-existent since these are top-level default methods. Each method has a clear intent — e.g., onRefresh() calls start(), onRestart() stops then starts — and the Javadocs further clarify purpose and context. Code length is concise: no redundant logic or boilerplate. Action granularity is appropriate, with one meaningful action per line (e.g., stop(); start();). Reading flow is natural, moving from refresh to restart to pause to close, mirroring a lifecycle sequence. The only minor deduction is that some methods (onPause, onClose) have identical bodies, but this is acceptable for semantic clarity and API contract documentation.
Run 2
The code is a clean, well-structured interface with clear intent. It uses default methods to provide lifecycle hooks (onRefresh, onRestart, onPause, onClose) that delegate to start()/stop(), keeping each method flat and concise. Each action (start or stop) is on its own line, improving readability. Javadoc explains each method's purpose, context trigger, and version, aiding maintainers. There is no nesting, and the reading flow is natural—refresh, restart, pause, close—matching the ApplicationContext lifecycle. Overall, the code is highly readable and follows good practices.
Run 3
This code demonstrates excellent readability. The structure is logical: a simple interface extending Lifecycle with clear, single-purpose default methods. There is no nesting or branching, keeping the control flow completely flat. The intent is explicit — each method's name and Javadoc clearly describe its lifecycle hook purpose. The code is concise, with no unnecessary boilerplate. Each method contains only one or two simple calls, maintaining clean action granularity. The reading flow is natural, progressing from refresh through restart, pause, to close, mirroring a standard lifecycle sequence. Minor deductions are only for the absence of import details and a slight redundancy in stop()/start() calls across methods, but these do not meaningfully impact readability.
Run 1
Code Structure: A focused interface groups lifecycle callbacks in a logical order. Nesting: Methods are flat, with no conditional or nested control flow. Clarity of intent: Descriptive method names and concise Javadoc explain each callback, while start() and stop() make behavior explicit. Code length: The implementation is compact, with documentation that adds useful context rather than unnecessary verbosity. Action granularity: Each statement performs one action; onRestart() clearly separates stopping from starting. Reading flow: Consistent formatting and the refresh, restart, pause, and close sequence make the code easy to scan and understand.
Run 2
Code Structure: A small, logically organized interface groups lifecycle callbacks coherently. Nesting: Methods are flat, with no nested control flow. Clarity of intent: Descriptive method names and concise Javadoc clearly explain each callback; inheritance establishes the lifecycle contract. Code length: The implementation is concise, with documentation adding useful context rather than unnecessary bulk. Action granularity: Each statement performs one action, and restart explicitly separates stopping from starting. Reading flow: Consistent formatting and the refresh, restart, pause, close sequence make the code easy to scan and understand.
Run 3
Code Structure: The interface logically groups lifecycle callbacks with consistent documentation and formatting. Nesting: Methods are flat, with no conditional or loop nesting. Clarity of intent: Descriptive method names and Javadoc clearly explain each callback; onRestart explicitly stops before starting. Code length: The implementation is concise, and the documentation adds useful context without unnecessary complexity. Action granularity: Each executable line performs exactly one action. Reading flow: Callbacks follow a natural lifecycle sequence—refresh, restart, pause, and close—making the code easy to scan and understand.