Sample
int-b0cd08efef06-I11
Split eligible integer literals into pairs of short-named intermediate variables
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.615 | 0–1; higher is more readable |
| Dorn | 0.414 | 0–1; higher is more readable |
| Mi | 0.447 | 0–1; higher is more readable |
| LLOC | 25 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 9.33 | 0–20; mean of three runs |
| GPT-6.1 Sol | 15 | 0–20; mean of three runs |
| BTTF | 0.325 | 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. | 2609.725 | −86.121 |
| Source linesThe number of non-empty source lines. | 96 | +38.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.968 | −7.452 |
Intercept 8.87 + feature contributions = -46.303 (log-odds).
Score = sigmoid(-46.303) = 0.
| Score | 0.615 |
|---|
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. | 97 | −2.398 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 76 | +1.892 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 76 | −1.323 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 95.95 | +0.931 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 97.918 | +0.775 |
| 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. | 98.938 | −0.525 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.073 | +0.229 |
Intercept 0.07 + feature contributions = -0.349 (log-odds).
Score = sigmoid(-0.349) = 0.414.
| Score | 0.447 |
|---|
| Score | 25 |
|---|
Run 1
The code has good structure with clear class hierarchy and method separation, but readability is severely damaged by obfuscated integer constants (a, b, c, d, e, f) that replace simple expressions. The indexOf method contains confusing arithmetic like `(a + b)` instead of `0` and `-(c + d)` instead of `-1`, making the logic needlessly unclear. Nesting is flat and intent is generally clear for method purposes, but these magic numbers violate clarity of intent. The comments explain some context but don't justify the obfuscation. There are also minor formatting issues like inconsistent indentation before writeReplace. Overall, the code appears to be intentionally obfuscated while pretending to be legible.
Run 2
The code is a mix of clear structural elements and confusing, unreadable fragments. The overall class structure, method naming, and comments are clear, but the introduction of unexplained variables (a, b, c, d, e, f) in core methods like indexOf and contains destroys readability. These magic-number-style variables obscure intent and force readers to do needless mental arithmetic, violating clarity and action granularity guidelines. Comments explain otherwise non-obvious logic, but the code itself could be written far more transparently. Nesting is mostly flat, but the strange local variable assignments make the code appear obfuscated. Several overrides are straightforward, but the unnecessary variable indirection suggests deliberate obfuscation or unfinished refactoring. Overall, while the structure and comments help, the core logic is unnecessarily cryptic, yielding a low readability score.
Run 3
The code has clear class purpose and documentation, but readability suffers from several issues. The structure is mostly logical with straightforward method delegation, but the mysterious local variables in indexOf() and contains() (a, b, c, d, e, f) obscure intent - these should be named constants or inline expressions. The nesting is acceptable and mostly flat. Action granularity is mixed: most methods are concise single-purpose operations, but indexOf() packs multiple operations into a complex ternary expression. The reading flow is disrupted by inconsistent TODO formatting, redundant comments, and the oddly indented writeReplace() method. Some methods like comparator() and lastIndexOf() are clear, while the manual arithmetic in indexOf() appears obfuscated without explanation. The class-level Javadoc is helpful, but inline comments could better explain the non-obvious logic around comparator consistency with equals(). Overall, functional but with notable clarity issues.
Run 1
Code Structure: Well-organized class with small, focused overrides and logical method grouping. Nesting: Very flat, with no nested control-flow blocks. Clarity of intent: Descriptive method names and comments explain delegation, lookup performance, and comparator semantics, but meaningless constants a–f and arithmetic expressions obscure simple comparisons against zero and a return value of -1. Code length: Mostly concise, though unnecessary constant declarations and lengthy TODO comments add clutter. Action granularity: Statements generally perform one action per line; the ternary return remains manageable despite its artificial arithmetic. Reading flow: Methods follow naturally and delegation is consistent, but annotation/comment clusters interrupt scanning, and writeReplace has inconsistent indentation. Overall, the structure is readable, but deliberate arithmetic indirection noticeably weakens clarity.
Run 2
Code Structure: Logically organized into small, focused overrides with clear delegation. Nesting: Very flat, with no nested control blocks. Clarity of intent: Method names and comments explain behavior and compatibility constraints, but meaningless variables a–f and arithmetic disguising 0 and -1 unnecessarily obscure lookup logic. Code length: Mostly concise, though redundant constants and lengthy TODO comments add clutter. Action granularity: Generally one declaration or action per line; the conditional return remains manageable. Reading flow: Methods follow a coherent sequence, but annotation/comment clusters interrupt scanning, and writeReplace has inconsistent indentation. Overall, the structure is strong, but artificial arithmetic and minor formatting issues reduce readability.
Run 3
Code Structure: Logically organized into short, focused overrides with clear delegation. Nesting: Almost entirely flat, making control flow easy to follow. Clarity of intent: Descriptive method names and explanatory comments clarify sorted-list behavior, but arbitrary constants a–f and arithmetic expressions obscure simple comparisons against 0 and returns of -1. Code length: Generally concise, though unnecessary constants and lengthy TODO comments add clutter. Action granularity: Statements mostly perform one action per line; the ternary return remains manageable. Reading flow: Method order and consistent override patterns support natural reading, but annotation/comment blocks interrupt the flow, and writeReplace has inconsistent indentation. Overall, the class is readable, with localized obfuscation and formatting issues preventing a higher score.