fix javaNullPointer

This commit is contained in:
Haoye TIAN
2020-03-06 10:19:47 +01:00
parent 62aa417523
commit da5a365dcf
4 changed files with 19 additions and 16 deletions
@@ -23,7 +23,8 @@ public class Launcher {
Properties appProps = new Properties();
// String appConfigPath = "/Users/anil.koyuncu/projects/fixminer/fixminer_source/src/main/resource/app.properties";
String appConfigPath = args[0];
// String appConfigPath = args[0];
String appConfigPath = "src/main/resource/app.properties";
appProps.load(new FileInputStream(appConfigPath));
// String portInner = appProps.getProperty("portInner","6380");
@@ -40,12 +41,12 @@ public class Launcher {
String redisPath = appProps.getProperty("redisPath","FORKJOIN");
String srcMLPath = appProps.getProperty("srcMLPath","FORKJOIN");
String parameter = args[2];
// String parameter = "L1";
// String parameter = args[2];
String parameter = "L1";
// String parameter = "if";
// String parameter = "add";
String jobType = args[1];
// String jobType = "RICHEDITSCRIPT";
// String jobType = args[1];
String jobType = "RICHEDITSCRIPT";
// String jobType = "LOAD";
// String jobType = "COMPARE";
@@ -93,6 +94,7 @@ public class Launcher {
case "L1":
// job = "shape";
job = "single";
compareDBName = "clusterl0-gumInputALL.rdb";
break;
case "L2":
@@ -66,7 +66,7 @@ public class CompareTrees {
Integer numberOfWorkers = Integer.valueOf(numOfWorkers);
final ExecutorService executor = Executors.newWorkStealingPool(numberOfWorkers);
ArrayList<Future<?>> results = new ArrayList<Future<?>>();
for (int i = 1; i <numberOfWorkers ; i++) {
for (int i = 0; i <numberOfWorkers ; i++) {
// schedule the work
@@ -159,7 +159,7 @@ public class EDiffHelper {
if(actionSet.getParent() == null){
if(actionSet.getParent() == null || ( actionSet.getParent().getAction().getClass().equals(Update.class) && ((Update) actionSet.getParent().getAction()).getflag() == false)){
//root
// parent = new Tree(newType,"");
@@ -175,7 +175,7 @@ public class EDiffHelper {
if (subActions.size() != 0){
for (HierarchicalActionSet subAction : subActions) {
if(actionSet.getParent() == null){
if(actionSet.getParent() == null || ( actionSet.getParent().getAction().getClass().equals(Update.class) && ((Update) actionSet.getParent().getAction()).getflag() == false)){
children = parent;
}
getTargetTree(subAction,children,null,tc);
@@ -199,7 +199,7 @@ public class EDiffHelper {
log.error("More than 1");
}
newType = keysByValue.get(0);
if(actionSet.getParent() == null){
if(actionSet.getParent() == null || ( actionSet.getParent().getAction().getClass().equals(Update.class) && ((Update) actionSet.getParent().getAction()).getflag() == false)){
//root
// parent = new Tree(newType,"");
@@ -215,7 +215,7 @@ public class EDiffHelper {
if (subActions.size() != 0){
for (HierarchicalActionSet subAction : subActions) {
if(actionSet.getParent() == null){
if(actionSet.getParent() == null || ( actionSet.getParent().getAction().getClass().equals(Update.class) && ((Update) actionSet.getParent().getAction()).getflag() == false)){
children = parent;
}
getASTTree(subAction,children,null,tc);
@@ -461,7 +461,7 @@ public class EDiffHelper {
}else{
new Exception("unknow action");
}
if(actionSet.getParent() == null){
if(actionSet.getParent() == null || ( actionSet.getParent().getAction().getClass().equals(Update.class) && ((Update) actionSet.getParent().getAction()).getflag() == false)){
//root
parent = tc.createTree(newType, "", null);
@@ -476,7 +476,7 @@ public class EDiffHelper {
if (subActions.size() != 0){
for (HierarchicalActionSet subAction : subActions) {
if(actionSet.getParent() == null){
if(actionSet.getParent() == null || ( actionSet.getParent().getAction().getClass().equals(Update.class) && ((Update) actionSet.getParent().getAction()).getflag() == false)){
children = parent;
}
getActionTree(subAction,children,null,tc);
+5 -4
View File
@@ -3,15 +3,16 @@ pjName = gumInput
portInner = 6380
portDumps = 6399
parallelism = AKKA
numOfWorkers = 30
numOfWorkers = 20
hostname = localhost
hunkLimit = 10
#inputPath = /Users/anilkoyuncu/projects/gumInputLinux
inputPath = /Users/anil.koyuncu/projects/fixminer/fixminer-core/python/data/gumInputLinux
redisPath = /Users/anil.koyuncu/projects/fixminer/fixminer-core/python/data/redis
inputPath = /Users/haoye.tian/Documents/University/data/fixminer-data/gumInput
redisPath = /Users/haoye.tian/Documents/University/project/fixminer-core/python/data/redis
#srcMLPath= /Users/anil.koyuncu/Downloads/srcML/src2srcml
srcMLPath= /Users/anil.koyuncu/Downloads/srcML.0.9.5/bin/srcml
srcMLPath= /Users/haoye.tian/Do\
cuments/University/project/srcML0.9.5/bin/srcml
actionType = ALL
eDiffTimeout = 900