Skip to content

A tool to detect migration code between two Java third-party libraries

Notifications You must be signed in to change notification settings

Gropitel/MigrationMiner

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 

Repository files navigation

MigrationMiner

MigrationMiner is an automated tool written in Java to detects code migrations performed between two Java third-party library. Given a list of open source projects, the tool detects potential library migration code changes and collects the specific code fragments where developer replaces methods from the retired library with methods from the new library. Moreover, our tool collects the library documentation that is associated with every method involved in the migration

Currently, it supports the detection of any migration happens in project history that uses maven project architecture(has pom.xml) and Android project.

Prerequisite

  • 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 could try one of these two options:

A- Using Video

  • You could run the project by following this video.

B- 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 this code that database should be created with all tables and views.

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

  • Set your MYSQL user name and password in this file "DatabaseLogin.java" that lives under MigrationMiner/src/com/project/settings/DatabaseLogin.java.

  • Set your GitHub user name and password in this file "GithubLogin.java" that lives under MigrationMiner/src/com/project/settings/GithubLogin.java, So the tool can search a large number of GitHub projects without authentication issue.

  • Update MigrationMiner/data/gitRepositories.csv with a list of git repositories that you want to scan and search for migration

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

Tool output:

  • After you Run Main.java, Wait for while Then you will see database Tables filled with required fragments and migration info. Here is the schema of the table

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

    Also, there will be HTML file generate named "MigrationMinnerOutput.html" that has a summary of all migrations detected and code fragments with Library documentation associated with fragment.

main

This Tool is used by the following papers

About

A tool to detect migration code between two Java third-party libraries

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 73.7%
  • HTML 26.3%