Catcher
Tool that combines static exception propagation and search-based software testing to automatically detect (and generate test cases) for API misuses in Java client programs.
Structure
The structure of the experiment folder is the following:
subjects/
contains the subjects for the experiments. Each subject folder contains the.jar
files of the projects.tools/
contains the tools required to run the experiment.
Execution
config.sh
)
Subjects (The subjects are listed in config.sh
. Comment a line to remove one particular subject from the evaluation. Each subject must have a corresponding folder in subjects/
containing the .jar
file used for the analysis.
tools/erec/erec.sh
)
eRec analysis (The eRec analyze is launched using tools/erec/erec.sh
. The script receives as parameters the name of the subject. The folder with the .jar
files for that subject and the experiment folder where to produce the experiment/<subject-name>/erec.json
file used by the synthesizer.
- Inputs:
- Subject name (e.g.,
jfreechart-1.2.0
) - Folder with the
.jar
files (e.g.,subject/jfreechart-1.2.0
) - Experiment location where to produce intermediate files and
erec.json
file (e.g.,experiment/jfreechart-1.2.0
)
- Subject name (e.g.,
- Outputs:
erec.json
file in the experiment location (e.g.,experiment/jfreechart-1.2.0/erec.json
)
tools/synthesizer/synthesize.sh
)
Stack traces synthesis (The stack traces synthesizer is launched using synthesizer/synthesize.sh
. The script receives as parameters the name of the subject and the experiment folder where to find the erec.json
file produced by eRec and produce the stack traces in experiment/<subject-name>/stacktraces
.
- Inputs:
- Subject name (e.g.,
jfreechart-1.2.0
) - Experiment location where to find the
erec.json
file (e.g.,experiment/jfreechart-1.2.0
)
- Subject name (e.g.,
- Outputs:
- Stack traces (
.log
files) inexperiment/<subject-name>/stacktraces
(e.g.,experiment/jfreechart-1.2.0/stacktraces
) <subject-name>.json
file inexperiment/<subject-name>/stacktraces
(e.g.,experiment/jfreechart-1.2.0/stacktraces/jfreechart-1.2.0.json
)
- Stack traces (
tools/evosuite/launcher-1.0.sh
)
EvoSuite analysis (See the guidelines document (catcher-artifact.pdf) for the setting of the parameters and how to launch the tool.
Synthesizing stack traces for a new project
-
In
config.sh
, comment/uncomment the lines of the projects for which you want to synthesize stack traces. Add a line for each new project (the name should be the name used inexperiment/
). -
Execute
. runsynthesizer.sh
.
Tutorial on VM
See catcher-artifact.pdf
Run on VM
https://drive.google.com/file/d/1UuyJTOac9kmzIUNFvFwITFwRConfUPG3/view?usp=sharing
Subjects
https://drive.google.com/open?id=1luIkAC6q9HPhlbdvy_Y8JTKgPnp4cUVi
Main findings
https://drive.google.com/file/d/1GbiggiqCq0sha7OmiZmD3NuJuguPITFZ/view?usp=sharing
Publication
Kechagia M., Devroey X., Panichella A., Gousios G., van Deursen A (2019). Effective and Efficient API Misuse Detection via Exception Propagation and Search-based Testing. In 2019 ACM SIGSOFT International Symposium on Software Testing and Analysis (ISSTA 2019). Beijing, China: ACM.
Pre-print https://pure.tudelft.nl/portal/files/54238155/catcher.pdf