Giter Club home page Giter Club logo

migrationminer's Introduction

MigrationMiner

MigrationMiner is an open source tool that provides the developer with easy-to-use and comprehensive way of extracting, from given list of input projects, existing migrations between two third-party libraries using program analysis based on Abstract Syntax Tree (AST) code representation. In a nutshell, MigrationMiner (i) detects, (ii) extracts, (iii) filters, and (iv) collects code changes related to any performed migration. For a given input project, MigrationMiner detects any migration undergone between two java libraries and returns the names and versions of both retired and new libraries. Thereafter, MigrationMiner extracts the specific code changes, from the client code, and which belong to the migration changes (it should at least have one removed method from the retired library, and one added method from the new library) from all other unrelated code changes within the commits. Next, MigrationMiner filters code changes to only keep fragments that contain migration traces i.e., a code fragment, generated by the *diff* utility, which contains the removed and added methods, respectively from the retired and the new library. Finally, MigrationMiner collects the library API documentation that is associated with every method in the client code. The output of MigrationMiner, for each detected migration between two libraries, is a set of migration traces, with their code context, and their corresponding documentation.

When you use this tool, please cite this paper.

@inproceedings{alrbaye2019MigrationMiner,
  title={MigrationMiner: An Automated Detection Tool of Third-Party Java Library Migration at the Method Level},
  author={Hussein Alrubaye, Mohamed Wiem Mkaouer, Ali Ouni},
  booktitle={2019 IEEE International Conference on Software Maintenance and Evolution (ICSME)},
  year={2019},
  organization={IEEE}
}

Prerequisites

  • Install java JKD from here.
  • Install Eclipse IDE for Java Developers from here.
  • Install MYSQL Server from here.

How to install and run the tool

To run the project on your local machine you can follow one of these two tutorials:

A- Using the tutorial video

  • You could run the project by following this video.

B- Using the following steps

  • First you need to build the dataset, by running the following script Database/MigrationMinerDBSQL.sql. Open a terminal and run the following commands
 mysql -u root -p
 source ./MigrationMinerDBSQL.sql

After running the commands, the database should be created with all tables and views.

  • Create a new Java project at eclipse IDE and set the project directory to MigrationMiner folder.

  • Set your local MYSQL username and password in this file "DatabaseLogin.java", which lives under MigrationMiner/src/com/project/settings/DatabaseLogin.java.

  • Set your GitHub username and password in this file "GithubLogin.java", which lives under MigrationMiner/src/com/project/settings/GithubLogin.java. Your credentials will be used so that Migration Miner can search a large number of GitHub projects without authentication issues.

  • Update MigrationMiner/data/gitRepositories.csv with the list of git repositories that you want to use as input (they will be searched for potential library migrations).

  • Run the Main.java file that lives under MigrationMiner/src/com/main/parse/Main.java.

Tool output

  • After running Main.java, the database Tables will be filled with any migration infomation found. For each potential migration, the following information can be found in database, whose schema is as follows:

    • Repositories: Has the list of projects that scanned by the tool.
    • AppCommits: Has the list of projects' commits information (Commit Id, developer name, Commit text, and commit date).
    • ProjectLibraries: List of libraries that were added or removed at every commit.
    • MigrationRules: List of migration Rules that were detected from the Dataset.
    • MigrationSegments: List Of migration Fragments that were extract from software migration.
    • LibraryDocumenation: Library documentation associated with every library version that has been involved in any migration.

    Also, there will be a generated HTML file named "MigrationMinnerOutput.html" that has the summary of all migrations detected, and for each migration, all its corresponding code fragments along with their Library documentation. An illutrative example of this file is in the following picture:

main

MigrationMiner has been used so far in the following papers:

migrationminer's People

Contributors

hussien89aa avatar mkaouer avatar

Watchers

James Cloos 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.