All Downloads are FREE. Search and download functionalities are using the official Maven repository.

gui.RunWithTwoDirectories Maven / Gradle / Ivy

Go to download

RefactoringMiner is a library/API written in Java that can detect refactorings applied in the history of a Java project.

There is a newer version: 3.0.9
Show newest version
package gui;

import gui.webdiff.WebDiff;

import org.refactoringminer.api.Refactoring;
import org.refactoringminer.astDiff.models.ProjectASTDiff;
import org.refactoringminer.rm1.GitHistoryRefactoringMinerImpl;

import java.io.IOException;
import java.nio.file.Path;

public class RunWithTwoDirectories {
    public static void main(String[] args) throws IOException {
    	final String projectRoot = "/home/tsantalis/eclipse-workspace/RefactoringMiner";
		//final String projectRoot = "/home/tsantalis/eclipse-workspace/RefactoringMiner/src/test/resources/oracle/commits/defects4j";
        String folder1 = projectRoot + "/tmp/v1/DataStream.java";
        String folder2 = projectRoot + "/tmp/v2/DataStream.java";
    	//String folder1 = projectRoot + "/tmp/jabRef/v1/";
        //String folder2 = projectRoot + "/tmp/jabRef/v2/";
        ProjectASTDiff projectASTDiff = new GitHistoryRefactoringMinerImpl().diffAtDirectories(Path.of(folder1), Path.of(folder2));
        for(Refactoring r: projectASTDiff.getRefactorings()) {
        	System.out.println(r);
        }
        new WebDiff(projectASTDiff).run();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy