Sample
int-2e153b8a2d0b-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.372 | 0–1; higher is more readable |
| Dorn | 0.163 | 0–1; higher is more readable |
| Mi | 0.359 | 0–1; higher is more readable |
| LLOC | 26 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 10.33 | 0–20; mean of three runs |
| GPT-6.1 Sol | 14.33 | 0–20; mean of three runs |
| BTTF | 0.122 | 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. | 2055.327 | −67.826 |
| Source linesThe number of non-empty source lines. | 55 | +22 |
| 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.088 | −7.632 |
Intercept 8.87 + feature contributions = -44.588 (log-odds).
Score = sigmoid(-44.588) = 0.
| Score | 0.372 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| 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. | 158.982 | −3.069 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 159 | +1.761 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 56 | −0.946 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 45 | +0.819 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 45 | −0.612 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 54.856 | +0.357 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.098 | −0.014 |
Intercept 0.07 + feature contributions = -1.634 (log-odds).
Score = sigmoid(-1.634) = 0.163.
| Score | 0.359 |
|---|
| Score | 26 |
|---|
Run 1
The code is mostly readable, with a clear Javadoc and a straightforward method for returning default values. However, the obfuscated code inside the private constructor severely undermines clarity. It serves no purpose, obscures intent, and would confuse any reader. The if-else chain is flat but repetitive, and could be replaced with a switch or map for better structure. Action granularity is good, with one return per branch. Reading flow is natural aside from the constructor. Overall, the main logic is fine but the unexplained obfuscation lowers the score significantly.
Run 2
The code is generally readable with clear intent and good structure. The class has a single, well-documented purpose with Javadoc explaining the defaultValue method's behavior. The method uses a flat if-else chain for primitive type checking, which is straightforward but somewhat verbose. There's a minor issue in the private constructor containing an obfuscated, meaningless line that appears to be dead code, which hurts clarity. The static final constants are well-named, and the @SuppressWarnings annotations are appropriately documented. The code could be improved by using a switch statement or a map for type mappings to reduce length, but the current approach is acceptable for readability. Overall, the code is clear but has minor flaws.
Run 3
The code is largely unreadable due to several critical issues. The private constructor contains obfuscated, meaningless bitwise operations on local variables serving no purpose. This destroys clarity of intent and action granularity. The defaultValue method exhibits deep nesting through a chain of if-else statements, reducing readability. While constants and method documentation are clear, the method's repetitive casting and sequence of primitive type checks make the reading flow choppy and unnecessarily long. The overall structure is logical but undermined by the constructor's junk code and dense conditional chain. These issues severely compromise readability despite some good naming and Javadoc practices.
Run 1
Code Structure: The utility class is logically organized, with constants and a single focused public method, but the constructor contains unrelated, obfuscated calculations. Nesting: The method has only two conditional levels, making control flow easy to follow. Clarity of intent: Documentation, descriptive names, and explicit primitive-type checks clearly convey the main purpose; meaningless constructor variables and bitwise operations obscure intent locally. Code length: The type-dispatch chain is reasonably concise, although repetitive, while the constructor adds unnecessary code. Action granularity: Most statements perform one action per line, but the constructor compresses several declarations and assignments onto one line. Reading flow: The main method follows a natural check-and-return sequence; inconsistent constructor formatting and unexplained calculations interrupt otherwise smooth reading.
Run 2
Code Structure: The class is logically organized around a single utility method, but the constructor contains unrelated obfuscated operations. Nesting: The method has only two conditional levels, making branches easy to follow; the constructor adds an unnecessary block. Clarity of intent: Documentation, method names, and explicit primitive-type comparisons clearly explain the main purpose, while cryptic constructor variables and redundant bitwise operations obscure intent. Code length: The type-selection chain is reasonable for the supported types, but the constructor adds needless code. Action granularity: Most lines perform one clear action; the constructor compresses several declarations and assignments onto one line. Reading flow: The main method follows a predictable check-and-return sequence, but inconsistent constructor formatting and dense expressions interrupt otherwise natural reading.
Run 3
Code Structure: The class, constants, and default-value method are logically organized, but the constructor contains unrelated obfuscated operations. Nesting: The method has only two conditional levels and straightforward return branches; the constructor adds an unnecessary block. Clarity of intent: Documentation, method naming, and explicit primitive comparisons clearly explain the main behavior, while cryptic constructor variables and bitwise expressions obscure their purpose. Code length: The primitive dispatch is reasonably concise, but the constructor adds unnecessary code. Action granularity: Most statements occupy separate lines; the constructor compresses several declarations and assignments onto one line. Reading flow: The defaultValue method reads naturally and consistently, but the poorly formatted constructor abruptly interrupts that flow.