Sample
int-2f5efef78676-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.8 | 0–1; higher is more readable |
| Dorn | 0.747 | 0–1; higher is more readable |
| Mi | 0.044 | 0–1; higher is more readable |
| LLOC | 26 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 10 | 0–20; mean of three runs |
| GPT-6.1 Sol | 12.67 | 0–20; mean of three runs |
| BTTF | 0.611 | 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. | 1106.196 | −36.504 |
| Source linesThe number of non-empty source lines. | 61 | +24.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.386 | −6.579 |
Intercept 8.87 + feature contributions = -9.814 (log-odds).
Score = sigmoid(-9.814) = 0.
| Score | 0.8 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| 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. | 119 | −1.375 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 55 | +1.165 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 62 | −1.159 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 119 | +1.116 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 60.925 | +0.442 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.053 | +0.427 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
Intercept 0.07 + feature contributions = 1.084 (log-odds).
Score = sigmoid(1.084) = 0.747.
| Score | 0.044 |
|---|
| Score | 26 |
|---|
Run 1
The code has a clear class structure and reasonable method length, but naming choices significantly obscure intent. Methods like 'render', 'add', 'dispatch', 'validateMessage', 'validateAccount', and 'apply' do not reflect their actual operations (e.g., enabling the ring, retrieving file descriptors, or closing resources). Parameter names such as 'defaultRequest', 'pendingAccount', and 'shipment' are misleading for submission queue, completion queue, and feature flags. The comments in 'render' are helpful, but other methods lack documentation. Nesting is flat and actions are mostly granular, aiding readability, but the cryptic naming damages clarity and reading flow. The constructor and methods are concise, but the code relies on domain knowledge of io_uring internals without explanatory comments. Overall, the structure is logical, but ambiguous naming and insufficient comments make the code harder to read than necessary.
Run 2
The code has a clear class purpose but suffers from misleading naming and poor method semantics. For example, 'render' actually enables the ring, 'add' returns a file descriptor, 'dispatch' returns features, and 'validateMessage'/'validateAccount' are getters. These obscure names severely hurt clarity of intent. The structure is mostly flat and readable, but the misleading names force the reader to consult the constructor or external documentation. Comments help somewhat but do not fix the naming problems. The code length is appropriate and action granularity is acceptable, but reading flow is disrupted by the semantic mismatch between method names and their behavior.
Run 3
The code has a clear package and class structure but suffers from misleading naming and unclear methods. Names like 'render', 'add', 'dispatch', 'validateMessage', and 'validateAccount' do not reflect their actual purpose, making intent ambiguous. The code is relatively flat and concise, with no deep nesting or multiple actions per line, which improves readability. However, the poor naming severely impacts clarity. Comments help explain the lifecycle, but the overall flow is confusing due to mismatched identifiers and methods that do not clearly map to their function. The logic itself is straightforward, but the abstractions are poorly communicated, reducing overall readability.
Run 1
Code Structure: Fields, constructor, accessors, initialization, and cleanup are logically grouped into small methods. Nesting: Very shallow; cleanup uses a straightforward early return. Clarity of intent: The main weakness is misleading naming: render enables the ring, add returns a descriptor, dispatch returns features, and apply closes resources. Constructor parameters and validateMessage/validateAccount also obscure their roles. Comments clarify initialization, although the same-method instruction conflicts with the subsequent same-thread explanation. Code length: Concise, with little unnecessary code. Action granularity: Each statement generally performs one action, and the lengthy native call is formatted clearly across lines. Reading flow: The layout is natural and easy to scan, but readers must inspect implementations to understand method purposes, reducing readability substantially.
Run 2
Code Structure: Logically organized into fields, initialization, accessors, ring setup, and cleanup. Nesting: Minimal; the early return keeps cleanup flat. Clarity of intent: The main weakness is misleading naming: render enables the ring, add returns a file descriptor, dispatch returns features, validateMessage/validateAccount are accessors, and apply closes resources. Constructor parameter names also obscure their roles. Comments clarify setup, though the documentation says 'same method' while the implementation comment specifies 'same thread.' Code length: Concise, with little unnecessary code; the long native call appears justified. Action granularity: Each statement performs one clear operation, and native arguments are separated across lines. Reading flow: Generally natural within methods, but arbitrary method and parameter names force readers to inspect implementations to understand behavior.
Run 3
Code Structure: Fields, construction, accessors, initialization, and cleanup are logically organized into small methods. Nesting: Very shallow; the early return avoids unnecessary nesting. Clarity of intent: The main weakness is misleading naming: render enables the ring, add returns a file descriptor, dispatch returns features, validateMessage and validateAccount are accessors, and apply performs cleanup. Constructor parameter names also obscure their roles. Descriptive field names and comments partially compensate, though the initialization comment inconsistently refers to the same method versus the same thread. Code length: Concise, with little unnecessary code; the long native call appears justified by its arguments. Action granularity: Statements generally perform one action per line, and the multiline native call is easy to scan. Reading flow: Formatting and method boundaries support smooth reading, but inaccurate names force readers to inspect implementations to understand behavior.