gui.RunWithGitHubAPI Maven / Gradle / Ivy
package gui;
import gui.webdiff.WebDiff;
import org.refactoringminer.api.Refactoring;
import org.refactoringminer.api.RefactoringMinerTimedOutException;
import org.refactoringminer.astDiff.models.ProjectASTDiff;
import org.refactoringminer.astDiff.utils.URLHelper;
import org.refactoringminer.rm1.GitHistoryRefactoringMinerImpl;
import java.io.IOException;
/* Created by pourya on 2022-12-26 9:30 p.m. */
public class RunWithGitHubAPI {
public static void main(String[] args) throws RefactoringMinerTimedOutException, IOException {
String url = "https://github.com/Alluxio/alluxio/commit/9aeefcd8120bb3b89cdb437d8c32d2ed84b8a825";
url = "https://github.com/NLPchina/ansj_seg/commit/913704e";
//url = "https://github.com/open-keychain/open-keychain/commit/c11fef6e7c80681ce69e5fdc7f4796b0b7a18e2b";
//url = "https://github.com/checkstyle/checkstyle/commit/5a9b7249e3d092a78ac8e7d48aeeb62bf1c44e20";
url = "https://github.com/junit-team/junit5/commit/6b575f2ee5f02288a774ff0a85ce3a3e3cb6946f";
//url = "https://github.com/eclipse-jgit/jgit/commit/f5fe2dca3cb9f57891e1a4b18832fcc158d0c490";
//url = "https://github.com/gwtproject/gwt/commit/22fb2c9c6974bd1fe0f6ff684f52e6cfbed1a387";
//url = "https://github.com/neo4j/neo4j/commit/001de307492df8f84ad15f6aaa0bd1e748d4ce27";
//url = "https://github.com/neo4j/neo4j/commit/e0072aac53b3b88de787e7ca653c7e17f9499018";
url = "https://github.com/querydsl/querydsl/commit/e1aa31cff985e2a0c2babf4da96dc0a538d5e514";
//url = "https://github.com/javaparser/javaparser/commit/a25f53f8871fd178b6791d1194d7358b55d1ba37";
//url = "https://github.com/openjdk/jfx/commit/974bf468c8261c61f8087aa6132824993ae89afd";
url = "https://github.com/FasterXML/jackson-databind/commit/da29a040ebae664274b28117b157044af0f525fa";
url = "https://github.com/tsantalis/RefactoringMiner/commit/0894f346564f8b31cf836def67e952fb93a6036d";
//url = "https://github.com/JetBrains/intellij-community/commit/9f7de200c9aef900596b09327a52d33241a68d9c";
//url = "https://github.com/wildfly/wildfly/commit/d7675fb0b19d3d22978e79954f441eeefd74a3b2";
//url = "https://github.com/apache/hive/commit/4ccc0c37aabbd90ecaa36fcc491e2270e7e9bea6";
//url = "https://github.com/checkstyle/checkstyle/commit/2f7481ee4e20ae785298c31ec2f979752dd7eb03";
//url = "https://github.com/languagetool-org/languagetool/commit/01cddc5afb590b4d36cb784637a8ea8aa31d3561";
//url = "https://github.com/Athou/commafeed/commit/18a7bd1fd1a83b3b8d1b245e32f78c0b4443b7a7";
//url = "https://github.com/apache/hive/commit/4ccc0c37aabbd90ecaa36fcc491e2270e7e9bea6";
url = "https://github.com/apache/hive/commit/e2dd54ab180b577b08cf6b0e69310ac81fc99fd3";
url = "https://github.com/tsantalis/RefactoringMiner/commit/6095e8477aeb633c5c647776cdeb22f7cdc5031b";
url = "https://github.com/eclipse-jgit/jgit/commit/7ff6eb584cf8b83f83a3b5edf897feb53dbf42c0";
url = "https://github.com/pouryafard75/TestCases/commit/97ed050634fa68b71124be5f7a12dda1b0c52a46";
url = "https://github.com/spring-projects/spring-security/commit/fcc9a34356817d93c24b5ccf3107ec234a28b136";
url = "https://github.com/belaban/JGroups/commit/f1533756133dec84ce8218202585ac85904da7c9";
url = "https://github.com/addthis/hydra/commit/7fea4c9d5ee97d4a61ad985cadc9c5c0ab2db780";
url = "https://github.com/AsyncHttpClient/async-http-client/commit/f01d8610b9ceebc1de59d42f569b8af3efbe0a0f";
url = "https://github.com/liferay/liferay-portal/commit/59fd9e696cec5f2ed44c27422bbc426b11647321";
//
//url = "https://github.com/phishman3579/java-algorithms-implementation/commit/f2385a56e6aa040ea4ff18a23ce5b63a4eeacf29";
//url = "https://github.com/openjdk/jfx/commit/974bf468c8261c61f8087aa6132824993ae89afd";
url = "https://github.com/apache/hive/commit/4ccc0c37aabbd90ecaa36fcc491e2270e7e9bea6";
url = "https://github.com/apache/drill/commit/711992f22ae6d6dfc43bdb4c01bf8f921d175b38";
url = "https://github.com/nutzam/nutz/commit/de7efe40dad0f4bb900c4fffa80ed377745532b3";
url = "https://github.com/glyptodon/guacamole-client/commit/ce1f3d07976de31aed8f8189ec5e1a6453f4b580";
url = "https://github.com/glyptodon/guacamole-client/commit/ebb483320d971ff4d9e947309668f5da1fcd3d23";
url = "https://github.com/spring-projects/spring-security/commit/fcc9a34356817d93c24b5ccf3107ec234a28b136";
//url = "https://github.com/fabric8io/fabric8/commit/9e61a71540da58c3208fd2c7737f793c3f81e5ae";
//url = "https://github.com/Alluxio/alluxio/commit/b0938501";
//url = "https://github.com/gradle/gradle/commit/b1fb1192daa1647b0bd525600dd41063765eca70";//CORRECT
//url = "https://github.com/apache/commons-lang/commit/7f7d4b881d78dcb8d5a0149965f934df268919d7";//CORRECT
//url = "https://github.com/apache/drill/commit/711992f22ae6d6dfc43bdb4c01bf8f921d175b38";//CORRECT
//url = "https://github.com/jOOQ/jOOQ/commit/58a4e74d28073e7c6f15d1f225ac1c2fd9aa4357";//
//url = "https://github.com/apache/hive/commit/4ccc0c37aabbd90ecaa36fcc491e2270e7e9bea6";//CORRECT
//url = "https://github.com/nutzam/nutz/commit/de7efe40dad0f4bb900c4fffa80ed377745532b3";
url = "https://github.com/nutzam/nutz/commit/de7efe40dad0f4bb900c4fffa80ed377745532b3";
url = "https://github.com/apache/commons-lang/commit/7f7d4b881d78dcb8d5a0149965f934df268919d7";//CORRECT
url = "https://github.com/glyptodon/guacamole-client/commit/ce1f3d07976de31aed8f8189ec5e1a6453f4b580";
url = "https://github.com/glyptodon/guacamole-client/commit/ebb483320d971ff4d9e947309668f5da1fcd3d23";
url = "https://github.com/spring-projects/spring-security/commit/fcc9a34356817d93c24b5ccf3107ec234a28b136";
//url = "https://github.com/apache/drill/commit/711992f22ae6d6dfc43bdb4c01bf8f921d175b38";//CORRECT
//url = "https://github.com/jOOQ/jOOQ/commit/58a4e74d28073e7c6f15d1f225ac1c2fd9aa4357";//
url = "https://github.com/apache/hive/commit/4ccc0c37aabbd90ecaa36fcc491e2270e7e9bea6";//CORRECT
url = "https://github.com/Graylog2/graylog2-server/commit/2d98ae165ea43e9a1ac6a905d6094f077abb2e55";
url = "https://github.com/BroadleafCommerce/BroadleafCommerce/commit/9687048f76519fc89b4151cbe2841bbba61a401d";
url = "https://github.com/apache/camel/commit/c30deabcaed4726bce4371d76257db63f2eba87c";
//url = "https://github.com/NLPchina/ansj_seg/commit/913704e";
//url = "https://github.com/apache/cxf/commit/4955ca652f16e781524612383af27c650e10cbdc";
url = "https://github.com/opentripplanner/OpenTripPlanner/commit/dc0a6c6ea86df04daa0cc4542eb2fe55410bc536";
url = "https://github.com/apache/hadoop/commit/4d01dbda508691beb07a4c8bfe113ec568166ddc";
url = "https://github.com/jenkinsci/git-client-plugin/commit/6d261108e7471db380146f945bb228b5fc8c44cc";
url = "https://github.com/pouryafard75/TestCases/commit/5f10682933da4d2911d7f3dfc3678a30767878b1";
//url = "https://github.com/apache/logging-log4j2/commit/c624e01cc433cc36f23167c8f39ab40873ecc6ec";
//url = "https://github.com/portfolio-performance/portfolio/commit/6700f4a29726c14d22df91a8f3d2e500b0e12e27";
url = "https://github.com/eclipse-jgit/jgit/commit/7668a462829b12e4f6a192c43157152ef63ff305";
url = "https://github.com/pouryafard75/DiffBenchmark/commit/ba790bfa4f73f572930c8a0830cc9e5a07d2f42d";
url = "https://github.com/apache/commons-lang/commit/5fb6521ab990c0c9ec655ca71d8c77060aedb0e5";
url = "https://github.com/JabRef/jabref/pull/11479/commits/5dbc4a3db88c2517c5c5d556405241ac26f06077";
url = "https://github.com/Alluxio/alluxio/commit/9aeefcd8120bb3b89cdb437d8c32d2ed84b8a825";
url = "https://github.com/eclipse-jgit/jgit/commit/8ac65d33e";
url = "https://github.com/eclipse-jgit/jgit/commit/7fbd6588b";
url = "https://github.com/eclipse-jgit/jgit/commit/f048af3fd";
url = "https://github.com/eclipse-jgit/jgit/commit/783dbf1b0";
url = "https://github.com/eclipse-jgit/jgit/commit/1b783d037";
url = "https://github.com/eclipse-jgit/jgit/commit/6b62e53b6";
url = "https://github.com/eclipse-jgit/jgit/commit/c46c720e9";
url = "https://github.com/hapifhir/hapi-fhir/commit/a123bfe564931ab99481ec39ba36da14ce992997";
//url = "https://github.com/lealone/Lealone/commit/7a2e0ae5f6172cbe34f9bc4a5cde666314ff75dd";
//url = "https://github.com/infinispan/infinispan/commit/8f446b6ddf540e1b1fefca34dd10f45ba7256095";
url = "https://github.com/javaparser/javaparser/commit/548fb9c5a72776ec009c5f2f92b1a4c480a05030";
url = "https://github.com/thymeleaf/thymeleaf/commit/378ba37750a9cb1b19a6db434dfa59308f721ea6";
url = "https://github.com/javaparser/javaparser/commit/2d3f5e219af9d1ba916f1dc21a6169a41a254632";
url = "https://github.com/jodavimehran/code-tracker/commit/cd0c01f5896c1f02c784cd03272e2ce9ba4e2139";
url = "https://github.com/spring-projects/spring-framework/commit/ad2e0d45875651d9a707b514dd3966fa81a9048c";
url = "https://github.com/checkstyle/checkstyle/commit/3bd699bd5";
url = "https://github.com/javaparser/javaparser/commit/9c53c2cbc";
//url = "https://github.com/plutext/docx4j/commit/e29924b33ec0c0298ba4fc3f7a8c218c8e6cfa0c";
//https://github.com/apache/beam/pull/8188/commits/fe171996d1695d8782a98d3295ff0c1b7920d06f
url = "https://github.com/apache/beam/commit/fe171996d1695d8782a98d3295ff0c1b7920d06f";
//url = "https://github.com/facebook/buck/commit/a1525ac";
url = "https://github.com/junit-team/junit5/commit/180df5a92";
url = "https://github.com/spring-projects/spring-boot/commit/1e464da2480568014a87dd0bac6febe63a76c889";
url = "https://github.com/apache/cassandra/commit/a7c4ba9eeecb365e7c4753d8eaab747edd9a632a";
url = "https://github.com/graphhopper/graphhopper/commit/7f80425b6a0af9bdfef12c8a873676e39e0a04a6";
url = "https://github.com/hibernate/hibernate-orm/commit/2176af114";
url = "https://github.com/apache/drill/commit/7e71cd03b4fb1bb6ca5132e9cffcf56e418b4cb3";
url = "https://github.com/apache/flink/commit/bac21bf5d77c8e15c608ecbf006d29e7af1dd68a";
url = "https://github.com/eclipse-jgit/jgit/commit/0e73d395061d1bfee365acaa2f79c392175d13bf";
url = "https://github.com/hibernate/hibernate-orm/commit/b70bc0080e8e206f83debf8f456fe323caccc01b";
url = "https://github.com/javaparser/javaparser/commit/b7bd15d12e107c85e29912960f7b4e48aac4dc38";
url = "https://github.com/hazelcast/hazelcast/commit/30c4ae09745d6062077925a54f27205b7401d8df";
//url = "https://github.com/aws/aws-sdk-java/commit/4baf0a4de8d03022df48d696d210cc8b3117d38a";
//url = "https://github.com/apache/hive/commit/4ccc0c37aabbd90ecaa36fcc491e2270e7e9bea6";
//url = "https://github.com/fabric8io/fabric8/commit/9e61a71540da58c3208fd2c7737f793c3f81e5ae";
//url = "https://github.com/Alluxio/alluxio/commit/9aeefcd8120bb3b89cdb437d8c32d2ed84b8a825";
//url = "https://github.com/brettwooldridge/HikariCP/commit/e19c6874431dc2c3046436c2ac249a0ab2ef3457";
//url = "https://github.com/jOOQ/jOOQ/commit/227254cf769f3e821ed1b2ef2d88c4ec6b20adea";
//url = "https://github.com/nutzam/nutz/commit/de7efe40dad0f4bb900c4fffa80ed377745532b3";
//url = "https://github.com/spring-projects/spring-security/commit/fcc9a34356817d93c24b5ccf3107ec234a28b136";
url = "https://github.com/opentripplanner/OpenTripPlanner/commit/334dbc7cf3432e7c17b0ed98801e61b0b591b408";
url = "https://github.com/assertj/assertj/commit/b36ab386559d04db114db8edd87c8d4cbf850c12";
url = "https://github.com/Alluxio/alluxio/commit/5b184ac783784c1ca4baf1437888c79bd9460763";
///url = "https://github.com/apache/camel/commit/ab1d1dd78fe53edb50c4ede447e4ac5a55ee2ac9";
//url = "https://github.com/Alluxio/alluxio/commit/b0938501f1014cf663e33b44ed5bb9b24d19a358";
url = "https://github.com/apache/pig/commit/92dce401344a28ff966ad4cf3dd969a676852315";
//url = "https://github.com/apache/commons-lang/commit/d9a2c69a9d1db6072e1d7b7ea4fcbd5c15d20b5d";
//url = "https://github.com/infinispan/infinispan/commit/ce4f6292d6350a2c6b82d995352fdf6d07042c9c";
//url = "https://github.com/facebook/buck/commit/7e104c3ed4b80ec8e9b72356396f879d1067cc40";
//url = "https://github.com/spring-projects/spring-security/commit/fcc9a34356817d93c24b5ccf3107ec234a28b136";
String repo = URLHelper.getRepo(url);
String commit = URLHelper.getCommit(url);
ProjectASTDiff projectASTDiff = new GitHistoryRefactoringMinerImpl().diffAtCommit(repo, commit, 1000);
for(Refactoring r: projectASTDiff.getRefactorings()) {
System.out.println(r);
}
new WebDiff(projectASTDiff).run();
}
}