diff --git a/src/main/java/edu/lu/uni/serval/fixminer/Launcher.java b/src/main/java/edu/lu/uni/serval/fixminer/Launcher.java index b199287..6b158c0 100755 --- a/src/main/java/edu/lu/uni/serval/fixminer/Launcher.java +++ b/src/main/java/edu/lu/uni/serval/fixminer/Launcher.java @@ -47,10 +47,8 @@ public class Launcher { String numOfWorkers = appProps.getProperty("numOfWorkers", "10"); String portDumps = appProps.getProperty("portDumps","6399"); - String pjName = appProps.getProperty("pjName","allDataset"); String projectType = appProps.getProperty("projectType","java"); -// String hostname = appProps.getProperty("hostname","localhost"); String hunkLimit = appProps.getProperty("hunkLimit","10"); String patchSize = appProps.getProperty("patchSize","50"); String projectL = appProps.getProperty("projectList",""); @@ -61,34 +59,24 @@ public class Launcher { // String parameter = args[2]; String parameter = "L1"; -// String parameter = "if"; -// String parameter = "add"; // String jobType = args[1]; // String jobType = "RICHEDITSCRIPT"; String jobType = "COMPARE"; -// String parameters = String.format("\nportInner %s " + -// "\nnumOfWorkers %s " + -// "\njobType %s \nport %s " + -// "\npythonPath %s \ndatasetPath %s" + -// "\npjName %s \nactionType %s \nthreshold %s \ncursor %s \neDiffTimeout %s \nisBigPair %s \nparallelism %s" -// , portInner, numOfWorkers, jobType, portDumps, pythonPath,datasetPath,pjName,actionType,threshold,cursor,eDiffTimeout,isBig,parallelism); -// -// log.info(parameters); - mainLaunch( numOfWorkers, jobType, portDumps, pjName,projectType,input,redisPath,parameter, srcMLPath,hostname,hunkLimit,projectList,patchSize); + mainLaunch( numOfWorkers, jobType, portDumps,projectType,input,redisPath,parameter, srcMLPath,hunkLimit,projectList,patchSize); } - public static void mainLaunch(String numOfWorkers, String jobType, String portDumps, String pjName, String projectType, String input, String redisPath,String parameter,String srcMLPath,String hostname,String hunkLimit,String[] projectList,String patchSize){ + public static void mainLaunch(String numOfWorkers, String jobType, String portDumps, String projectType, String input, String redisPath,String parameter,String srcMLPath,String hunkLimit,String[] projectList,String patchSize){ String dbDir; String dumpsName; String gumInput; - dumpsName = "dumps-"+pjName+".rdb"; + dumpsName = "dumps-"+projectType+".rdb"; gumInput = input; dbDir = redisPath; @@ -97,7 +85,7 @@ public class Launcher { try { switch (jobType) { case "RICHEDITSCRIPT": - EnhancedASTDiff.main(gumInput, pjName, portDumps, dbDir, dumpsName, srcMLPath,parameter,hunkLimit,projectList,patchSize,projectType); + EnhancedASTDiff.main(gumInput, portDumps, dbDir, dumpsName, srcMLPath,parameter,hunkLimit,projectList,patchSize,projectType); break; case "COMPARE": @@ -122,7 +110,7 @@ public class Launcher { } - CompareTrees.main(redisPath, portDumps,dumpsName, job,numOfWorkers,hostname); + CompareTrees.main(redisPath, portDumps,dumpsName, job,numOfWorkers); break; case "PATTERN": ClusterToPattern.main(portDumps,redisPath, dumpsName, parameter); diff --git a/src/main/java/edu/lu/uni/serval/fixminer/jobs/CompareTrees.java b/src/main/java/edu/lu/uni/serval/fixminer/jobs/CompareTrees.java index 480e3d3..9ef0d42 100755 --- a/src/main/java/edu/lu/uni/serval/fixminer/jobs/CompareTrees.java +++ b/src/main/java/edu/lu/uni/serval/fixminer/jobs/CompareTrees.java @@ -27,7 +27,7 @@ public class CompareTrees { private static Logger log = LoggerFactory.getLogger(CompareTrees.class); - public static void main(String redisPath, String portDumps, String dumpsName, String job,String numOfWorkers,String host) throws Exception { + public static void main(String redisPath, String portDumps, String dumpsName, String job,String numOfWorkers) throws Exception { // shape /Users/anil.koyuncu/projects/test/fixminer-core/python/data/redis ALLdumps-gumInput.rdb clusterl0-gumInputALL.rdb /Users/anil.koyuncu/projects/test/fixminer-core/python/data/richEditScript @@ -50,7 +50,7 @@ public class CompareTrees { // final JedisPool innerPool = new JedisPool(PoolBuilder.getPoolConfig(), host,Integer.valueOf(portInner),20000000); - final JedisPool outerPool = new JedisPool(PoolBuilder.getPoolConfig(), host,Integer.valueOf(port),20000000); + final JedisPool outerPool = new JedisPool(PoolBuilder.getPoolConfig(), "localhost",Integer.valueOf(port),20000000); // List listOfPairs = AkkaTreeParser.getMessages(innerPool,Integer.valueOf(numOfWorkers)); HashMap filenames = getFilenames(outerPool); diff --git a/src/main/java/edu/lu/uni/serval/fixminer/jobs/EnhancedASTDiff.java b/src/main/java/edu/lu/uni/serval/fixminer/jobs/EnhancedASTDiff.java index 233e027..4bb7da3 100755 --- a/src/main/java/edu/lu/uni/serval/fixminer/jobs/EnhancedASTDiff.java +++ b/src/main/java/edu/lu/uni/serval/fixminer/jobs/EnhancedASTDiff.java @@ -26,7 +26,7 @@ public class EnhancedASTDiff { private static Logger log = LoggerFactory.getLogger(EnhancedASTDiff.class); - public static void main(String inputPath, String project, String portInner, String dbDir, String chunkName,String srcMLPath,String parameter,String hunkLimit,String[] projectList,String patchSize,String projectType) throws Exception { + public static void main(String inputPath, String portInner, String dbDir, String chunkName,String srcMLPath,String parameter,String hunkLimit,String[] projectList,String patchSize,String projectType) throws Exception { String parameters = String.format("\nInput path %s",inputPath); @@ -62,7 +62,7 @@ public class EnhancedASTDiff { .filter(allPredicates.stream().reduce(x->false, Predicate::or)) .collect(Collectors.toList()); - + String project = folder.getName(); List allMessageFiles = new ArrayList<>(); for (File target : folders) { diff --git a/src/main/resource/wmp00080.uni.lux.app.properties b/src/main/resource/wmp00080.uni.lux.app.properties index 716734e..fc5f33e 100644 --- a/src/main/resource/wmp00080.uni.lux.app.properties +++ b/src/main/resource/wmp00080.uni.lux.app.properties @@ -1,20 +1,20 @@ -pjName = gumInput portDumps = 6399 numOfWorkers = 14 -hostname = localhost hunkLimit = 10 patchSize = 50 #projectList = libtiff,php-src,cpython,wireshark,gzip,gmp,lighttpd1.4,lighttpd2 -projectList = fuse,camel +#projectList = fuse,camel +projectList = codeflaws #inputPath = /Users/anilkoyuncu/projects/gumInputLinux -inputPath = /Users/anilkoyuncu/projects/fixminer/fixminer-core/python/data/gumInput +inputPath = /Users/anilkoyuncu/projects/fixminer/fixminer-core/python/data/gumInputLinux #redisPath = /Users/anil.koyuncu/projects/fixminer/fixminer-core/python/data/redis redisPath = /Users/anilkoyuncu/projects/fixminer/fixminer-core/python/data/redis #srcMLPath= /Users/anil.koyuncu/Downloads/srcML/src2srcml srcMLPath= /usr/local/bin/srcml -projectType = java +#projectType = java +projectType = c #ENHANCEDASTDIFF,CACHE,LEVEL1,LEVEL2,LEVEL3