Sample
int-7957e45a9990-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.705 | 0–1; higher is more readable |
| Dorn | 0.391 | 0–1; higher is more readable |
| Mi | 0.478 | 0–1; higher is more readable |
| LLOC | 30 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 6 | 0–20; mean of three runs |
| GPT-6.1 Sol | 12.67 | 0–20; mean of three runs |
| BTTF | 0.395 | 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. | 2209.767 | −72.922 |
| Source linesThe number of non-empty source lines. | 110 | +44 |
| 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.521 | −6.781 |
Intercept 8.87 + feature contributions = -26.833 (log-odds).
Score = sigmoid(-26.833) = 0.
| Score | 0.705 |
|---|
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. | 110 | −2.858 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 66 | +1.546 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 109.881 | +1.126 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 65 | −1.071 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 99.964 | +0.808 |
| 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. | 99.991 | −0.57 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.045 | +0.506 |
Intercept 0.07 + feature contributions = -0.443 (log-odds).
Score = sigmoid(-0.443) = 0.391.
| Score | 0.478 |
|---|
| Score | 30 |
|---|
Run 1
The code is difficult to read due to misleading naming and unclear intent. Methods like createCount, validateRequest, and validateBalance have confusing names that don't describe their actual behavior (e.g., createCount updates offsets and computes a minimum; validateRequest does not validate a request). Parameters are also named poorly: 'map' represents a key, 'source' an offset, and 'location' means isDelete. The logic in createCount updates lastRedundantOffset before removing deleted entries, which may lead to incorrect state. Nesting is acceptable and code length is moderate, but unclear naming and ambiguous purpose severely hinder readability. Despite some helpful comments, the code's overall structure and naming make it hard to understand and maintain.
Run 2
The code has severe readability issues. The method and parameter names are misleading: 'createCount' actually updates offsets, 'validateRequest' calculates minimum offsets, and 'validateBalance' retrieves the last redundant offset. Single-letter or meaningless parameter names like 'map', 'source', and 'location' obscure intent. The naming suggests an obfuscation attempt rather than clear purpose. While structure and nesting are acceptable, the mismatch between comments and actual parameter names adds confusion. There are also logical issues: 'createCount' removes offsets after inserting them for delete operations, and 'validateRequest' appears to return early with the minimum only if it equals the last redundant offset, contradicting the stated purpose of finding the global minimum. The code is concise but at the cost of clarity. The reading flow is disrupted by semantic noise. The comments attempt to explain but conflict with variable names. This code requires significant effort to understand actual behavior versus intended behavior, making it nearly unreadable without substantial refactoring.
Run 3
The code has a clear intent but suffers from poor naming and confusing method names. For example, methods like 'createCount', 'validateRequest', 'validateBalance', and 'saveData' do not reflect their actual operations, making the API misleading. Variable names such as 'map', 'source', and 'location' obscure their purposes (key, offset, isDelete). The comments are helpful but are undermined by the poor names. While the code is not deeply nested and generally has reasonable line-level readability, the ambiguous naming heavily impacts clarity. The logic in 'validateRequest' is not as simple as the method name suggests. Overall, the code is understandable with effort but not immediately clear, leading to a moderate score.
Run 1
Code Structure: Fields, initialization, updates, minimum calculation, and accessors are logically separated into small methods. Nesting: Shallow loops and conditionals, with early returns, make control flow easy to follow. Clarity of intent: The main weakness is misleading naming: createCount, validateRequest, validateBalance, saveData, defaultAccount, and location do not describe their offset-tracking roles. Javadoc parameter names disagree with the actual signature, and comments reference nonexistent names such as updateState and soFar. Code length: Executable code is concise, but lengthy explanatory comments outweigh the implementation and introduce inconsistencies. Action granularity: Statements generally perform one action per line, with straightforward expressions. Reading flow: Method organization is natural, but readers must repeatedly translate generic identifiers and reconcile comments with implementation, especially around deletion and redundant-offset semantics.
Run 2
Code Structure: Fields, initialization, updates, calculation, and accessors are logically separated into small methods. Nesting: Mostly flat, with early returns and only one conditional inside a loop. Clarity of intent: Meaningful class and field names help, but misleading method names such as createCount, validateRequest, and validateBalance obscure offset management. Generic parameter and variable names further weaken clarity, while Javadoc parameters and comment references do not match the actual identifiers. Code length: Implementation is compact, but lengthy, occasionally repetitive comments increase reading effort. Action granularity: Statements generally perform one action per line, making state changes easy to follow. Reading flow: Formatting and method ordering are natural, though inconsistent terminology and the need to reconcile comments with code interrupt comprehension.
Run 3
Code Structure: State, initialization, updates, calculation, and accessors are logically separated into small methods. Nesting: Shallow conditionals and a single loop make control flow easy to follow. Clarity of intent: Class and field names convey offset tracking, but misleading method names such as createCount, validateRequest, and validateBalance obscure their purposes. Parameters and locals such as map, source, location, and token further weaken clarity. Javadoc parameter names do not match the signature, and comments reference nonexistent identifiers such as updateState and soFar. Code length: Implementation is reasonably concise, although lengthy comments add reading overhead. Action granularity: Statements generally perform one action per line. Reading flow: Method ordering and early returns support natural reading, but inconsistent terminology and stale documentation force readers to reconcile descriptions with actual behavior.