Sample
Schnappinger/junit4/org.junit.rules.TemporaryFolder
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 48.2Δ 3.2 |
| Scalabrino | 0.877 | 0–1; higher is more readable | 83.6Δ 32.2 |
| Dorn | 0.269 | 0–1; higher is more readable | 46.5Δ 4.8 |
| Mi | 0.704 | 0–1; higher is more readable | 84.2Δ 32.8 |
| LLOC | 51 | Logical lines; fewer is more readable | 38.8Δ 12.5 |
| DeepSeek V4 Pro | 17.33 | 0–20; mean of three runs | 73.9Δ 22.6 |
| GPT-6.1 Sol | 18 | 0–20; mean of three runs | 73.8Δ 22.4 |
| BTTF | 0.586 | 0–1; higher is more readable | 55.4Δ 4.1 |
| Human | 3.9 | 1–4; original rating | 51.3 |
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. | 3023.014 | −99.759 |
| Source linesThe number of non-empty source lines. | 152 | +60.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. | 4.456 | −6.685 |
Intercept 8.87 + feature contributions = -36.774 (log-odds).
Score = sigmoid(-36.774) = 0.
| Score | 0.877 |
|---|
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. | 153 | −4.381 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 112 | +3.137 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 112 | −2.149 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 151.83 | +1.712 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 98.948 | +0.792 |
| 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. | 98.915 | −0.524 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.062 | +0.343 |
Intercept 0.07 + feature contributions = -1 (log-odds).
Score = sigmoid(-1) = 0.269.
| Score | 0.704 |
|---|
| Score | 51 |
|---|
Run 1
The code is well-structured and readable. It follows clear separation of concerns: public API methods, lifecycle overrides, and private helpers. Nesting is minimal, with only one conditional level in most methods. Intent is clearly conveyed through descriptive method names like 'newFile', 'newFolder', and 'recursiveDelete'. Code length is appropriate for the functionality provided. Action granularity is mostly one action per line, enhancing clarity. Reading flow is natural, with methods logically ordered: constructors, lifecycle methods, public API, then private utilities. Javadocs further clarify purpose and usage. Minor deducts: 'newFolder(String...)' has slight complexity due to loop logic, but still readable.
Run 2
The code is well-structured and readable. It has clear separation of concerns, with public API methods, lifecycle overrides, and private helpers. Nesting is minimal, mostly limited to simple conditionals and loops. Method names clearly express intent (e.g., `newFile`, `newFolder`, `recursiveDelete`). Code length is appropriate for the functionality; no unnecessary duplication exists. Each line generally performs one action, especially in methods like `createTemporaryFolderIn`. Reading flow is logical: constructors, lifecycle methods, public API, then private utilities. Javadoc is concise and helpful. Minor deductions: the `newFolder(String...)` loop slightly mixes index logic with file creation, and the `create()` method's comment placement is slightly awkward. Overall, this is clean, maintainable Java code.
Run 3
The code is well-structured and follows a clear, logical organization. Class responsibilities are separated cleanly, with public API methods grouped together and private helpers below. Nesting is minimal — the deepest indentation occurs in the newFolder and recursiveDelete methods, but it remains shallow and readable. Intent is clearly expressed through descriptive method names, Javadoc comments, and exception messages that explain failures in plain terms. The code is concise without sacrificing clarity; each method accomplishes one task and is appropriately sized. Action granularity is good: most lines perform a single operation, and loops are straightforward. Reading flow is natural, moving from setup/teardown methods to file creation utilities, then to cleanup helpers. Minor improvements could include extracting the inline conditional logic in newFolder slightly, but overall readability is very high.
Run 1
Code Structure: Well-organized class with focused methods separating lifecycle management, creation, access, and deletion. Nesting: Shallow overall; loops and conditionals introduce only modest nesting. Clarity of intent: Descriptive method names and Javadocs make the purpose clear, although the overloaded folder name and combined mkdir/last-element condition require extra attention. Code length: Mostly concise, with minor redundancy in comments and a small helper that adds navigation overhead. Action granularity: Generally one action per line; the conditional combining directory creation with an index check slightly obscures sequencing. Reading flow: Constructors, lifecycle hooks, creation methods, and cleanup follow a natural progression with consistent formatting. Minor distractions include unnecessary quote escaping and unchecked filesystem operations whose intended failure handling is unclear.
Run 2
Code Structure: Well-organized class with focused methods separating lifecycle management, creation, access, and deletion. Nesting: Mostly flat, with modest nesting in folder creation and recursive deletion. Clarity of intent: Descriptive names, documentation, and explicit exceptions make the purpose clear; the temporary-file-to-directory conversion and compound mkdir condition require closer reading. Code length: Methods are concise, though the last-element helper and repeated documentation add minor verbosity. Action granularity: Generally one action per line; the mkdir call inside a conditional mixes mutation with decision-making. Reading flow: Constructors and lifecycle hooks lead naturally into public operations and supporting helpers, with consistent formatting. Minor naming overlap between the folder field and a parameter slightly reduces clarity.
Run 3
Code Structure: Well organized into constructors, lifecycle hooks, creation methods, and cleanup helpers, with clear separation of responsibilities. Nesting: Generally shallow; recursive deletion has only a conditional and loop, while folder creation uses a loop with one conditional. Clarity of intent: Descriptive method names and Javadocs clearly communicate the temporary-folder lifecycle. Minor ambiguity comes from generic variables such as 'file' and 'folder', and the unexplained create-file/delete/mkdir technique. Code length: Methods are concise, although repetitive documentation and the trivial last-element helper add slight verbosity. Action granularity: Most statements perform one action; combining mkdir() with a last-element check in a condition slightly complicates interpretation. Reading flow: Consistent formatting and sensible method grouping make the class easy to follow, with only minor interruptions from overload delegation and helper lookups.