Sample

Schnappinger/argoUML/org.argouml.cognitive.UnresolvableException

Human rating uses the original dataset scale.

Human3.91
Lines56

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett10–1; higher is more readable
98.7Δ 43.9
Scalabrino0.9530–1; higher is more readable
98.6Δ 43.8
Dorn0.7840–1; higher is more readable
81.8Δ 27.1
Mi0.5770–1; higher is more readable
54.1Δ 0.7
LLOC1Logical lines; fewer is more readable
98.3Δ 43.6
DeepSeek V4 Pro170–20; mean of three runs
66.8Δ 12.0
GPT-6.1 Sol180–20; mean of three runs
73.8Δ 19.0
BTTF0.8650–1; higher is more readable
99.3Δ 44.6
Human3.911–4; original rating
54.8

Views

Source code

/* $Id: UnresolvableException.java 17813 2010-01-12 18:33:21Z linus $ ***************************************************************************** * Copyright (c) 2009 Contributors - see below * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * mvw ***************************************************************************** * * Some portions of this file was previously release using the BSD License: */ // Copyright (c) 1996-2006 The Regents of the University of California. All // Rights Reserved. Permission to use, copy, modify, and distribute this // software and its documentation without fee, and without a written // agreement is hereby granted, provided that the above copyright notice // and this paragraph appear in all copies. This software program and // documentation are copyrighted by The Regents of the University of // California. The software program and documentation are supplied "AS // IS", without any accompanying services from The Regents. The Regents // does not warrant that the operation of the program will be // uninterrupted or error-free. The end-user understands that the program // was developed for research purposes and is advised not to rely // exclusively on the program for any reason. IN NO EVENT SHALL THE // UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, // SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, // ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF // THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY // WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE // PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF // CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, // UPDATES, ENHANCEMENTS, OR MODIFICATIONS. package org.argouml.cognitive; /** * Thrown to indicate a failure to resolve a critic. */ public class UnresolvableException extends Exception { /** * Creates a new UnresolvableException with message msg. * * @param msg A message describing what caused the exception. */ public UnresolvableException(String msg) { super(msg); } }

Loading feature diagnosis…

Source regions

Feature contributions

Feature contributions

FeatureValueContribution
(log-odds)
Source linesThe number of non-empty source lines.56+22.4
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.194−7.791
Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones.112.588−3.715

Intercept 8.87 + feature contributions = 19.764 (log-odds).
Score = sigmoid(19.764) = 1.

Score0.953

Feature contributions

FeatureValueContribution
(log-odds)
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.57−0.982
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.005+0.896
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.76.526+0.43
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.55.848+0.371
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.78+0.361
Indentation frequencyHow rapidly indentation changes from line to line.14−0.253

Intercept 0.07 + feature contributions = 1.291 (log-odds).
Score = sigmoid(1.291) = 0.784.

Score0.577
Score1
Run 1

The code is highly readable due to clear structure, minimal nesting, and simple intent. The class has a single, focused responsibility and follows standard Java exception patterns. The constructor is concise, with one action per line, and the reading flow is natural. However, the extensive copyright and license header, while legally necessary, adds significant noise before reaching the actual code, reducing overall readability. The Javadoc comments are helpful but could be slightly more descriptive regarding when the exception is thrown.

Run 2

The code is highly readable. It follows a standard Java class structure: package declaration, imports (none needed), class definition, and constructor. Nesting is minimal—only the class and constructor levels exist. Intent is clear: a custom exception with a descriptive Javadoc comment. The code is concise, with no unnecessary methods or fields. Each action (constructor invocation) is on its own line, contributing to clarity. The reading flow is natural, though the extensive license header (over 40 lines) disrupts the immediate understanding of the code's purpose. The class name 'UnresolvableException' and its documentation make the failure scenario explicit. The constructor properly calls the parent Exception constructor, following Java conventions. Overall, the code is a clean, well-documented, single-purpose exception class.

Run 3

The code is highly readable due to its simple, focused structure: a single class extending Exception with one constructor. There is minimal nesting, clear intent (documented via Javadoc and comments), and concise length. Each action is on its own line, and the reading flow is natural — package, class declaration, constructor, then super call. The only deduction is for the extensive license and copyright header, which, while necessary, slightly obscures the actual code and could be shortened or moved to a separate file.

Run 1

Code Structure: Conventionally organized into package, documented class, and constructor. Nesting: Minimal, with only class and constructor scopes. Clarity of intent: The exception name, superclass, and documentation clearly convey a critic-resolution failure; 'msg' is understandable but less descriptive than 'message'. Code length: The implementation is appropriately concise, although lengthy license notices dominate the file and delay reaching the functional code. Action granularity: The constructor performs exactly one action on one line. Reading flow: The declaration-to-constructor progression is natural, but mixed indentation and tab spacing slightly reduce visual consistency.

Run 2

Code Structure: A straightforward package declaration and single exception class with one constructor provide clear organization. Nesting: Minimal nesting, limited to the class and constructor. Clarity of intent: The class name, inheritance, and documentation clearly identify an exception for critic-resolution failures; 'msg' is understandable but less descriptive than 'message'. Code length: The implementation is concise, although lengthy licensing comments dominate the file and delay reaching the relevant code. Action granularity: The constructor performs one action on its own line. Reading flow: Documentation naturally precedes declarations, and the constructor directly delegates to the superclass. Mixed indentation and unconventional brace placement slightly reduce visual consistency.

Run 3

Code Structure: Logically organized as a single exception class with one constructor. Nesting: Minimal, limited to the class and constructor. Clarity of intent: The class name, inheritance, and documentation clearly convey a critic-resolution failure; 'msg' is understandable but less descriptive than 'message'. Code length: The implementation is concise, although extensive license comments dominate the file. Action granularity: The constructor contains one clear action on its own line. Reading flow: Package, class documentation, declaration, and constructor follow a natural order. Mixed tab/space indentation and the lengthy header slightly reduce visual consistency and scanning efficiency.