fix compare in host
This commit is contained in:
@@ -47,10 +47,8 @@ public class Launcher {
|
|||||||
|
|
||||||
String numOfWorkers = appProps.getProperty("numOfWorkers", "10");
|
String numOfWorkers = appProps.getProperty("numOfWorkers", "10");
|
||||||
String portDumps = appProps.getProperty("portDumps","6399");
|
String portDumps = appProps.getProperty("portDumps","6399");
|
||||||
String pjName = appProps.getProperty("pjName","allDataset");
|
|
||||||
String projectType = appProps.getProperty("projectType","java");
|
String projectType = appProps.getProperty("projectType","java");
|
||||||
|
|
||||||
// String hostname = appProps.getProperty("hostname","localhost");
|
|
||||||
String hunkLimit = appProps.getProperty("hunkLimit","10");
|
String hunkLimit = appProps.getProperty("hunkLimit","10");
|
||||||
String patchSize = appProps.getProperty("patchSize","50");
|
String patchSize = appProps.getProperty("patchSize","50");
|
||||||
String projectL = appProps.getProperty("projectList","");
|
String projectL = appProps.getProperty("projectList","");
|
||||||
@@ -61,34 +59,24 @@ public class Launcher {
|
|||||||
|
|
||||||
// String parameter = args[2];
|
// String parameter = args[2];
|
||||||
String parameter = "L1";
|
String parameter = "L1";
|
||||||
// String parameter = "if";
|
|
||||||
// String parameter = "add";
|
|
||||||
// String jobType = args[1];
|
// String jobType = args[1];
|
||||||
// String jobType = "RICHEDITSCRIPT";
|
// String jobType = "RICHEDITSCRIPT";
|
||||||
String jobType = "COMPARE";
|
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 dbDir;
|
||||||
String dumpsName;
|
String dumpsName;
|
||||||
String gumInput;
|
String gumInput;
|
||||||
|
|
||||||
dumpsName = "dumps-"+pjName+".rdb";
|
dumpsName = "dumps-"+projectType+".rdb";
|
||||||
|
|
||||||
gumInput = input;
|
gumInput = input;
|
||||||
dbDir = redisPath;
|
dbDir = redisPath;
|
||||||
@@ -97,7 +85,7 @@ public class Launcher {
|
|||||||
try {
|
try {
|
||||||
switch (jobType) {
|
switch (jobType) {
|
||||||
case "RICHEDITSCRIPT":
|
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;
|
break;
|
||||||
|
|
||||||
case "COMPARE":
|
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;
|
break;
|
||||||
case "PATTERN":
|
case "PATTERN":
|
||||||
ClusterToPattern.main(portDumps,redisPath, dumpsName, parameter);
|
ClusterToPattern.main(portDumps,redisPath, dumpsName, parameter);
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ public class CompareTrees {
|
|||||||
private static Logger log = LoggerFactory.getLogger(CompareTrees.class);
|
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
|
// 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 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<String> listOfPairs = AkkaTreeParser.getMessages(innerPool,Integer.valueOf(numOfWorkers));
|
// List<String> listOfPairs = AkkaTreeParser.getMessages(innerPool,Integer.valueOf(numOfWorkers));
|
||||||
HashMap<String, String> filenames = getFilenames(outerPool);
|
HashMap<String, String> filenames = getFilenames(outerPool);
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ public class EnhancedASTDiff {
|
|||||||
|
|
||||||
private static Logger log = LoggerFactory.getLogger(EnhancedASTDiff.class);
|
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);
|
String parameters = String.format("\nInput path %s",inputPath);
|
||||||
@@ -62,7 +62,7 @@ public class EnhancedASTDiff {
|
|||||||
.filter(allPredicates.stream().reduce(x->false, Predicate::or))
|
.filter(allPredicates.stream().reduce(x->false, Predicate::or))
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
|
String project = folder.getName();
|
||||||
List<MessageFile> allMessageFiles = new ArrayList<>();
|
List<MessageFile> allMessageFiles = new ArrayList<>();
|
||||||
for (File target : folders) {
|
for (File target : folders) {
|
||||||
|
|
||||||
|
|||||||
@@ -1,20 +1,20 @@
|
|||||||
|
|
||||||
pjName = gumInput
|
|
||||||
portDumps = 6399
|
portDumps = 6399
|
||||||
numOfWorkers = 14
|
numOfWorkers = 14
|
||||||
hostname = localhost
|
|
||||||
hunkLimit = 10
|
hunkLimit = 10
|
||||||
patchSize = 50
|
patchSize = 50
|
||||||
|
|
||||||
#projectList = libtiff,php-src,cpython,wireshark,gzip,gmp,lighttpd1.4,lighttpd2
|
#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/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/anil.koyuncu/projects/fixminer/fixminer-core/python/data/redis
|
||||||
redisPath = /Users/anilkoyuncu/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= /Users/anil.koyuncu/Downloads/srcML/src2srcml
|
||||||
srcMLPath= /usr/local/bin/srcml
|
srcMLPath= /usr/local/bin/srcml
|
||||||
projectType = java
|
#projectType = java
|
||||||
|
projectType = c
|
||||||
|
|
||||||
#ENHANCEDASTDIFF,CACHE,LEVEL1,LEVEL2,LEVEL3
|
#ENHANCEDASTDIFF,CACHE,LEVEL1,LEVEL2,LEVEL3
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user