Sample
int-a1e918026e1d-SRC
Unmodified source class
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.453 | 0–1; higher is more readable |
| Dorn | 0.756 | 0–1; higher is more readable |
| Mi | 0.442 | 0–1; higher is more readable |
| LLOC | 25 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 16 | 0–20; mean of three runs |
| GPT-6.1 Sol | 17 | 0–20; mean of three runs |
| BTTF | 0.462 | 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. | 2825.028 | −93.226 |
| Source linesThe number of non-empty source lines. | 75 | +30 |
| 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.445 | −6.668 |
Intercept 8.87 + feature contributions = -61.024 (log-odds).
Score = sigmoid(-61.024) = 0.
| Score | 0.453 |
|---|
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. | 76 | −1.655 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 68 | +1.615 |
| 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. | 112 | −1.079 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 111.961 | +1.002 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 74.867 | +0.637 |
| 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.083 | +0.14 |
Intercept 0.07 + feature contributions = 1.128 (log-odds).
Score = sigmoid(1.128) = 0.756.
| Score | 0.442 |
|---|
| Score | 25 |
|---|
Run 1
The code is generally well-structured with clear public API documentation and logical organization. The `partitionResult` method is readable with flat nesting and clear intent, though it uses a lambda with multiple branches. The `all()` method has increased complexity with nested logic inside a lambda, but remains understandable. Code length is moderate and appropriate. Action granularity is mostly good, though the string concatenation in `all()` is somewhat verbose. Reading flow is natural, with methods returning futures consistently. Overall, the code is maintainable and readable, but could benefit from extracting complex lambda logic into helper methods to reduce nesting and improve clarity.
Run 2
The code is generally well-structured with clear intent, logical organization, and a reasonable nesting depth. Each method has a single responsibility, and the use of streams in `all()` is concise. However, readability is reduced by the inline exception-handling logic in `all()`, which repeats the partition-failure accumulation and loops through all values to find the first non-null exception. A helper method or more descriptive variable names could improve clarity. The lambda inside `thenApply` is somewhat long and mixes stream processing with imperative checks. Indentation and formatting are consistent, but the long string concatenations and conditional branching slightly interrupt natural reading flow.
Run 3
The code is generally well-structured and readable. It has a clear class purpose, intuitive method names, and appropriate Javadoc. Nesting in `partitionResult` is moderate (three levels) but acceptable for async error handling. `all()` has a minor inefficiency: it first collects failed partitions into a list, then iterates values to find the first non-null exception, which slightly obscures intent. The `if ((message != null) && !message.isEmpty())` check adds unnecessary verbosity. Line lengths are reasonable, and action granularity is mostly one action per line. Overall, the code is understandable but could be slightly more concise in `all()`.
Run 1
Code Structure: The class is logically organized around a stored future and two clearly separated result methods. Nesting: Moderate nesting in callbacks, especially the loop and conditional error handling in all(), adds some reading effort. Clarity of intent: Descriptive method and variable names, types, and Javadoc make the purpose clear, although returning null to complete Void futures requires familiarity with asynchronous Java APIs. Code length: Generally concise, but duplicated exception construction and message formatting could be simplified. Action granularity: Statements typically perform one action each; the stream pipeline is appropriately split across lines. Reading flow: Constructor-to-method ordering and straightforward success/error branches support natural reading. Minor formatting inconsistencies and collecting failed partitions before separately scanning exceptions slightly interrupt the flow.
Run 2
Code Structure: The class is logically organized into a constructor and two focused result-access methods. Nesting: partitionResult has moderate conditional nesting, while all combines a callback, loop, and nested checks; guard clauses could flatten both. Clarity of intent: Descriptive method and variable names, explicit error handling, and Javadoc make the purpose clear, although null representing success is implicit. Code length: Mostly concise, but all repeats exception construction and message text that could be consolidated. Action granularity: Statements generally perform one action each, and the stream pipeline is split into readable steps. Reading flow: Methods progress naturally from checking errors to completing or returning results. Minor formatting inconsistencies, tightly packed imports, and the mixture of stream processing and iteration slightly interrupt an otherwise clear flow.
Run 3
Code Structure: Well organized into a small result wrapper with separate methods for partition-specific and aggregate outcomes. Nesting: Moderate nesting in asynchronous callbacks, particularly the loop and conditionals in all(), slightly increases reading effort. Clarity of intent: Descriptive method and variable names, explicit error handling, and brief documentation make the purpose clear; null-based success semantics require some inference. Code length: Mostly concise, though duplicated exception construction and message formatting could be simplified. Action granularity: Statements generally perform one action each, and the stream pipeline is broken into readable steps. Reading flow: Natural progression from stored future to constructor and public result methods; nested branches and the combination of stream collection with a subsequent loop modestly interrupt the flow.