Giter Site home page Giter Site logo

diffbenchmark's Introduction

This repository contains all the source-code and experiments related to the following paper:

Pouria Alikhanifard and Nikolaos Tsantalis, "A Novel Refactoring and Semantic Aware Abstract Syntax Tree Differencing Tool and a Benchmark for Evaluating the Accuracy of Diff Tools," ACM Transactions on Software Engineering and Methodology, 2024.

The oracle files are located in the oracle folder and the Experiment Results are located in the out folder.

Please check the Wiki for the detailed explanation. You can find the list of all supported ASTDiffTools here.

Table of Contents

General info

DiffBenchmark is a visualization and benchmarking tool for ASTDiff tools. It provides an infrastructure to compare the results of different ASTDiff tools with the oracle files.

It's extensible architecture allows you to add new ASTDiff tools and compare them with the existing ones.

You can visualize, compare, and evaluate the results of different ASTDiff tools using the DiffBenchmark.

How to build DiffBenchmark

First, clone the RefactoringMiner repository.

Then, you have to update the REFACTORING_MINER_PATH in one of the following ways:

Update the field REFACTORING_MINER_PATH in the benchmark.utils.Configuration.ConfigurationFactory class to the RefactoringMiner cloned repository path in your hard drive or you can have it as env variable REFACTORING_MINER_PATH

Import DiffBenchmark as a gradle project in your IDE, or run ./gradlew jar to build.

Usage guidelines

There are 3 different ways you can execute DiffBenchmark: You can find the examples here.

With a locally cloned git repository

Execute CompareWithLocallyClonedRepository.java

String repo = "https://github.com/Alluxio/alluxio.git";
String commit = "9aeefcd8120bb3b89cdb437d8c32d2ed84b8a825";
String pathToClonedRepository = "tmp/" + "Alluxio/Alluxio";
Repository repository = new GitServiceImpl().cloneIfNotExists(pathToClonedRepository, repo);
new BenchmarkWebDiffFactory().withLocallyClonedRepo(repository, commit).run();

With two directories containing Java source code

Execute CompareWithTwoDirectories.java

String folder1 = "PATH_TO_FOLDER1";
String folder2 = "PATH_TO_FOLDER2";
new BenchmarkWebDiffFactory().withTwoDirectories(folder1,folder2).run()

With all information fetched directly from GitHub

To use the following API, please provide a valid OAuth token in the github-oauth.properties file. You can generate an OAuth token in GitHub Settings -> Developer settings -> Personal access tokens.

Then add the token as OAuthToken env variable

Execute CompareWithGitHubAPI.java

String url = "https://github.com/Alluxio/alluxio/commit/9aeefcd8120bb3b89cdb437d8c32d2ed84b8a825";
new BenchmarkWebDiffFactory().withURL(url).run();

diffbenchmark's People

Contributors

pouryafard75 avatar tsantalis avatar flozender avatar

Stargazers

Oliver Kopp avatar fangyuan00 avatar

Watchers

 avatar  avatar

Forkers

flozender

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.