A tool to identify and compare unchecked exceptions in Java applications and libraries.
UncheckedException is a powerful utility to:
- Detect all unchecked exceptions present in a Java application.
- Compare versions of a Java library to find newly added unchecked exceptions.
To find unchecked exceptions in the code, follow these steps:
-
Build the Project
mvn clean package
-
Run the Application
java -cp target/unexpectedException-1.0-SNAPSHOT.jar org.vinayak.Main <pathToJarFile> <libraryName>
This will generate a JSON file named
<libraryName>.json
containing the unchecked exceptions found.
To compare unchecked exceptions between two versions of a library:
-
Run the Python Script
python3 findUCBBC.py <owner/repo> <sha>
The output will be several JSON files:
- individual library analysis results saved in ./LibraryResults
- comparison result of libraries saved in ./CompareResults
- Library-Client match result saved in ./Match
- It will also update or create the result.csv and combined_results.csv in ./results
- Java: Ensure you have Maven installed for building the Java project.
- Python: Make sure Python 3.x is installed for running the comparison script.
To analyze a library named myLibrary.jar
and compare two versions:
- Place the JAR files in resources
- Build Java Program
mvn clean package
- Compare Versions
cd scripts python3 findUCBCC.py <owner/repo> <sha>