Sample
int-c1dca7170204-SRC
Unmodified source class
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.614 | 0–1; higher is more readable |
| Dorn | 0.381 | 0–1; higher is more readable |
| Mi | 0.507 | 0–1; higher is more readable |
| LLOC | 35 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 16.33 | 0–20; mean of three runs |
| GPT-6.1 Sol | 18 | 0–20; mean of three runs |
| BTTF | 0.46 | 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. | 3171.581 | −104.662 |
| Source linesThe number of non-empty source lines. | 93 | +37.2 |
| 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.805 | −7.207 |
Intercept 8.87 + feature contributions = -65.799 (log-odds).
Score = sigmoid(-65.799) = 0.
| Score | 0.614 |
|---|
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. | 94 | −2.292 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 81 | +2.065 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 81 | −1.438 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 92.856 | +0.888 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 95.894 | +0.743 |
| 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. | 95.989 | −0.401 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.109 | −0.12 |
Intercept 0.07 + feature contributions = -0.485 (log-odds).
Score = sigmoid(-0.485) = 0.381.
| Score | 0.507 |
|---|
| Score | 35 |
|---|
Run 1
The code is well-structured and readable. It has a clear class hierarchy, concise helper methods, and logical organization. Nesting is minimal, with early returns reducing complexity in contains(). Action granularity is good—each statement is simple and focused. Naming is clear (e.g., predecessorsOrEmpty, edgeType). Javadocs explain non-obvious behavior. Minor deductions: repeated calls to predecessorsOrEmpty(node) in size(), and contains() has slightly longer boolean logic. Overall, the code follows a consistent style and is easy to understand.
Run 2
The code is generally well-structured and readable. The class has a clear purpose with descriptive method names and a concise enum for edge types. The logic in size() and contains() is moderately complex but not deeply nested. The helper methods predecessorsOrEmpty and successorsOrEmpty improve intent clarity. However, readability is slightly reduced by the inline conditional expression in size() which combines multiple operations on one line, and by the repeated calls to predecessorsOrEmpty(node) within the same expression. The contains() method could be refactored to reduce branching, but it remains understandable. Overall, the code is clean, logical, and follows good practices.
Run 3
The code is generally well-structured and readable. It has a clear class purpose, sensible field naming, and a straightforward constructor. Methods are short and focused, with low nesting. Helper methods like `predecessorsOrEmpty` and `successorsOrEmpty` reduce duplication and clarify intent. The `size()` and `contains()` methods have a few conditionals but remain flat and logically ordered. However, readability is slightly reduced by the long ternary expression in `size()`, which combines subtraction and containment logic in one line. The `contains()` method also mixes type checking, directedness checks, and edge endpoint comparison, which could be broken into smaller private methods for better action granularity. Overall, the code is maintainable but a few denser expressions and conditionals prevent a higher score.
Run 1
Code Structure: The class is logically organized into fields, an enum, a constructor, public operations, and focused private helpers. Nesting: Shallow conditional branches and early validation returns keep complexity low. Clarity of intent: Descriptive names and documentation clearly explain edge filtering and membership checks; the self-loop adjustment in size() would benefit from a comment. Code length: Concise overall, with minor repetition in helper conditions and predecessor lookups. Action granularity: Statements generally perform one action each, although compound Boolean expressions and the size calculation require extra attention. Reading flow: Consistent formatting and distinct directed versus undirected branches support natural reading, with only the dense size expression slightly interrupting the flow.
Run 2
Code Structure: Fields, enum, constructor, overridden methods, and private helpers are logically organized. Nesting: Control flow is shallow, with guard clauses in contains() reducing complexity. Clarity of intent: Descriptive names, enum comments, and helper documentation explain edge filtering well; the self-loop correction in size() would benefit from a comment. Code length: Compact and appropriate, although repeated predecessorsOrEmpty(node) calls and explicit else branches add minor verbosity. Action granularity: Statements generally perform one action per line; compound return expressions remain readable but require some attention. Reading flow: Consistent formatting and clear directed-versus-undirected branches make the code easy to follow, with only the size calculation and compound membership checks slowing comprehension.
Run 3
Code Structure: Well-organized class with focused methods, an explicit edge-type enum, and reusable helpers. Nesting: Shallow conditionals and early validation returns keep complexity low. Clarity of intent: Descriptive names and helper documentation clearly convey incoming/outgoing edge filtering; the self-loop subtraction in size() would benefit from a comment. Code length: Concise overall, though repeated predecessor lookups and explicit else branches add minor verbosity. Action granularity: Statements generally perform one action each; compound return expressions remain manageable but require careful reading. Reading flow: Fields, constructor, public operations, and private helpers follow a natural order. Directed and undirected cases are clearly separated, although the size calculation and symmetric membership expressions slightly slow comprehension.