Sample
int-98c8ff3c675e-I02
Shorten method, parameter, and local names without collisions
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 1 | 0–1; higher is more readable |
| Scalabrino | 0.907 | 0–1; higher is more readable |
| Dorn | 0.753 | 0–1; higher is more readable |
| Mi | 0.398 | 0–1; higher is more readable |
| LLOC | 1 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 18.33 | 0–20; mean of three runs |
| GPT-6.1 Sol | 15 | 0–20; mean of three runs |
| BTTF | 0.719 | 0–1; higher is more readable |
Views
Loading feature diagnosis…
Source regions
Feature contributions
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Source linesThe number of non-empty source lines. | 51 | +20.4 |
| Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones. | 382.574 | −12.625 |
| 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.902 | −7.353 |
Intercept 8.87 + feature contributions = 9.292 (log-odds).
Score = sigmoid(9.292) = 1.
| Score | 0.907 |
|---|
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. | 52 | −0.805 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.015 | +0.791 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 85.577 | +0.576 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 50.856 | +0.301 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 18 | −0.115 |
| 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. | 88.981 | −0.104 |
Intercept 0.07 + feature contributions = 1.114 (log-odds).
Score = sigmoid(1.114) = 0.753.
| Score | 0.398 |
|---|
| Score | 1 |
|---|
Run 1
The code is highly readable. It has a clear, logical structure with a well-documented interface and a single method. The nesting is perfectly flat, and the intent is unambiguous—defining a callback for setting custom SQL types. The length is concise and appropriate, with no unnecessary code. Action granularity is excellent, as the method signature spans multiple lines for clarity. The reading flow is natural, starting with package/imports, followed by comprehensive Javadoc, and ending with a clean method definition. Minor deductions are for the slightly inconsistent parameter names (e.g., 'param' vs 'paramIndex' and 'sql2' vs 'sqlType'), which slightly reduce clarity.
Run 2
This is a well-structured Spring JDBC interface with clear intent and purpose. The code is logically organized with imports, a comprehensive Javadoc explaining the interface's role, and concise method signatures. Nesting is effectively flat—no conditional blocks or loops exist. The action granularity is appropriate: the constant declaration and method signature are clear and separated. The reading flow follows a natural progression: package, imports, documentation, constant, then method. Minor concerns include the parameter names 'sql2' and 'type', which are slightly ambiguous compared to the Javadoc's 'sqlType' and 'typeName', creating a small readability gap. Additionally, the Javadoc is extensive, which is beneficial for maintainability but adds verbosity. Overall, the code demonstrates strong readability with only minor naming inconsistencies preventing a perfect score.
Run 3
This code is highly readable. The structure is logical: package, imports, interface Javadoc, constant, method declaration. Nesting is completely flat since it is a single interface. Intent is clearly communicated through comprehensive Javadoc explaining the purpose of the interface and its method. The code is concise—no unnecessary methods or fields. Action granularity is sound with the method signature spanning lines for clarity but performing a single logical operation. The reading flow is natural, following standard Java conventions. The only minor deductions are the slightly inconsistent parameter names (e.g., 'param' vs 'paramIndex', 'sql2' instead of 'sqlType') between the Javadoc and the method signature, and the use of '@Nullable' which requires a moment's pause to understand its role. Overall, this is exemplary interface design.
Run 1
Code Structure: Well-organized interface with imports, a constant, and a single method. Nesting: Minimal, with no nested control flow. Clarity of intent: Interface documentation explains the purpose, but references setTypeValue while the actual method is named set. Parameter documentation also mismatches the declaration (paramIndex/param, sqlType/sql2, typeName/type), and sql2 is particularly unclear. Code length: The implementation is concise, though documentation is somewhat repetitive. Action granularity: Each declaration occupies its own logical line, with a sensible method-signature wrap. Reading flow: Generally natural, progressing from interface purpose to constant and method, but inconsistent naming and stale documentation interrupt comprehension.
Run 2
Code Structure: The interface is logically organized into imports, documentation, a constant, and one method. Nesting: There is no nested logic, making it easy to scan. Clarity of intent: The interface purpose is explained well, but documentation refers to setTypeValue while the method is named set. Documented parameter names also differ from the signature, and param, sql2, and type are less descriptive than paramIndex, sqlType, and typeName. Code length: The implementation is concise, though documentation is somewhat repetitive. Action granularity: Each declaration occupies its own logical unit, with no combined actions. Reading flow: The overall progression is natural, but documentation/signature inconsistencies interrupt understanding and reduce confidence in the API contract.
Run 3
Code Structure: Clean interface organization with imports, a constant, and one method. Nesting: Flat, with no nested logic. Clarity of intent: Class documentation explains the purpose well, but the method is named set while documentation references setTypeValue. Parameter names param, sql2, and type are vague and do not match the documented paramIndex, sqlType, and typeName, reducing confidence in the contract. Code length: Implementation is concise; documentation is somewhat repetitive but mostly useful. Action granularity: Each declaration occupies its own logical statement, with a readable wrapped method signature. Reading flow: Conventional Java ordering makes navigation easy, though inconsistent documentation and extra blank lines interrupt an otherwise natural flow.