Sample
int-e137022379e0-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.825 | 0–1; higher is more readable |
| Dorn | 0.24 | 0–1; higher is more readable |
| Mi | 0.115 | 0–1; higher is more readable |
| LLOC | 37 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 7.33 | 0–20; mean of three runs |
| GPT-6.1 Sol | 11.67 | 0–20; mean of three runs |
| BTTF | 0.481 | 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. | 2212.608 | −73.016 |
| Source linesThe number of non-empty source lines. | 96 | +38.4 |
| 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.5 | −6.75 |
Intercept 8.87 + feature contributions = -32.497 (log-odds).
Score = sigmoid(-32.497) = 0.
| Score | 0.825 |
|---|
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. | 97 | −2.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. | 139.959 | −2.263 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 85 | +2.203 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 85 | −1.53 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 139.969 | +1.454 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 95.879 | +0.93 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.058 | +0.381 |
Intercept 0.07 + feature contributions = -1.152 (log-odds).
Score = sigmoid(-1.152) = 0.24.
| Score | 0.115 |
|---|
| Score | 37 |
|---|
Run 1
The code has a clear class and enum structure, but naming is inconsistent and misleading, which obscures intent. Parameters and methods have names unrelated to their purpose (e.g., `defaultSession`, `nextBalance`, `sendNode`, `load`, `validateBalance`). The `sendNode` method uses a chain of if-else blocks that could be simplified with a switch, though it is not deeply nested. Action granularity is mostly one action per line, but the constructor has a long multi-line exception message that breaks flow. The `submit` method is hard to follow due to poorly named parameters and a confusing cast. The `UpgradeType` enum mixes byte codes and role names (e.g., `size`) further reducing clarity. Overall, the code is moderately structured but readability suffers from ambiguous naming and lack of alignment with the domain model.
Run 2
The code structure is disorganized due to misleading naming choices that obscure intent. Parameters and methods use names unrelated to their actual purpose ('defaultSession', 'nextBalance', 'validateBalance', 'readBalance', 'submit', 'schedule', 'readUser', 'sendNode', 'load'), violating Java conventions and making the code ambiguous. The constructor logic is flat and relatively clear, but the enum method 'sendNode' uses an if-else chain that could be simplified with a switch. Action granularity is acceptable, but reading flow suffers from the semantic mismatch between names and functionality. While the code is not deeply nested and length is concise, the pervasive naming issues severely reduce readability and maintainability. Overall, the code appears functionally structured but intentionally obfuscated through poor naming, making it difficult to understand without significant effort.
Run 3
The code uses highly misleading naming throughout: parameters like `defaultSession`, `nextBalance`, `price`, `node`, and methods like `validateBalance()`, `readBalance()`, `submit()`, `schedule()`, `readUser()` bear no relation to their intended purpose (feature version levels, upgrade types, equality, hashing, toString). The `sendNode()` method name is equally confusing. The enum uses a parameter named `size` for an int code, and `load()` for a getter. Multiple actions are packed into single lines (e.g., the boolean return in `submit()`). Constructor logic checks `equals` on an enum using `.equals()` instead of `==`, and error messages are inconsistent. While the Javadoc is decent, the implementation contradicts it, making the code ambiguous and hard to follow despite being structurally simple.
Run 1
Code Structure: Fields, enum, constructor, accessors, and comparison methods are logically grouped. Nesting: Shallow conditionals and early returns make control flow easy to follow. Clarity of intent: Meaningful field and enum names are undermined by misleading names such as defaultSession, nextBalance, sendNode, and readUser. Constructor documentation references different parameter names, and submit, schedule, and readUser misleadingly use @Override instead of recognizable equals, hashCode, and toString methods. Code length: Generally concise, though the enum conversion chain and lengthy validation message add minor verbosity. Action granularity: Most lines perform one clear action, with conventional multiline expressions. Reading flow: Consistent formatting and ordering support scanning, but unrelated naming forces readers to infer purpose from implementations rather than signatures.
Run 2
Code Structure: Fields, enum, constructor, accessors, and comparison methods are logically organized. Nesting: Shallow conditionals and early returns keep complexity low. Clarity of intent: Severely weakened by misleading names such as defaultSession, nextBalance, sendNode, and validateBalance. Constructor documentation names parameters that do not exist, and submit, schedule, and readUser appear intended as equals, hashCode, and toString but have invalid @Override annotations. Code length: Generally concise, though the enum conversion chain and long validation message add verbosity. Action granularity: Most lines perform one action; multiline expressions remain understandable. Reading flow: Consistent indentation and method separation support scanning, but unrelated naming and documentation mismatches repeatedly interrupt comprehension.
Run 3
Code Structure: Fields, enum, constructor, accessors, and utility methods are logically organized. Nesting: Shallow conditionals and early returns keep complexity low. Clarity of intent: Meaningful field and enum names contrast with misleading names such as defaultSession, nextBalance, sendNode, and readUser. Constructor documentation names do not match its parameters. Methods apparently intended as equals, hashCode, and toString have unrelated names and invalid @Override annotations, obscuring their roles. Code length: Generally concise, though the enum lookup could be more compact. Action granularity: Most lines perform one clear action; the combined equality expression remains manageable. Reading flow: Conventional layout and consistent indentation help, but inconsistent terminology forces readers to repeatedly infer how parameters and methods relate to feature updates.