Sample
Dorn/java/189
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0.952 | 0–1; higher is more readable | 91.4Δ 3.6 |
| Dorn | 0.939 | 0–1; higher is more readable | 97.5Δ 9.7 |
| Mi | 0.738 | 0–1; higher is more readable | 90.5Δ 2.8 |
| LLOC | 2 | Logical lines; fewer is more readable | 93.7Δ 6.0 |
| DeepSeek V4 Pro | 18.33 | 0–20; mean of three runs | 99.3Δ 11.6 |
| GPT-6.1 Sol | 18 | 0–20; mean of three runs | 93.5Δ 5.7 |
| BTTF | 0.435 | 0–1; higher is more readable | 29.2Δ 58.5 |
| Human | 3.91 | 1–5; original rating | 87.7 |
Views
Select the downloaded ZIP or its extracted folder. Files stay in your browser.
Loading feature diagnosis…
Source regions
Feature contributions
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| 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.962 | −7.442 |
| Source linesThe number of non-empty source lines. | 10 | +4 |
| Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones. | 74.009 | −2.442 |
Intercept 8.87 + feature contributions = 2.985 (log-odds).
Score = sigmoid(2.985) = 0.952.
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. | 44 | +1.802 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 7 | +0.788 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.028 | +0.673 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 7 | −0.495 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 9.978 | −0.27 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 7 | +0.26 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 44 | −0.095 |
Intercept 0.07 + feature contributions = 2.734 (log-odds).
Score = sigmoid(2.734) = 0.939.
| Score | 0.738 |
|---|
| Score | 2 |
|---|
Run 1
The code is highly readable due to its clean structure, consistent formatting, and clear intent. It uses a class to group related constants, a logical naming convention (ADD_KB_ARTICLE, ADD_KB_COMMENT) that clearly indicates purpose, and one action per line. There is no nesting, and the code is concise with no unnecessary length. The reading flow is natural, starting with Javadoc authors followed by the class declaration and constants in a straightforward manner. Minor points deducted because the constants are not explicitly organized by numeric value or categorization beyond the implicit alphabetical grouping, and the Javadoc could include a class-level description for improved documentation.
Run 2
The code is highly readable due to its clear structure and intent. It defines a class with two public static final int constants, each with a descriptive name and a distinct value. The use of Javadoc author tags adds documentation context. The code is flat with no nesting, concise with one action per line, and follows a natural reading flow. Minor deductions include the lack of class-level Javadoc explaining the purpose of the class and the absence of a comment for the second constant (ADD_KB_COMMENT) to match the style of the first, but overall it is very clean and understandable.
Run 3
The code is exceptionally readable. It demonstrates a clear, logical structure for declaring constants, with a straightforward class definition and well-named static final integers. Nesting is non-existent, which is appropriate for this simple use case. The intent is unambiguous—it clearly defines administrative activity keys. The code is concise, with no unnecessary lines. Each constant is declared on its own line, adhering to the 'one action per line' principle perfectly. The reading flow is natural and standard for Java constant definitions. The inclusion of author Javadoc tags is a minor but positive addition for project documentation. Overall, this is a textbook example of clean, maintainable code.
Run 1
Code Structure: A simple class groups related activity constants logically. Nesting: No nested logic, making scanning effortless. Clarity of intent: Descriptive class and constant names convey their purpose, though KB and the numeric values are unexplained. Code length: Concise, with minimal boilerplate. Action granularity: Each constant declaration occupies its own line. Reading flow: Consistent formatting and spacing create a natural top-to-bottom flow. The snippet is incomplete because the class lacks a closing brace, slightly reducing readability.
Run 2
Code Structure: A simple class cleanly groups related activity constants, although the provided snippet lacks a closing brace. Nesting: Only one class level, with no nested logic. Clarity of intent: Descriptive class and constant names clearly indicate administrative activity identifiers, though the significance of values 1 and 5 is unexplained. Code length: Concise, with no unnecessary implementation. Action granularity: Each constant declaration occupies its own line. Reading flow: Consistent formatting and spacing make the declarations easy to scan.
Run 3
Code Structure: A simple class groups related activity constants logically. Nesting: Only one class level, with no nested control flow. Clarity of intent: Descriptive class and constant names make their purpose apparent, though the numeric assignments are unexplained. Code length: Concise, with no unnecessary implementation. Action granularity: Each constant declaration occupies its own line. Reading flow: Consistent formatting and spacing make scanning effortless. The provided snippet lacks a closing class brace, so it appears incomplete.