Sample
int-6178de3d61c1-I08
Select one of ten high-readability unrelated code templates per class
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.746 | 0–1; higher is more readable |
| Dorn | 0.306 | 0–1; higher is more readable |
| Mi | 0.654 | 0–1; higher is more readable |
| LLOC | 73 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 9.67 | 0–20; mean of three runs |
| GPT-6.1 Sol | 16 | 0–20; mean of three runs |
| BTTF | 0.31 | 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. | 5257.372 | −173.493 |
| Source linesThe number of non-empty source lines. | 161 | +64.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.778 | −7.167 |
Intercept 8.87 + feature contributions = -107.39 (log-odds).
Score = sigmoid(-107.39) = 0.
| Score | 0.746 |
|---|
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. | 161 | −4.664 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 154 | +4.59 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 154 | −3.113 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 160.876 | +1.839 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 95.981 | +0.744 |
| 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. | 96 | −0.401 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.085 | +0.115 |
Intercept 0.07 + feature contributions = -0.821 (log-odds).
Score = sigmoid(-0.821) = 0.306.
| Score | 0.654 |
|---|
| Score | 73 |
|---|
Run 1
The code demonstrates good structure with clear separation of concerns and logical organization. The class hierarchy is clean, with appropriate use of inner classes and serialization patterns. However, there are notable issues affecting readability: the stray `runningTotal` block inside the MessageDigestHasher constructor appears to be accidental dead code and disrupts the reading flow. While the main methods have clear intents and reasonable granularity, some methods like the dual constructors introduce slight redundancy. The nesting is manageable, though the `newHasher()` method contains try-catch fall-through logic that could be clearer. The code is concise overall but could benefit from more consistent formatting and removal of the anomalous block. The intent of most methods is clear, but the cloning fallback mechanism requires careful reading to understand fully.
Run 2
The code has significant readability issues. A stray irrelevant loop block (runningTotal/currentNumber) is inexplicably inserted inside the MessageDigestHasher constructor, breaking reading flow and intent. The structure follows normal class organization, but unclear object serialization handling and method ordering hamper natural reading flow. Nesting is generally shallow, and most lines perform one action. However, intent is obscured by this extraneous block and terse serialization logic. The code length is reasonable for a class of this type, but the misplaced loop makes it feel unnecessarily tangled and confusing.
Run 3
The code mostly follows logical structure with clear intent, but it contains a significant flaw: an irrelevant, badly indented block of code inserted inside the MessageDigestHasher constructor. This breaks the reading flow and clarity. The class itself has flat nesting and mostly one action per line, but there are duplicate constructors and some procedural methods that could be simplified. Overall, the accidental inclusion of unrelated code and formatting issues severely reduce readability despite otherwise clean structure.
Run 1
Code Structure: Well-separated digest creation, hashing, and serialization responsibilities, but the constructor contains an unrelated summation block. Nesting: Generally shallow; the cloning fallback and stray block add modest nesting. Clarity of intent: Descriptive methods, explicit checks, and comments clarify most behavior, while the unused runningTotal calculation is distracting and unexplained. Code length: Mostly concise, with some constructor duplication and unnecessary summation code. Action granularity: Statements generally perform one action per line; the final ternary combines digest generation, optional truncation, and wrapping but remains manageable. Reading flow: Consistent formatting and small methods support natural reading, though the poorly indented summation block interrupts it. The validation message also says '<' while the condition permits equality, creating minor confusion.
Run 2
Code Structure: Well-organized adapter with focused helper methods and separate nested classes for serialization and hashing, but an unrelated summation block disrupts the constructor. Nesting: Mostly shallow; clone handling and the unnecessary constructor block introduce modest extra nesting. Clarity of intent: Descriptive names, overrides, and validation make hashing behavior clear, while the unused runningTotal calculation is confusing. Code length: Generally concise and justified, except for the irrelevant loop and some repeated initialization. Action granularity: Statements typically perform one action per line; the final conditional expression remains reasonably readable. Reading flow: Consistent formatting and short methods support natural reading, but the poorly indented summation block interrupts it. The validation message also says '<' where the condition permits '<=', slightly undermining clarity.
Run 3
Code Structure: Well-organized adapter with focused helpers and separate nested classes for serialization and hashing, but an unrelated summation block disrupts the constructor. Nesting: Generally shallow; clone handling and the unnecessary constructor block add modest depth. Clarity of intent: Descriptive names, overrides, and validation make hashing behavior clear, while the unused runningTotal calculation is confusing. Code length: Mostly concise and justified, apart from the extraneous loop and some constructor duplication. Action granularity: Statements generally perform one action per line; the final conditional expression remains manageable. Reading flow: Consistent formatting and short methods support natural reading, but the poorly indented summation block interrupts initialization. The validation message also says '<' although the condition permits equality, creating a minor clarity issue.