Botsing is a Java framework for crash reproduction. It depends on EvoSuite (http://www.evosuite.org) for code instrumentation.
Switch branches/tags
Nothing to show
Clone or download

README.md

Botsing

Build Status Coverage Status Maven Central

Botsing is a Java framework for crash reproduction. It relies on EvoSuite for code instrumentation.

Usage

Command line interface

The latest version of Botsing command line (botsing-reproduction-X-X-X.jar) is available at https://github.com/STAMP-project/botsing/releases.

Botsing has three mandatory parameters:

  • -crash_log the file with the stack trace. The stack trace should be clean (no error message) and cannot contain any nested exceptions.
  • -target_frame the target frame to reproduce. This number should be between 1 and the number of frames in the stack trace.
  • -projectCP the classpath of the project and all its dependencies. The classpath can be a folder containing all the .jar files required to run the software under test.

By default, Botsing uses the following parameter values:

  • -Dsearch_budget=1800, a time budget of 30 min. This value can be modified by specifying an additional parameter in format -Dsearch_budget=60 (here, for 60 seconds).
  • -Dpopulation=100, a default population with 100 individuals. This value may be modified using -Dpopulation=10 (here, for 10 individuals).
  • -Dtest_dir=crash-reproduction-tests, the output directory where the tests will be created (if any test is generated). This value may be modified using -Dtest_dir=newoutputdir.

To check the list of options, use:

$ java -jar botsing-reproduction.jar -help
usage: java -jar botsing-reproduction.jar -crash_log stacktrace.log -target_frame 2
            -projectCP dep1.jar;dep2.jar  )
 -crash_log <arg>      File with the stack trace
 -D <property=value>   use value for given property
 -help                 Prints this help message.
 -projectCP <arg>      classpath of the project under test and all its
                       dependencies
 -target_frame <arg>   Level of the target frame

Example

java -jar botsing-reproduction.jar -crash_log LANG-1b.log -target_frame 2 -projectCP ~/bin

Contributing

Botsing is licensed under Apache-2.0, pull request as are welcome.

Coding style

The coding style is described in checkstyle.xml. Please (successfully) run the command mvn checkstyle:check before submitting a pull request.

Adding a dependency

Dependencies are managed at the module level. Each module declares a list of Maven dependencies, if you want to add one, simply add it to the list (see for instance botsing-reproduction/pom.xml). However, dependency version must be declared as a property in the parent pom.xml file using the following syntax:

<properties>
  ...
  <!-- Dependencies versions -->
  <!-- To ensure a proper management of dependencies, all versions have to be declared here -->
  <depdencendy-artifactId.version>1.1.1</depdencendy-artifactId.version>
  ...
</properties>

And referenced in the dependencies of the module using the following syntax:

<dependencies>
  <dependency>
    <groupId>com.groupId</groupId>
    <artifactId>depdencendy-artifactId</artifactId>
    <version>${depdencendy-artifactId.version}</version>
  </dependency>
</dependencies>

Please check in the list of properties that the dependency version is not already there before adding a new one.

Background

Botsing (Dutch for 'crash') is a complete re-implementation of the crash replication tool EvoCrash (github). Whereas EvoCrash was a full clone of EvoSuite (making it hard to update EvoCrash as EvoSuite evolves), Botsing relies on EvoSuite as a (maven) dependency only. Furthermore, it comes with an extensive test suite, making it easier to extend. The license adopted is Apache, in order to facilitate adoption in industry and academia.

The underlying evolutionary algorithm and fitness function are described in:

  • Mozhan Soltani, Annibale Panichella, and Arie van Deursen. Search-Based Crash Reproduction and Its Impact on Debugging. IEEE Transactions on Software Engineering, 2018. (DOI, preprint)

  • Mozhan Soltani, Pouria Derakhshanfar, Annibale Panichella, Xavier Devroey, Andy Zaidman, and Arie van Deursen. Single-objective versus Multi-Objectivized Optimization for Evolutionary Crash Reproduction. In Colanzi and McMinn, editors, Search-Based Software Engineering - 10th International Symposium, SSBSE 2018 - Proceedings. Lecture Notes in Computer Science, Springer. 2018. p. 325-340. (DOI, preprint).

Funding

Botsing is partially funded by research project STAMP (European Commission - H2020) ICT-16-10 No.731529.

STAMP - European Commission - H2020