Skip to content

mitchellolsthoorn/SSBSE-Research-2021-crossover-replication

Repository files navigation

SSBSE-Research-2021-replication

Subjects selection

In this experiment, we find our subjects from Apache Commons components.

Select interesting components

Since we are interested in projects which are using numbers and strings frequently, we selected the following components for this experiment:

  • components using number
    • Math is a library of lightweight, self-contained mathematics and statistics components.
    • Numbers contains utilities for working with complex numbers.
    • Geometry provides types and utilities for geometric processing.
    • RNG provides pure-Java implementation of pseudo-random generators.
    • Statistics provides tools for statistics. This project is still in the beta version. So, it can be a good option for us to test it by EvoSuite.
  • components using string
    • CLI provides a simple API for presenting, processing and validating a command line interface.
    • Text is a library focused on algorithms working on strings.
    • Lang provides extra functionality for classes in java.lang.
    • Logging is a thin adapter allowing configurable bridging to other, well known logging systems.

To clone and build these components, run the following script:

. subjects/scripts/clone-and-build.sh subjects/components/components.csv 

Note: This script has only one input parameter which is a CSV file containg data about the selected components.

After running the previous script, execute the following script to copy the jar files to the subjects/bin directory.

. subjects/scripts/collect-jar-files.sh subjects/components/components.csv

Collect code metrics

For selecting the class under tests for our experiment, first, we need to have more information about the code metrics of classes in the components we selected in the previous section. These metrics are collected using CK tool. To cllect these information, run the following script:

. subjects/scripts/collect-code-metrics.sh subjects/components/components.csv 

The outpts are saved as CSV files in subjects/components/code-metrics.

After collecting code metrrics using CK, run the following script to collect all of the data in a single CSV file, this script also indicates the number of strng/number(float, int, or double) input parameters for each method.

. subjects/scripts/create-single-csv-for-code-metrics.sh subjects/components/components.csv