Sample
int-f29e8684dba7-I02
Shorten method, parameter, and local names without collisions
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.892 | 0–1; higher is more readable |
| Dorn | 0.799 | 0–1; higher is more readable |
| Mi | 0.055 | 0–1; higher is more readable |
| LLOC | 39 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 5.33 | 0–20; mean of three runs |
| GPT-6.1 Sol | 14 | 0–20; mean of three runs |
| BTTF | 0.578 | 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. | 2285.976 | −75.437 |
| Source linesThe number of non-empty source lines. | 116 | +46.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.416 | −6.623 |
Intercept 8.87 + feature contributions = -26.791 (log-odds).
Score = sigmoid(-26.791) = 0.
| Score | 0.892 |
|---|
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. | 116 | −3.071 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 101 | +2.756 |
| 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.974 | −1.416 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 115.702 | +1.207 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 114.932 | +1.05 |
| 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.057 | +0.387 |
Intercept 0.07 + feature contributions = 1.381 (log-odds).
Score = sigmoid(1.381) = 0.799.
| Score | 0.055 |
|---|
| Score | 39 |
|---|
Run 1
The code is poorly readable due to truncated and ambiguous method names (e.g., 'ord', 'sli', 'ret', 'tou', 'rel') that obscure intent. Several parameters have confusing suffix numbers ('len2', 'len3', 'ind2', 'len4') suggesting copy-paste issues. The structure is mostly flat, but the concatenation of multiple actions in a few lines reduces clarity. Comments are repetitive and interrupt flow. The class logic is understandable only with prior knowledge of Netty's ByteBuf API, and the abbreviated names make it inaccessible to general readers. Overall, the code prioritizes brevity over clarity, violating multiple readability criteria.
Run 2
The code suffers from poor and inconsistent naming (e.g., ord, as, read2, sli, retained2, ret, tou, rel) that obscures intent, making it hard to understand without guessing or external documentation. The class-level documentation is useful, but many method bodies are trivial or rely on unexplained design decisions (e.g., leak-related comments). While nesting is minimal and structure is flat, the logical organization is weakened by unclear method names and ambiguous parameter names like 'end', 'len2', 'ind2', 'len4'. Action granularity is generally one action per line, but several methods are unnecessarily abbreviated. Overall readability is significantly reduced by the cryptic, shortened identifiers and lack of self-documenting code, despite the class being relatively concise and simple in structure.
Run 3
This code is difficult to read due to heavily obfuscated method names (e.g., ord(), as(), read(), read2(), sli(), retained(), ret(), tou(), rel()). The names do not clearly convey intent, violating the 'clarity of intent' and 'reading flow' criteria. While the code structure is somewhat logical and nesting is flat, the action granularity is mixed—some methods are concise but others include redundant comments. The class wraps another buffer but the method names obscure standard ByteBuf operations like order(), asReadOnly(), readSlice(), slice(), retainedSlice(), duplicate(), retain(), touch(), and release(). This makes it hard to understand what each method does without deep domain knowledge. Comments explain some rationale but do not compensate for the naming. Overall, the code is maintainable only by someone already familiar with Netty internals.
Run 1
Code Structure: Logically organized as a buffer wrapper, with related overrides grouped together. Nesting: Very shallow; simple conditionals and short methods are easy to follow. Clarity of intent: The class documentation explains its purpose, but abbreviated names such as ord, as, sli, ret, and tou, plus numbered variants and parameters, obscure individual operations. Code length: Methods are concise, although repeated leak-explanation comments add unnecessary length. Action granularity: Most lines perform a single action; the chained assignment in ord combines cache initialization and local assignment, slightly reducing clarity. Reading flow: Consistent formatting and repetitive delegation patterns support smooth reading, but cryptic naming forces readers to inspect underlying calls to understand behavior.
Run 2
Code Structure: The class is logically organized, grouping related buffer operations and reference-count overrides into small methods. Nesting: Control flow is shallow, with simple conditionals and no loops. Clarity of intent: The class documentation and leak-related comments explain the overall purpose, but abbreviated names such as ord, as, sli, ret, and tou, plus numbered variants and parameters, obscure individual operations. Code length: Methods are concise, although repeated explanatory comments add avoidable length. Action granularity: Most lines perform one action, but the chained assignment to this.swappedBuf and swapped combines updates and slightly complicates reading. Reading flow: Consistent formatting, overrides, and straightforward delegation make the class easy to scan; cryptic naming and repetitive comments interrupt an otherwise natural flow.
Run 3
Code Structure: The class is logically organized into buffer-view operations followed by reference-count operations, with small, focused methods. Nesting: Minimal nesting and early returns make control flow easy to follow. Clarity of intent: The class documentation and explanatory comments establish the wrapper's purpose, but abbreviated names such as ord, as, sli, ret, and tou, plus numbered variants and parameters, obscure individual operations. Code length: Implementations are concise, though repeated leak-related comments add unnecessary length. Action granularity: Most lines perform one action, but the chained assignment when creating swappedBuf combines local assignment, field assignment, and construction. Reading flow: Consistent overrides and straightforward delegation provide a natural flow, weakened by cryptic naming and repetitive comments.