Sample
int-ac6573e19a1f-I09
Select one of ten low-readability unrelated code templates per class
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.576 | 0–1; higher is more readable |
| Dorn | 0.114 | 0–1; higher is more readable |
| Mi | 0.561 | 0–1; higher is more readable |
| LLOC | 60 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 16 | 0–20; mean of three runs |
| GPT-6.1 Sol | 15.67 | 0–20; mean of three runs |
| BTTF | 0.237 | 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. | 5852 | −193.116 |
| Source linesThe number of non-empty source lines. | 173 | +69.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. | 5.187 | −7.78 |
Intercept 8.87 + feature contributions = -122.826 (log-odds).
Score = sigmoid(-122.826) = 0.
| Score | 0.576 |
|---|
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. | 174 | −5.124 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 162 | +4.866 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 162 | −3.297 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 172.791 | +2.005 |
| 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. | 127.989 | −1.756 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 127.983 | +1.26 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.105 | −0.077 |
Intercept 0.07 + feature contributions = -2.051 (log-odds).
Score = sigmoid(-2.051) = 0.114.
| Score | 0.561 |
|---|
| Score | 60 |
|---|
Run 1
The code is generally well-structured and readable, with clear intent for a read-only HTTP headers wrapper. Methods are concise and follow a consistent pattern of throwing UnsupportedOperationException for mutating operations. However, readability is significantly impacted by a suspicious obfuscated line in the constructor containing bitwise operations and a meaningless variable name, which serves no apparent purpose and disrupts the reading flow. The headerSet() method uses a multi-line stream chain that, while functional, is somewhat complex. The caching logic in getContentType() and getAccept() introduces unnecessary nested conditionals that could be simplified. Overall, the class is logically organized and most methods are clear, but the anomalous obfuscated code and minor complexity in headerSet() prevent a higher score.
Run 2
The code is generally well-structured and readable, with clear intent for each method. It follows a consistent pattern of throwing UnsupportedOperationException for mutating operations and returning unmodifiable views for read operations. The use of caching for getContentType and getAccept is logical. However, there is a single line of obfuscated code (the bitwise operation) in the constructor, likely inserted by a bug or tool, which severely harms readability and should be removed. The headerSet method uses a stream with a somewhat complex collect operation, but it is understandable. Overall, the code is concise, has flat nesting, and clear naming, but the one obfuscated line prevents a higher score.
Run 3
The code is generally well-structured and readable, with clear intent and appropriate use of the 'UnsupportedOperationException' pattern to enforce immutability. Methods are concise, follow a logical order, and avoid deep nesting. However, readability is reduced by an unexplained obfuscated block in the constructor (containing meaningless variable names and bitwise operations) that appears to be leftover debugging or inserted code. Additionally, the 'headerSet()' method uses a moderately complex stream pipeline with a trailing inline comment that slightly disrupts natural reading flow. Minor issues include some redundant null checks and non-standard formatting. Overall, it is highly readable apart from the constructor anomaly.
Run 1
Code Structure: Well-organized overrides and separate caching fields make the class easy to navigate. Nesting: Mostly shallow, with simple conditionals and a single loop; the constructor adds unnecessary block nesting. Clarity of intent: Names, documentation, unmodifiable wrappers, and rejected mutations clearly communicate read-only behavior, but the constructor's opaque variable and pointless bitwise operations obscure intent. Code length: Most methods are concise; repeated exception-throwing overrides are understandable API boilerplate, while the constructor contains needless code. Action granularity: Generally one action per line, except the constructor's compressed sequence of declarations, assignments, and branching. Reading flow: Consistent formatting and predictable methods support natural reading, but the anomalous constructor line interrupts it, and the nested collector expression requires extra attention.
Run 2
Code Structure: Logically organized around a read-only headers wrapper, with focused overrides and clear documentation. Nesting: Mostly shallow; caching branches and iteration are easy to follow, though the collector expression adds complexity. Clarity of intent: Descriptive names, unmodifiable wrappers, and explicit exceptions communicate the purpose well. However, the constructor contains unexplained, obfuscated arithmetic with an opaque variable name that obscures intent. Code length: Most methods are concise; repeated mutation-blocking overrides are justified by the API, while the constructor block is unnecessary noise. Action granularity: Generally one action per line, except the constructor's compressed block combines declarations, assignments, and branching. Reading flow: Consistent formatting and predictable methods support natural reading, but the unindented constructor block sharply interrupts it.
Run 3
Code Structure: Well-organized overrides implement a coherent read-only wrapper, although the constructor contains unrelated obfuscated code. Nesting: Mostly flat methods with shallow conditionals and a simple loop; the constructor block and collector pipeline add minor complexity. Clarity of intent: Descriptive names, documentation, and consistent mutation exceptions clearly communicate purpose, but the cryptic constructor arithmetic has no apparent purpose. Code length: Most methods are concise; repeated overrides are justified by the interface, while redundant else branches and constructor noise add unnecessary length. Action granularity: Generally one action per line, except the constructor's compressed block combining declarations, assignments, and conditional logic. Reading flow: Consistent formatting and predictable method implementations support scanning, but the unformatted constructor block abruptly disrupts the flow, and the nested collector expression requires closer attention.