Related Experiment Video
Updated: Jul 7, 2025

Using Capillary Electrophoresis to Quantify Organic Acids from Plant Tissue: A Test Case Examining Coffea arabica Seeds
Published on: November 12, 2016
Lightweight precise automatic extraction of exception preconditions in java methods
Diego Marcilio1, Carlo A Furia1
1Software Institute, USI Università della Svizzera italiana, Lugano, Switzerland.
Abstract:
When a method throws an exception- its exception precondition-is a crucial element of the method's documentation that clients should know to properly use it. Unfortunately, exceptional behavior is often poorly documented, and sensitive to changes in a project's implementation details that can be onerous to keep synchronized with the documentation. We present wit, an automated technique that extracts the exception preconditions of Java methods and constructors. wit uses static analysis to analyze the paths in a method's implementation that lead to throwing an exception. wit's analysis is precise, in that it only reports exception preconditions that are correct and correspond to feasible exceptional behavior. It is also lightweight: it only needs the source code of the class (or classes) to be analyzed- without building or running the whole project. To this end, its design uses heuristics that give up some completeness (wit cannot infer all exception preconditions) in exchange for precision and ease of applicability. We ran wit on the JDK and 46 Java projects, where it discovered 30 487 exception preconditions in 24 461 methods, taking less than two seconds per analyzed public method on average. A manual analysis of a significant sample of these exception preconditions confirmed that wit is 100% precise, and demonstrated that it can document the exceptional behavior of Java methods.
Related Concept Videos
Precipitation and Co-precipitation
Washing, Drying, and Ignition of Precipitates
Quantifying and Rejecting Outliers: The Grubbs Test
Detection of Gross Error: The Q Test
Systematic Error: Methodological and Sampling Errors
Sampling errors originate from improper sampling methods or the wrong sample population. These errors can be minimized by refining the sampling strategy. Defective instruments or faulty calibrations are the sources of instrumental...
Data Validation
Key parameters for method validation include:

