Skip to content

Latest commit

 

History

History
92 lines (53 loc) · 3.84 KB

INSTALL.md

File metadata and controls

92 lines (53 loc) · 3.84 KB

Installation guide

This files contains instructions on how to install and run each tool used in the data gathering process.

Code2DFD

Download Code2DFD from its official repository.

Data presented in this package/paper were generated with the c65b4a version of the tool.

Install its dependencies from requirements.txt as

python -m pip install -r requirements.txt

The tool can be executed as

python -m code2DFD.py --repo_url PATH_TO_REPO

in the cloned directory, where PATH_TO_REPO is a path to the repository that should be analysed (either local path or full GitHub URL).

Optionally, it is possible to provide a commit hash to checkout and analyse a specific commit:

python -m code2DFD.py --repo_url PATH_TO_REPO --commit HASH

For an analysed project, the tool will generate a folder code2DFD_output/REPO_NAME/COMMIT with the results for a specific commit from a specific repo.

Such results folders are presented here in raw_data/code2dfd.

Understand by SciTools

Download and install Understand from the official website.

The data in this package are generated using version 6.5.1201.

Request an Educational/Academic license at the appropriate step.

Change the variable UND_PATH in the Understand script to point to the und cli tool on your system.

Use the Understand script to generate the data. See instructions in README.

Jasome

Download the latest release of Jasome from official GitHub page.

The data in these package are generated using v0.6.8-alpha.

Change the variable JASOME_PATH in the Jasome script to point to the Jasome binary on your system.

Use the Jasome script to generate the data. See instructions in README.

SonarQube

NOTE: There are many ways to deploy SonarQube, we provide the most simple way to achieve necessary results.

Install Docker.

Deploy SonarQube using the example docker-compose.yml as:

docker compose -f docker-compose.yml up -d

Navigate to http://localhost:9000. For the first login, credentials are admin/admin, then set your own.

Generate a Global Analysis Token and a User token.

Download the SonarScanner application from the official website.

In the SonarQube script:

  • Change the SONAR_PATH variable to the location of the sonar-scanner binary.
  • Change the TOKEN variable to the Global Analysis Token generated in SonarQube.

In the SonarQube merge script:

  • Change the variable USER_TOKEN to the User token generated in SonarQube.

Use the SonarQube script to generate the data. See instructions in README.

Working with the package scripts

Install the following Python packages: networkx, pandas, requests using the requirements.txt file as:

python -m pip install -r requirements.txt

Follow the instructions in README to replicate each step of the data collection.