Sample
int-cd31110ab6b0-I06
Invert eligible conditions and exchange their branches
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0.001 | 0–1; higher is more readable |
| Scalabrino | 0.746 | 0–1; higher is more readable |
| Dorn | 0.714 | 0–1; higher is more readable |
| Mi | 0.351 | 0–1; higher is more readable |
| LLOC | 5 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 18.33 | 0–20; mean of three runs |
| GPT-6.1 Sol | 19 | 0–20; mean of three runs |
| BTTF | 0.672 | 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. | 647.078 | −21.354 |
| Source linesThe number of non-empty source lines. | 31 | +12.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.756 | −7.134 |
Intercept 8.87 + feature contributions = -7.217 (log-odds).
Score = sigmoid(-7.217) = 0.001.
| Score | 0.746 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 88.25 | +0.619 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| 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. | 94 | −0.316 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.07 | +0.266 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 32 | −0.097 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 20 | −0.045 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 30.832 | +0.021 |
Intercept 0.07 + feature contributions = 0.916 (log-odds).
Score = sigmoid(0.916) = 0.714.
| Score | 0.351 |
|---|
| Score | 5 |
|---|
Run 1
The code is highly readable. Structure is logical: package, imports, Javadoc, class definition, single static factory method. Nesting is minimal—only a lambda within a lambda, but both are simple. Clarity of intent is strong due to clear naming ('asynchronous', 'listener', 'executor') and comprehensive Javadoc. Code length is concise and appropriate, with no redundant boilerplate. Action granularity is mostly one action per line; the lambda bodies are compact but still understandable. Reading flow is natural: validation first, then return of the composed listener. Minor deductions: the static import is used correctly, and the inner lambda could arguably be extracted for absolute clarity, but current form is acceptable. Overall, this is exemplary Java library code.
Run 2
The code is well-structured and highly readable. It follows a clear, logical organization with a private constructor for a utility class and a single public static method. Nesting is minimal—only two levels deep within the lambda expression. The intent is explicit: the method wraps a removal listener to execute asynchronously using a provided executor. Parameter validation is concise. The code is compact without unnecessary verbosity, and each logical action is clearly separated. The reading flow is natural: validate inputs, then return a lambda that delegates execution. Overall, this is an excellent example of clean, maintainable Java code.
Run 3
The code is highly readable. Structure is logical: a final utility class with a private constructor, static imports, and clear Javadoc. Nesting is minimal; the only nesting is a concise lambda within a lambda, which is appropriate for the task. Intent is explicitly documented and the method name 'asynchronous' clearly conveys behavior. The code is concise with no unnecessary length. Each line performs a single logical action (null checks, return, executor execution). Reading flow follows a natural order: imports, class declaration, constructor, method documentation, parameter validation, then implementation. The only slight complexity is the nested lambda, but it is idiomatic for asynchronous execution and does not harm readability.
Run 1
Code Structure: A well-organized utility class exposes one focused factory method and prevents instantiation. Nesting: Minimal nesting; the two lambdas compactly express asynchronous delegation without complex control flow. Clarity of intent: Descriptive names, explicit generic types, null checks, and Javadoc clearly communicate purpose and usage. Code length: Concise, with no unnecessary implementation detail. Action granularity: Each validation occupies its own line; the nested callback combines scheduling and invocation naturally. Reading flow: The method progresses logically from input validation to listener construction. Minor drawbacks are tightly grouped imports and the slight cognitive overhead of nested lambdas.
Run 2
Code Structure: A well-organized utility class with a private constructor and one focused factory method. Nesting: Minimal; the nested lambdas are shallow and easy to follow. Clarity of intent: Descriptive names, documentation, and explicit null checks clearly communicate asynchronous notification handling. Code length: Concise without sacrificing essential validation or context. Action granularity: Each validation occupies its own line, and the return expression represents one cohesive operation. Reading flow: Natural progression from documentation and method signature to validation and listener creation. Minor drawbacks are the tightly packed package/import section and nested lambda syntax, which may require slightly more attention from readers unfamiliar with Java lambdas.
Run 3
Code Structure: A well-organized utility class with a private constructor and one focused factory method. Nesting: Minimal; the nested lambdas are shallow and directly express asynchronous delegation. Clarity of intent: Descriptive names, Javadoc, and explicit null checks make the purpose clear. Code length: Concise, with no unnecessary implementation detail. Action granularity: Each validation occupies its own line, and the returned listener performs one scheduling action. Reading flow: Natural progression from documentation and signature to validation and delegation. Minor readability drawbacks are the compact import spacing and the nested lambda syntax, which requires some familiarity with Java functional interfaces.