Sample
int-323f475ae974-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.633 | 0–1; higher is more readable |
| Dorn | 0.45 | 0–1; higher is more readable |
| Mi | 0.124 | 0–1; higher is more readable |
| LLOC | 19 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 5.67 | 0–20; mean of three runs |
| GPT-6.1 Sol | 13.33 | 0–20; mean of three runs |
| BTTF | 0.388 | 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. | 2074.306 | −68.452 |
| Source linesThe number of non-empty source lines. | 88 | +35.2 |
| 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.861 | −7.292 |
Intercept 8.87 + feature contributions = -31.674 (log-odds).
Score = sigmoid(-31.674) = 0.
| Score | 0.633 |
|---|
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. | 89 | −2.115 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 60 | +1.338 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 60 | −0.956 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 87.911 | +0.819 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 97.742 | +0.773 |
| 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.978 | −0.569 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.052 | +0.439 |
Intercept 0.07 + feature contributions = -0.202 (log-odds).
Score = sigmoid(-0.202) = 0.45.
| Score | 0.124 |
|---|
| Score | 19 |
|---|
Run 1
This code is extremely unreadable. The purpose of the class is misrepresented by its name and method names. Method names like 'verify' and 'removeCount' are ambiguous and suggest unintended logic. Parameter names such as 'primaryBalance', 'response', 'primarySession', 'window', and 'buffer' obscure intent. The static methods have identical names and misleading documentation. The class structure is tangled: serialization methods are mislabeled (e.g., 'removeCount' actually reads data; 'updateMode' writes data), and the logic appears intentionally obfuscated. Although indentation is flat, the misuse of terminology destroys clarity. There is no natural reading flow; comments conflict with code behavior. Even though it is concise and line-based, every action line is confusing. This fails nearly all readability criteria, despite being syntactically valid Java.
Run 2
The code has some readable elements—clear class-level Javadoc, flat class structure, and generally one action per line—but it is severely undermined by naming that obscures intent. Methods like `verify()` and parameters like `primaryBalance`, `primarySession`, `window`, and `buffer` are misleading or meaningless in context, making the code difficult to understand despite its simple structure. The two `@GwtIncompatible` methods have odd indentation, breaking visual flow. The class is concise and not deeply nested, but the disorganized naming and inconsistent formatting significantly reduce readability. Action granularity is mostly fine, and the reading flow is moderate, but clarity of intent suffers badly.
Run 3
This code has severe readability issues due to obfuscated naming and misleading structure. Methods are named 'verify' but actually create new instances, parameters are named 'primaryBalance', 'primarySession', 'window', 'buffer', 'response', 'nextData', 'defaultSession' which obscure their actual purposes. The serialization methods are named 'removeCount' and 'updateMode' instead of conventional 'writeObject' and 'readObject', making their intent completely unclear. Parameters like 'distinctElements' are renamed to 'primaryBalance' but retain javadoc referencing the original name, creating a disconnect between documentation and code. The class structure itself follows standard patterns with flat nesting and reasonable line lengths, but the identifier renaming defeats comprehension. The javadoc is thorough but describes different parameter names than the code uses. This appears to be deliberately obfuscated code masquerading as a standard Guava collection class.
Run 1
Code Structure: Factory methods, constructors, and serialization helpers are logically grouped, although inherited utilities require external context. Nesting: Methods are flat and easy to scan, with no nested control flow. Clarity of intent: The main weakness is misleading naming: verify creates instances, removeCount writes serialization data, and updateMode reads it. Names such as primaryBalance, primarySession, response, and defaultSession obscure their roles. The distinctElements and elements documentation also disagrees with actual parameter names. Code length: Implementations are concise; documentation is substantial but generally useful. Action granularity: Statements mostly perform one action per line, though the final field declaration compresses annotations and modifiers. Reading flow: The overall progression is natural, but inconsistent indentation and misleading identifiers interrupt comprehension. Clear class documentation and simple method bodies help, but naming substantially undermines readability.
Run 2
Code Structure: Factories, constructors, and serialization-related methods are logically grouped, although inconsistent indentation weakens presentation. Nesting: Methods are flat and easy to scan, with no complex branching. Clarity of intent: Class documentation explains behavior well, but misleading names such as verify, primaryBalance, removeCount, and updateMode obscure creation and serialization operations. Parameter documentation also references names absent from the signatures. Code length: The implementation is concise, and most documentation adds useful context. Action granularity: Executable statements generally perform one action per line, though the final annotation-and-field declaration is crowded. Reading flow: Short methods and consistent delegation support a natural flow, but mismatched names, stale documentation, and formatting inconsistencies interrupt comprehension.
Run 3
Code Structure: Factory methods, constructors, and serialization-related methods are logically grouped, although formatting is inconsistent. Nesting: Methods are flat and easy to follow, with no nested control flow. Clarity of intent: Class documentation clearly explains multiset behavior, but misleading names such as verify, primaryBalance, removeCount, and updateMode obscure actual operations. Javadoc parameter names also disagree with method signatures. Renamed serialization methods hide the expected Java serialization hooks. Code length: The implementation is concise; documentation adds useful context rather than unnecessary verbosity. Action granularity: Statements generally perform one action per line, though the final annotations and field declaration are compressed together. Reading flow: Short methods and straightforward statement sequences support natural reading, but inconsistent indentation, unrelated variable names, and documentation mismatches cause avoidable interruptions.