GithubHelp home page GithubHelp logo

maintenance-evaluator's Introduction

Measurement Evaluator

This project aims to indicate the change-proneness of a method using code metrics, and find out if there are statistically significant correlations between them. Specifically, CodeShovel was used to extract 73,733 methods from Hadoop and 3,733 methods from Checkstyle into JSON files that contain their bodies and change histories.
Important: The CSV files containing all metrics for both projects are in the metrics folder in the root project directory.

Output

For each method, the project calculates the size, McCabe complexity, readability, and #Revisions. These metrics are then output into CSV files, one for each project, in the following format:

JSON # Size (SLOC) McCabe Readability #Revisions

After that, a python script is used to calculate the Pearson, Spearman, and Kendall's Tau correlation coefficients and P-values.

Run Instructions - Code Metrics Calculator

  1. Move to the resources folder by running the following command while in the root folder of the project:
cd src/main/resources
  1. Install the read-tse-1.0.0 JAR to your local maven repository by running the following command:
mvn install:install-file -Dfile=read-tse-1.0.0.jar -DgroupId=raykernel.apps -DartifactId=readability -Dversion=1.0 -Dpackaging=jar
  1. Go back to the root directory of the project by running:
cd ../../..
  1. Build the MaintenanceEvaluator JAR by running the following command:
mvn clean package assembly:single
  1. Run the JAR file using the following command:
java -jar MaintenanceEvaluator-1.0-SNAPSHOT-jar-with-dependencies.jar <inputDirectory1> <inputDirectory2>... -o <outputDirectory>

Example:

java -jar MaintenanceEvaluator-1.0-SNAPSHOT-jar-with-dependencies.jar /home/khalidzahra/Desktop/data/checkstyle/ /home/khalidzahra/Desktop/data/hadoop/ -o /home/khalidzahra/Desktop/output-files

The -o flag is optional. If no output is specified, the files will be created in the same directory as the JAR.

Sample Output: Metrics calculator sample output

Run Instructions - Correlation Evaluator

  1. Install the required dependencies by running:
pip install -r correlation-evaluator/requirements.txt
  1. Run the correlation evaluator using the following command:
python3 correlation-evaluator/main.py <csvPath1> <csvPath2>...

Example:

python3 correlation-evaluator/main.py ~/Desktop/testerman/checkstyle.csv ~/Desktop/testerman/hadoop.csv

Sample Output: Correlation evaluator sample output

maintenance-evaluator's People

Contributors

khalidzahra avatar

Watchers

 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.