Sample
int-179fd04f7041-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.469 | 0–1; higher is more readable |
| Dorn | 0.715 | 0–1; higher is more readable |
| Mi | 0.042 | 0–1; higher is more readable |
| LLOC | 39 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 8 | 0–20; mean of three runs |
| GPT-6.1 Sol | 12 | 0–20; mean of three runs |
| BTTF | 0.345 | 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. | 4959.253 | −163.655 |
| Source linesThe number of non-empty source lines. | 103 | +41.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.83 | −7.245 |
Intercept 8.87 + feature contributions = -120.83 (log-odds).
Score = sigmoid(-120.83) = 0.
| Score | 0.469 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Indentation frequencyHow rapidly indentation changes from line to line. | 99 | +2.687 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 104 | −2.646 |
| 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. | 140.971 | −2.306 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 140.981 | +1.47 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 102.873 | +1.028 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.075 | +0.217 |
Intercept 0.07 + feature contributions = 0.918 (log-odds).
Score = sigmoid(0.918) = 0.715.
| Score | 0.042 |
|---|
| Score | 39 |
|---|
Run 1
The code has a clear structure with logical separation of methods, but the naming is severely misleading. Methods like validateRequest, validateMessage, validateSession, validateAccount, buildClient, validateBalance, and validateAddress do not reflect their actual operations (fetching offsets, getting leader epoch, managing listeners). Variable names like primaryBalance, currentData, pendingBalance, defaultSession, nextAddress, currentBalance, finalUser, localWindow, pendingAccount, pendingRequest, currentAddress, tempValue, sharedKey, pendingMessage, primarySession, pendingAddress, nextPath, primaryRequest, response, currentAccount, nextEvent suggest obfuscation or confused domain mapping. Method names are relatively flat and do not nest deeply, but the ambiguous naming destroys clarity of intent and reading flow. Code length is reasonable, and action granularity is mostly one per line. The scattered and inconsistent terminology makes it impossible to understand the domain purpose without external documentation, hence a very low readability score despite acceptable structure.
Run 2
The code structure is logical and flat, but variable naming is severely obfuscated (e.g., primaryBalance, currentData, pendingBalance, defaultSession, nextAddress). These names obscure intent and make the code almost nonsensical. Methods like validateRequest, validateMessage, validateSession, and validateAccount do not clearly map to their actual purpose. Reading flow is disrupted by the mismatch between method names and behavior. While line length and action granularity are acceptable, the clarity of intent and overall readability are poor due to misleading names and comments that do not match the code context.
Run 3
The code follows a consistent structure and each method is relatively short, which helps readability. However, there are major issues with clarity of intent: variable and method names appear to be obfuscated and do not reflect their actual purpose (e.g., 'validateRequest' fetches an offset, 'primaryBalance' represents a topic partition, 'pendingBalance' holds a timestamp/offset). This makes the code ambiguous and difficult to understand without deep domain knowledge. Nesting is shallow and action granularity is acceptable, but reading flow suffers due to misleading terminology. The helper method 'findCache' provides some structure but is also misnamed. Overall, the organization is workable, but the naming choices significantly reduce readability.
Run 1
Code Structure: Well-organized class with short methods, explicit overrides, and a shared partition lookup helper. Nesting: Shallow conditionals and early exception checks make control flow easy to follow. Clarity of intent: The main weakness is misleading naming; methods such as validateMessage and buildClient retrieve offsets or leader epochs, while variables such as pendingBalance and finalUser obscure Kafka concepts. Comments and API calls partially clarify intent. Code length: Generally concise, though three timestamp-offset retrieval methods repeat similar logic and long calls and exception messages require extra scanning. Action granularity: Most statements perform one clear action, with conventional method chaining. Reading flow: Consistent method layouts and straightforward sequencing help, but unrelated names, missing braces in one conditional chain, and minimally separated imports reduce readability.
Run 2
Code Structure: Small, separate methods and a shared partition lookup helper provide logical organization, though timestamp-fetch logic is duplicated. Nesting: Shallow conditionals and early exceptions keep nesting minimal. Clarity of intent: The main weakness is misleading naming; validateRequest, validateAccount, buildClient, and findCache obscure offset retrieval, epoch lookup, and partition lookup. Variables such as primaryBalance and finalUser do not reflect their domain roles. Comments and Kafka API names partially clarify purpose. Code length: Generally concise, although three similar timestamp-fetch methods repeat setup and error handling. Action granularity: Most statements perform one action, but chained API calls and densely packed arguments require additional parsing. Reading flow: Consistent method formatting and straightforward control flow help, while unrelated identifiers, mixed import grouping, and unbraced conditional branches reduce readability.
Run 3
1. Code Structure: Clearly organized class with focused methods and a shared partition lookup helper, though offset-fetching logic is repeated. 2. Nesting: Shallow conditionals and early exceptions keep complexity low. 3. Clarity of intent: The main weakness is misleading naming: validateRequest, validateAccount, buildClient, and findCache obscure offset retrieval, leader-epoch lookup, and partition lookup. Parameters such as primaryBalance and finalUser similarly conceal their domain meaning. API calls, types, comments, and exception messages partially clarify the actual operations. 4. Code length: Generally concise, although three similar timestamp-offset methods introduce duplication. 5. Action granularity: Most statements perform one coherent action; chained calls and long argument lists modestly increase reading effort. 6. Reading flow: Consistent method layouts and straightforward control flow help, but unrelated names repeatedly force readers to infer meaning from implementations. Missing braces in the isolation-selection branches slightly reduce visual consistency.