Git Product home page Git Product logo

td-apache-python's Introduction

About

This is a repository for the paper

Technical Debt Remediation in Python: A Case Study on the Apache Software Ecosystem

It contains the replication package of the study reported in the aforementioned paper.

Replication Instructions

Most of the workload to replicate this project is automated through scripts.

To reduce the effort further, we also automated the creation of an environment for the study.

The instruction to create the environment and replicate the study are described in the following.

1. Bootstrap Virtual Machine

Requirements

  1. Install VirtualBox
  2. Install Vagrant
  3. Install the plugin vagrant-docker-compose. In your command prompt or terminal, run:
$ vagrant plugin install vagrant-docker-compose 
  1. (Optional) Install the plugin vagrant-vbguest (VirtualBox Guest Additions). In your command prompt or terminal, run:
$ vagrant plugin install vagrant-vbguest 

Using the Virtual Machine (VM)

The VM is controlled via Vagrant and contains the configured environment to run all scripts for this study. Mainly, the VM provides:

  • SonarQube (version 7.6-community)
  • PostgreSQL (version 11, to store SonarQube data)
  • Jupyter + Python + libraries (to run scripts)

Whenever you boot the VM, the environment is initialized and SonarQube is available at http://localhost:9000.

You can control the VM via a command prompt (Windows) or terminal (Linux + MacOS). For that, you:

  1. Open a command prompt or terminal
  2. On it, navigate to the root folder of this repository
  3. Execute one of the following commands

There are several commands available, but we focus on the ones necessary for the study.

# Boot the VM
$ vagrant up
# Stop the VM
$ vagrant halt
# Purge the VM
$ vagrant destroy
# Connect (via SSH) to the VM
$ vagrant ssh

Important Notes

The first boot (or the boot after purging) takes a long time, as it will:

  • download and configure the VM
  • download and configure the tools (e.g., SonarQube)

The next boots are much quicker as you just "turn the machine on"

Purging the VM will delete all VM files except for the ones in this folder (and subfolders).

2. Additional SonarQube Configurations

Before you run the scripts for the study, you have to configure SonarQube as follows:

  1. Change the General Settings in the following way:

    • Administration -> Configuration -> General (set each value instead of default value):
    • Keep only one analysis a day after -> 876000
    • Keep only one analysis a week after -> 5200
    • Keep only one analysis a month after -> 5200
    • Keep only analyses with a version event after -> 10400
    • Delete all analyses after -> 10400
    • Delete closed issues after -> 36500
  2. Activate more Python rules:

    • Quality Profiles -> Python -> Sonar way, from the drop-down menu click on Copy and set a name
    • Then click on Inactive and then Bulk Change -> Activate In...
    • Back to Quality Profiles and set the new profile as Default (from the drop-down)

3. Data Collection

To collect the data for the study, you must follow the instructions described in the Jupyter notebook at study.d/Data-Collection.ipynb. For that:

  1. Open Jupyter Lab on your browser (password: sonar)

  2. There is a file tree on the left, click on Data-Collection.ipynb

td-apache-python's People

Contributors

jieshanshan avatar feitosa-daniel avatar mircealungu avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.