Sample
int-b49dbc9bd302-I11
Split eligible integer literals into pairs of short-named intermediate variables
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.262 | 0–1; higher is more readable |
| Dorn | 0.149 | 0–1; higher is more readable |
| Mi | 0.082 | 0–1; higher is more readable |
| LLOC | 57 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 10.33 | 0–20; mean of three runs |
| GPT-6.1 Sol | 14 | 0–20; mean of three runs |
| BTTF | 0.251 | 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. | 8237.568 | −271.84 |
| Source linesThe number of non-empty source lines. | 167 | +66.8 |
| 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.05 | −7.575 |
Intercept 8.87 + feature contributions = -203.745 (log-odds).
Score = sigmoid(-203.745) = 0.
| Score | 0.262 |
|---|
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. | 168 | −4.912 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 128 | +3.69 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 128 | −2.516 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 166.861 | +1.923 |
| 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. | 113.935 | −1.161 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 113.964 | +1.034 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.084 | +0.127 |
Intercept 0.07 + feature contributions = -1.745 (log-odds).
Score = sigmoid(-1.745) = 0.149.
| Score | 0.082 |
|---|
| Score | 57 |
|---|
Run 1
The code is structurally organized but has significant readability issues. The main problem is the use of meaningless variables like 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h' throughout the fully-qualified method name processing and uniqueness check. These variables obscure intent - for example, 'indexOfHash != -(a + b)' actually means 'indexOfHash != -1' but requires mental arithmetic. The method is also quite long with multiple responsibilities (processing qualified names, filtering methods, validating results). While the class has good Javadoc and the code follows Spring conventions, the control flow in findTestBeanFactoryMethod is complex. Positive aspects include clear method names, reasonable use of helper methods, and good error messages. However, the artificial variable naming suggests possible obfuscation or code optimization that ran counter to human readability. The nesting level is moderate but the logic branches make the flow difficult to follow.
Run 2
The code has clear method names, Javadoc, and logical separation of concerns, but it is significantly undermined by obscured arithmetic expressions. Variables like 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h' are used to encode simple integers (e.g., -(a+b) for 1, c+d for 0, g+h for 1) without any purpose, harming clarity and maintainability. Nesting is moderate but acceptable; flow is mostly linear. Action granularity is generally good, except for the confusing substring and assertion lines. The intent of finding factory methods is clear, but the deliberate obfuscation of boundary values makes the implementation harder to read than necessary. Concise for what it does, but the readability penalty keeps the score low.
Run 3
The code has some clear structure through methods and Javadoc, but readability is severely undermined by bizarre constant manipulations (e.g., `final int a = 2; final int b = -1; if (indexOfHash != -(a + b))`, `substring((c + d), indexOfHash)`). These obscure trivial operations like checking for index != -1 or adding 1, making the logic needlessly confusing. The method `findTestBeanFactoryMethod` is quite long and performs multiple tasks: parsing fully-qualified names, loading classes, filtering methods, and validating uniqueness. Nesting is moderately deep, especially within the fully-qualified name processing loop. Variable names like `a`, `b`, `c` are unhelpful. The code is not concise due to these obfuscations. While the overall flow is understandable, the unnecessary arithmetic constants create ambiguity and hurt clarity of intent. Action granularity is mostly one action per line, which is good, but reading flow is disrupted by the artificial complexity.
Run 1
Code Structure: Well-organized methods separate handler creation, factory lookup, and enclosing-class traversal, although the main lookup method handles several responsibilities. Nesting: Mostly shallow, with moderate nesting around fully qualified names and exception handling. Clarity of intent: Descriptive method names, documentation, and validation messages explain the purpose well, but meaningless variables a through h and arithmetic expressions obscure simple constants. Code length: Generally appropriate, though those unnecessary declarations inflate the implementation. Action granularity: Most statements perform one action per line; compound predicates and chained stream operations require slightly more attention. Reading flow: The overall progression from configuration to lookup and validation is natural, but artificial constant calculations interrupt it, and long assertions make the central lookup logic harder to scan.
Run 2
Code Structure: Responsibilities are logically divided among handler creation, factory-method lookup, and recursive discovery, though the main lookup method is relatively large. Nesting: Mostly shallow, with moderate nesting in the qualified-name loop and its try/catch. Clarity of intent: Descriptive method names, documentation, and useful error messages explain the purpose well, but meaningless variables a through h and arithmetic replacing -1, 0, and 1 obscure simple operations. Code length: Generally justified by validation and search requirements, but the artificial constant declarations add unnecessary length. Action granularity: Most lines perform one action; chained stream operations and compound assertions remain understandable but require extra attention. Reading flow: The progression from annotation validation to method discovery and handler construction is natural. Within discovery, distracting arithmetic and long multiline assertions interrupt an otherwise coherent flow.
Run 3
Code Structure: Clearly separated handler creation, factory-method lookup, and recursive search, though the main lookup method handles several concerns. Nesting: Mostly shallow, with moderate nesting in fully qualified name parsing and class loading. Clarity of intent: Descriptive method names, documentation, and helpful error messages explain the purpose well. However, meaningless variables a through h and arithmetic expressions replacing -1, 0, and 1 obscure simple operations. Code length: Generally reasonable, but unnecessary constant declarations add clutter, and the lookup method is relatively long. Action granularity: Most lines perform one action; multiline predicates and assertions remain understandable. Reading flow: The sequence from validation through discovery to result selection is logical, but artificial arithmetic and repeated verbose assertions interrupt scanning.