Sample
int-241dcdf23fba-I09
Select one of ten low-readability unrelated code templates per class
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0.135 | 0–1; higher is more readable |
| Scalabrino | 0.871 | 0–1; higher is more readable |
| Dorn | 0.155 | 0–1; higher is more readable |
| Mi | 0.039 | 0–1; higher is more readable |
| LLOC | 28 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 17.33 | 0–20; mean of three runs |
| GPT-6.1 Sol | 16 | 0–20; mean of three runs |
| BTTF | 0.269 | 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. | 2182.322 | −72.017 |
| Source linesThe number of non-empty source lines. | 170 | +68 |
| 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.475 | −6.712 |
Intercept 8.87 + feature contributions = -1.859 (log-odds).
Score = sigmoid(-1.859) = 0.135.
| Score | 0.871 |
|---|
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. | 145 | −4.098 |
| 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. | 148.988 | −2.645 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 87 | +2.272 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 169.947 | +1.966 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 148.971 | +1.599 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 87 | −1.576 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.023 | +0.716 |
Intercept 0.07 + feature contributions = -1.695 (log-odds).
Score = sigmoid(-1.695) = 0.155.
| Score | 0.039 |
|---|
| Score | 28 |
|---|
Run 1
The code is a well-structured Java interface with clear purpose and excellent documentation. It maintains flat nesting throughout, with each method performing a single, well-defined action. The interface is organized logically, grouping related methods (config management, target states, session keys, restart requests) and includes a nested UpdateListener interface with clear callback definitions. Reading flow is natural and predictable. However, the score is reduced due to a suspicious obfuscated empty do-while loop in the claimWritePrivileges() default method, which appears to be dead code or accidental obfuscation. This harms clarity and raises concerns about code quality. The javadoc comments are thorough and helpful, though slightly verbose in places. Overall, the code demonstrates strong readability with good separation of concerns, clear naming conventions, and appropriate documentation, but the odd obfuscated loop is a notable flaw.
Run 2
The code is an interface with clear, well-documented methods, making its intent highly readable. The structure is logical, grouping related methods (configuration, target state, session key, restart requests) together. Nesting is minimal and appropriate. Javadoc comments thoroughly explain each method's purpose and parameters. The one obfuscated line inside the default method reduces clarity slightly but is otherwise an isolated anomaly. Overall, the code is concise, follows natural reading flow, and adheres to one-action-per-line principles.
Run 3
The code is highly readable as a clean interface definition. Structure is logical, with clear separation between methods and the nested UpdateListener interface. Documentation is thorough with consistent Javadoc. Nesting is minimal, limited to the single nested interface. Intent is clear throughout - each method name and signature communicates its purpose. The code is concise for what it represents, with no unnecessary complexity. Action granularity is appropriate for an interface (one method declaration per logical action). Reading flow is natural and follows consistent ordering. The only notable issue is an obfuscated no-op block in claimWritePrivileges() that appears to be accidentally included code, which slightly breaks the otherwise clean style and clarity of intent.
Run 1
Code Structure: The interface is logically organized, with configuration operations and a separate nested listener interface. Nesting: Mostly flat declarations; the default method adds an unnecessary block and loop. Clarity of intent: Descriptive method names and detailed Javadocs clarify most responsibilities, but claimWritePrivileges contains opaque variable names and pointless operations despite being documented as a no-op. Code length: Appropriate for the API's scope, though some comments are verbose and the default implementation is unnecessary. Action granularity: Most declarations occupy individual lines, but the default method compresses multiple declarations, assignments, and control flow onto one line. Reading flow: Consistent documentation and spacing make the interface easy to scan, interrupted sharply by the obfuscated default-method body.
Run 2
Code Structure: The interface is logically organized, with storage operations followed by a cohesive nested listener interface. Nesting: Mostly flat declarations; the unnecessary block and do-while loop in claimWritePrivileges add localized complexity. Clarity of intent: Descriptive method names and Javadocs clearly explain most responsibilities, but opaque variable names and meaningless operations obscure the documented no-op implementation. Code length: Appropriate for the API and its documentation, except for the redundant implementation block and some lengthy comment lines. Action granularity: Most declarations occupy separate lines, but claimWritePrivileges compresses multiple declarations, assignments, and control-flow constructs onto one line. Reading flow: Consistent spacing and documentation make the interface easy to scan; the poorly formatted, obfuscated default method sharply interrupts that flow.
Run 3
Code Structure: The interface is logically organized, with storage operations followed by a dedicated update-listener interface. Nesting: Mostly flat declarations; claimWritePrivileges introduces an unnecessary block and loop. Clarity of intent: Descriptive method names and thorough Javadocs make most responsibilities clear, but obfuscated variables and meaningless operations obscure the default method's documented no-op behavior. Code length: Appropriate for the API, though some documentation is verbose and the default implementation adds needless code. Action granularity: Most declarations occupy individual lines, but the entire default-method block compresses multiple declarations and operations onto one line. Reading flow: Consistent spacing and documentation generally support natural scanning; the unindented, compressed block sharply interrupts that flow.