Sample
int-326d9e039bda-I03
Replace method, parameter, and local names with length-matched, meaningful but unrelated names
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0.001 | 0–1; higher is more readable |
| Scalabrino | 0.724 | 0–1; higher is more readable |
| Dorn | 0.714 | 0–1; higher is more readable |
| Mi | 0.351 | 0–1; higher is more readable |
| LLOC | 5 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 16.33 | 0–20; mean of three runs |
| GPT-6.1 Sol | 15.67 | 0–20; mean of three runs |
| BTTF | 0.592 | 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. | 647.078 | −21.354 |
| Source linesThe number of non-empty source lines. | 31 | +12.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.811 | −7.217 |
Intercept 8.87 + feature contributions = -7.301 (log-odds).
Score = sigmoid(-7.301) = 0.001.
| Score | 0.724 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 88.25 | +0.619 |
| 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. | 94 | −0.316 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.07 | +0.266 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 32 | −0.097 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 20 | −0.045 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 30.832 | +0.021 |
Intercept 0.07 + feature contributions = 0.916 (log-odds).
Score = sigmoid(0.916) = 0.714.
| Score | 0.351 |
|---|
| Score | 5 |
|---|
Run 1
The code is generally well-structured with a clear single-purpose class. It uses static imports appropriately and has a private constructor to prevent instantiation. The method has a single level of nesting and the lambda expression is concise. However, the parameter names `category`, `document`, and `sharedBuffer` are misleading - they suggest document categories rather than the actual removal listener and executor components. This significantly reduces readability and clarity of intent. The method name `removeBuffer` is also vague about its purpose of wrapping a listener with async execution. The reading flow is natural, and action granularity is good with one action per line, but the contradictory naming creates confusion.
Run 2
The code is well-structured and readable. It has a clear class purpose, minimal nesting, and concise methods. The naming inconsistency (e.g., 'removeBuffer', 'category', 'document' instead of expected 'asynchronous', 'listener', 'executor') slightly hurts clarity but does not obscure intent. The action granularity is good: validation and return are separate lines. The reading flow is natural and the documentation is helpful. Minor verbosity exists in the Javadoc but is appropriate for library code.
Run 3
The code is generally readable with a clear logical structure. The class has a single responsibility and the method is concise. However, the parameter and variable names ('category', 'document', 'sharedBuffer') are misleading and do not reflect their actual purpose (listener, executor, notification). This hurts clarity of intent. Nesting is minimal and the reading flow is natural, but the action granularity is slightly compressed in the lambda expression. The code is not excessively long or tangled, but renaming variables would significantly improve comprehension.
Run 1
Code Structure: A small, logically organized utility class with a private constructor and one factory method. Nesting: Minimal; the nested lambdas are compact and easy to follow. Clarity of intent: The asynchronous listener behavior is understandable, but misleading names such as removeBuffer, category, document, and sharedBuffer obscure roles. Javadoc parameter names also do not match the actual parameters. Code length: Concise, with no unnecessary implementation detail. Action granularity: Null checks occupy separate lines, and the return expression represents one cohesive operation. Reading flow: Generally natural, progressing from validation to listener construction, though naming inconsistencies and missing spacing between package and imports reduce polish.
Run 2
Code Structure: A well-organized utility class with a private constructor and one focused factory method. Nesting: Shallow; the nested lambdas remain easy to follow. Clarity of intent: Documentation explains asynchronous notification handling, but removeBuffer, category, document, and sharedBuffer are misleading names. The Javadoc parameter names also do not match the actual parameters. Code length: Concise, with no unnecessary implementation code. Action granularity: Null checks are separate statements, and the lambda expression cleanly represents scheduling the callback. Reading flow: Mostly natural, progressing from validation to listener construction, though inconsistent naming and tightly grouped package/import declarations reduce readability.
Run 3
Code Structure: A well-organized utility class with a private constructor and one focused method. Nesting: Shallow; the nested lambdas are compact and easy to follow. Clarity of intent: The implementation clearly delegates removal notifications to an executor, but removeBuffer, category, document, and sharedBuffer are misleading names. Javadoc references listener and executor rather than the actual parameter names, further reducing clarity. Code length: Concise, with no unnecessary implementation code. Action granularity: Null checks occupy separate lines, and the lambda expresses a single scheduling operation. Reading flow: The progression from validation to asynchronous delegation is natural, although inconsistent naming and tightly grouped package/import declarations interrupt readability.