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.
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.
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.
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
)
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 (
See the guidelines document (catcher-artifact.pdf) for the setting of the parameters and how to launch the tool.
-
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
.
See catcher-artifact.pdf
https://drive.google.com/file/d/1UuyJTOac9kmzIUNFvFwITFwRConfUPG3/view?usp=sharing
https://drive.google.com/open?id=1luIkAC6q9HPhlbdvy_Y8JTKgPnp4cUVi
https://drive.google.com/file/d/1GbiggiqCq0sha7OmiZmD3NuJuguPITFZ/view?usp=sharing
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