Sample

Schnappinger/jsweet/def.dom.MSApp

Human rating uses the original dataset scale.

Human3.02
Lines27

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett00–1; higher is more readable
40.8Δ 10.1
Scalabrino0.6390–1; higher is more readable
28.1Δ 2.6
Dorn0.0390–1; higher is more readable
27.1Δ 3.6
Mi0.0050–1; higher is more readable
1.7Δ 29.0
LLOC19Logical lines; fewer is more readable
61.6Δ 30.9
DeepSeek V4 Pro110–20; mean of three runs
12.0Δ 18.6
GPT-6.1 Sol170–20; mean of three runs
55.3Δ 24.6
BTTF0.4030–1; higher is more readable
33.7Δ 3.0
Human3.021–4; original rating
30.7

Views

Source code

package def.dom; import def.js.Object; @jsweet.lang.Interface public abstract class MSApp extends def.js.Object { native public static MSAppAsyncOperation clearTemporaryWebDataAsync(); native public static Blob createBlobFromRandomAccessStream(java.lang.String type, java.lang.Object seeker); native public static java.lang.Object createDataPackage(java.lang.Object object); native public static java.lang.Object createDataPackageFromSelection(); native public static File createFileFromStorageFile(java.lang.Object storageFile); native public static MSStream createStreamFromInputStream(java.lang.String type, java.lang.Object inputStream); native public static void execAsyncAtPriority(MSExecAtPriorityFunctionCallback asynchronousCallback, java.lang.String priority, java.lang.Object... args); native public static java.lang.Object execAtPriority(MSExecAtPriorityFunctionCallback synchronousCallback, java.lang.String priority, java.lang.Object... args); native public static java.lang.String getCurrentPriority(); native public static java.lang.Object getHtmlPrintDocumentSourceAsync(java.lang.Object htmlDoc); native public static java.lang.Object getViewId(java.lang.Object view); native public static java.lang.Boolean isTaskScheduledAtPriorityOrHigher(java.lang.String priority); native public static void pageHandlesAllApplicationActivations(java.lang.Boolean enabled); native public static void suppressSubdownloadCredentialPrompts(java.lang.Boolean suppress); native public static void terminateApp(java.lang.Object exceptionObject); public static java.lang.String CURRENT; public static java.lang.String HIGH; public static java.lang.String IDLE; public static java.lang.String NORMAL; }

Loading feature diagnosis…

Source regions

Feature contributions

Feature contributions

FeatureValueContribution
(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.1957.27−64.59
Source linesThe number of non-empty source lines.27+10.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.759−7.139

Intercept 8.87 + feature contributions = -52.059 (log-odds).
Score = sigmoid(-52.059) = 0.

Score0.639

Feature contributions

FeatureValueContribution
(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.163.964−3.28
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.0−0.804
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.1+0.398
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.072+0.238
Indentation frequencyHow rapidly indentation changes from line to line.26+0.162
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.28+0.045
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.26.927−0.033

Intercept 0.07 + feature contributions = -3.205 (log-odds).
Score = sigmoid(-3.205) = 0.039.

Score0.005
Score19
Run 1

The code is a flat, predictable list of native static method signatures with clear, descriptive names and consistent formatting. This gives it some readability. However, it suffers from poor clarity of intent due to heavy reliance on generic `java.lang.Object` parameters and return types, obscuring the purpose of the methods. The mixed use of Java-native types (`Blob`, `File`, `MSStream`) and JSweet types (`MSAppAsyncOperation`, `MSExecAtPriorityFunctionCallback`) adds confusion. Lines are extremely long, reducing reading flow and action granularity, despite each method being on one line. The class lacks any explanatory comments or grouping, making it a dense wall of declarations. While the structure is simple and flat, the lack of type specificity and contextual documentation significantly lowers overall readability.

Run 2

The code is organized as a single interface with static method declarations, which provides a consistent structure but lacks logical grouping or comments. Nesting is minimal, which is positive, but the flat listing of many unrelated methods reduces scannability. Clarity of intent is moderate: method names are descriptive, but the use of generic 'Object' types and platform-specific terms without context makes some purposes ambiguous. Code length is concise for what it represents, though the one-method-per-line format creates a dense wall of text. Action granularity is appropriate—each declaration is on its own line. Reading flow is natural in a technical sense but disorganized due to alphabetical (or seemingly arbitrary) ordering rather than functional grouping. The absence of documentation or section headers further hampers comprehension.

Run 3

The code is structurally organized as a single interface with static method declarations, which is appropriate for a JSweet native API wrapper. Each method is on one line, making the file concise, but the extremely long lines reduce readability. The naming is clear and intent is obvious (each method maps to an MSApp API operation), and there is no nesting or complex logic. However, the dense formatting with fully qualified types (java.lang.String, java.lang.Boolean, java.lang.Object) adds unnecessary verbosity and disrupts reading flow. Action granularity is acceptable since each line declares one method, but the lack of any spacing or comments makes it feel like an autogenerated stub rather than human-maintained code. Overall, it is readable enough for a type definition file, but could benefit from line wrapping and reduced verbosity.

Run 1

Code Structure: A single, focused API class organizes methods before priority fields, though related methods lack grouping or spacing. Nesting: Completely flat declarations make scanning easy. Clarity of intent: Descriptive method and parameter names convey most purposes, but generic Object types, unexplained platform-specific names, and absent documentation limit understanding. Code length: Concise for an API declaration, although repeated fully qualified types add visual clutter and the Object import is unused. Action granularity: Each line declares exactly one method or field. Reading flow: Consistent formatting and largely alphabetical method ordering support natural scanning, but several long signatures and minimal visual separation reduce readability.

Run 2

Code Structure: A straightforward interface-style class cleanly separates method declarations from priority fields, though related methods could be grouped more explicitly. Nesting: Completely flat apart from the class scope, making scanning easy. Clarity of intent: Descriptive method and parameter names communicate most purposes, but broad Object types and missing documentation obscure some API contracts. Code length: Concise for an API declaration; fully qualified types add visual verbosity. Action granularity: Each line contains exactly one declaration, with no combined operations. Reading flow: Consistent formatting and declaration patterns support natural reading, although long signatures and the lack of spacing between functional groups slightly reduce readability.

Run 3

Code Structure: The class cleanly separates API method declarations from priority fields, although grouping related methods would improve organization. Nesting: There is only class-level nesting, making the code easy to scan. Clarity of intent: Descriptive method and parameter names communicate most purposes, but generic Object types and absent documentation leave some API semantics unclear. Code length: The declarations are concise, though fully qualified types add visual noise and the Object import is unused. Action granularity: Each line contains a single declaration, with no combined actions. Reading flow: Consistent formatting supports straightforward reading, but several long signatures and the lack of spacing between functional groups slightly reduce readability.