Sample
int-0e01ef32dac0-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.912 | 0–1; higher is more readable |
| Dorn | 0.651 | 0–1; higher is more readable |
| Mi | 0.726 | 0–1; higher is more readable |
| LLOC | 28 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 5.67 | 0–20; mean of three runs |
| GPT-6.1 Sol | 11 | 0–20; mean of three runs |
| BTTF | 0.466 | 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. | 2107.815 | −69.558 |
| Source linesThe number of non-empty source lines. | 114 | +45.6 |
| 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.436 | −6.653 |
Intercept 8.87 + feature contributions = -21.741 (log-odds).
Score = sigmoid(-21.741) = 0.
| Score | 0.912 |
|---|
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. | 115 | −3.035 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 73 | +1.788 |
| 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. | 120.991 | −1.46 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 113.893 | +1.182 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 120.991 | +1.148 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.042 | +0.534 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
Intercept 0.07 + feature contributions = 0.625 (log-odds).
Score = sigmoid(0.625) = 0.651.
| Score | 0.726 |
|---|
| Score | 28 |
|---|
Run 1
The code's structure is severely undermined by obfuscated method names that don't match their documented purposes (e.g., validatePath returns time, parseAddress converts nanoseconds to milliseconds, sendAddress returns nanoseconds, apply sleeps). This makes intent unclear and reading flow disorienting. Nesting is moderate but the loop/synchronized block adds complexity. Action granularity is reasonable, but the long timeout/wait logic in checkBatch and removeSession could be simpler. Code length is acceptable but the misleading naming renders it effectively unreadable despite decent formatting.
Run 2
The code suffers from severe semantic obfuscation due to identifier names that have no relation to their actual purpose. Methods like 'validatePath' returning time, 'parseAddress' converting nanoseconds, 'sendAddress' returning nanoseconds, 'apply' sleeping, 'checkBatch' waiting for conditions, 'write' creating timers, and 'removeSession' waiting on futures make the code extremely difficult to understand. While the structure follows some logical organization with reasonable nesting depth, the disconnect between method names and their behavior destroys clarity of intent. The official Kafka Time interface uses names like 'milliseconds', 'nanoseconds', 'sleep', and 'waitObject', but these have been replaced with misleading names suggesting file operations or network functions. Documentation comments describe the correct functionality, creating cognitive dissonance. Parameters like 'age' for milliseconds, 'key' for objects, 'nextToken' for conditions, 'localState' and 'finalPath' for deadlines further obscure the code. The action granularity is acceptable, and the reading flow follows standard Java conventions, but the pervasive naming mismatch makes this practically unreadable despite being syntactically valid.
Run 3
The code has severe readability issues due to obfuscated naming. Methods like validatePath(), parseAddress(), sendAddress(), apply(), checkBatch(), write(), and removeSession() have names that do not reflect their actual purpose (e.g., getting current time, sleeping, waiting, timer creation, future waiting). This destroys clarity of intent. The structure is otherwise logical, with a flat interface and reasonable nesting depth, but the misleading names make the flow feel disorganized. Action granularity is generally good, with one action per line, and code length is reasonable. However, the import of java.time.Duration is missing, and there are unused imports (Future, TimeUnit, TimeoutException are used, but checkBatch's parameter names like 'key', 'nextToken', 'localState', 'defaultStatus' are unrelated to their roles). The Javadoc comments describe the correct behavior, creating a disconnect between documentation and implementation. Overall, while structurally sound, the obfuscated naming makes it nearly unreadable without external context.
Run 1
Code Structure: The interface logically groups clock access, waiting, and timer creation, with small, separated methods. Nesting: Mostly shallow, though synchronized loops and try/catch blocks introduce moderate nesting. Clarity of intent: Severely weakened by misleading names such as validatePath, sendAddress, removeSession, and profile, which obscure time-related operations. Documentation explains the intended behavior, but several parameter tags and method references do not match the actual identifiers. Code length: Implementations are concise; extensive documentation is generally useful rather than redundant. Action granularity: Statements typically perform one action per line, making individual operations easy to follow. Reading flow: Consistent formatting and straightforward control flow help, but readers must repeatedly translate arbitrary identifiers using the comments. Overall, sound organization and concise methods are undermined by confusing naming and inconsistent documentation.
Run 2
Code Structure: Logically organized as a time abstraction with small, focused methods. Nesting: Moderate nesting in synchronization and retry loops, but manageable with early returns. Clarity of intent: Severely weakened by misleading names such as validatePath, sendAddress, removeSession, and unrelated parameter names. Comments explain intended behavior, but several Javadoc references and parameter names do not match the code. Code length: Generally concise; detailed time-source documentation is useful rather than excessive. Action granularity: Mostly one action per line, with straightforward expressions and statements. Reading flow: Method ordering and formatting are reasonably natural, but inconsistent naming forces readers to repeatedly consult documentation and infer meaning.
Run 3
Code Structure: The interface logically groups clock access, waiting, timers, and future handling into separate methods. Nesting: Mostly shallow, though synchronized loops and try/catch blocks introduce moderate nesting. Clarity of intent: Severely weakened by misleading names such as validatePath, sendAddress, removeSession, and profile; these do not describe time-related operations. Javadoc helps explain behavior but references nonexistent parameter names and a renamed method, creating confusion. Code length: Implementations are reasonably concise, although documentation occupies much of the file. Action granularity: Generally one action per line, with straightforward expressions and statements. Reading flow: Method separation and conventional formatting support navigation, but inconsistent naming, stale documentation, and unusual signature wrapping repeatedly interrupt comprehension.