Sample
int-645c50958ad7-I03
Replace method, parameter, and local names with length-matched, meaningful but unrelated names
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.9 | 0–1; higher is more readable |
| Dorn | 0.575 | 0–1; higher is more readable |
| Mi | 0.45 | 0–1; higher is more readable |
| LLOC | 11 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 2.67 | 0–20; mean of three runs |
| GPT-6.1 Sol | 15 | 0–20; mean of three runs |
| BTTF | 0.595 | 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. | 990.93 | −32.701 |
| Source linesThe number of non-empty source lines. | 30 | +12 |
| 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.628 | −6.942 |
Intercept 8.87 + feature contributions = -18.772 (log-odds).
Score = sigmoid(-18.772) = 0.
| Score | 0.9 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 0 | −0.804 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| 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. | 77.968 | +0.363 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 29 | +0.266 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.091 | +0.061 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 31 | −0.061 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 29.899 | +0.008 |
Intercept 0.07 + feature contributions = 0.301 (log-odds).
Score = sigmoid(0.301) = 0.575.
| Score | 0.45 |
|---|
| Score | 11 |
|---|
Run 1
The code is essentially unreadable due to fundamental structural and naming failures. Although nesting is shallow and there is one action per line, the code fails basic clarity tests: the class implements ConfigDef.Validator but the method names (saveBalance, sendUser) suggest unrelated functionality (financial transactions, user messaging) rather than validating configuration. Parameter names (mode, batch, nextItem, age) are equally misleading. The method saveBalance mixes concerns by both validating and returning early on blank input, making the intent ambiguous. There is a logical disconnect between reading the method signature and its actual behavior, forcing the reader to reconstruct context from implementation details. While the exception handling is technically adequate and the code is concise, the pervasive use of nonsensical identifiers renders the structure disorganized and the reading flow unnatural. The code requires significant mental translation to understand its true purpose. A complete renaming and restructuring of methods would be necessary to achieve an acceptable readability score.
Run 2
The code is functionally illogical and misleading. The method names `saveBalance` and `sendUser` bear no relation to their actual implementations, suggesting either pasted method signatures or corrupted refactoring. Variable names like `batch`, `mode`, `nextItem`, and `age` are semantically disconnected from their purpose (a string endpoint validation). The logic in `saveBalance` is tangled: it validates a string type, allows blank values, then delegates to `HostInfo.buildFromEndpoint` with a caught `ConfigException` used as `age`. Error handling is unclear and obfuscated. The class name implies an application config validator but the method names contradict that intent. While nesting is shallow and line length is reasonable, the severe mismatch in naming, unclear purpose, and confusing exception handling make this code extremely hard to read or maintain.
Run 3
The code is difficult to read due to several major issues. The method names and parameters are misleading (e.g., 'saveBalance' for validation, 'batch' for a value being validated), obscuring intent. The class name and method names do not match their actual behavior, creating confusion. There is no proper indentation for the class body. The logic is structurally simple with minimal nesting, but the obfuscated naming and incorrect annotations override any structural clarity. The method 'sendUser' returns a description string unrelated to sending users. Overall, the code appears to be either intentionally obfuscated or the result of a poor refactoring, making it unreadable despite its short length.
Run 1
Code Structure: The small class cleanly separates validation logic from the descriptive string. Nesting: Shallow conditionals and an early return keep nesting minimal. Clarity of intent: Type checking and endpoint validation are understandable, but misleading names such as saveBalance, sendUser, batch, nextItem, and age obscure their actual roles. Code length: Concise, with no obvious unnecessary logic. Action granularity: Each statement performs a single clear action. Reading flow: Validation proceeds naturally from type checking to blank handling to endpoint parsing and exception translation; however, inconsistent naming disrupts comprehension, and spacing between the package declaration and imports would improve presentation.
Run 2
Code Structure: The class is logically organized, separating validation from the descriptive string. Nesting: Shallow conditionals and an early return keep control flow flat. Clarity of intent: The class name and endpoint parsing convey the purpose, but misleading names such as saveBalance, sendUser, mode, batch, nextItem, and age obscure the roles of methods and variables. Code length: The implementation is concise with no unnecessary repetition. Action granularity: Each statement performs a single action, making individual steps easy to follow. Reading flow: Type checking, blank handling, parsing, and exception wrapping form a natural sequence, although inconsistent naming disrupts comprehension.
Run 3
Code Structure: The small class logically separates validation from the descriptive string. Nesting: Shallow conditionals and an early return keep nesting minimal; the try/catch is straightforward. Clarity of intent: The class name and endpoint parser indicate configuration validation, but misleading names such as saveBalance, sendUser, mode, batch, nextItem, and age obscure their actual roles. Code length: Concise, with no unnecessary implementation detail. Action granularity: Each statement performs one clear action, and operations are separated onto individual lines. Reading flow: Validation proceeds naturally from type checking to blank handling to endpoint parsing and exception wrapping. Overall, clean organization and formatting make the code easy to follow, but inconsistent naming substantially weakens readability.