new
This commit is contained in:
@@ -108,7 +108,7 @@
|
||||
<archive>
|
||||
<manifest>
|
||||
<mainClass>
|
||||
edu.lu.uni.serval.FixPatternParser.cluster.AkkaTreeLoader
|
||||
edu.lu.uni.serval.FixPatternParser.violations.TestHunkParser
|
||||
</mainClass>
|
||||
</manifest>
|
||||
</archive>
|
||||
|
||||
+7
-7
@@ -41,18 +41,18 @@ public class FixedViolationHunkParser extends FixedViolationParser {
|
||||
public void parseFixPatterns(File prevFile, File revFile, File diffentryFile) {
|
||||
List<HierarchicalActionSet> actionSets = parseChangedSourceCodeWithGumTree2(prevFile, revFile);
|
||||
|
||||
boolean isUpdate =
|
||||
actionSets.stream().allMatch(p -> p.getAction() instanceof Update);
|
||||
// boolean isUpdate =
|
||||
// actionSets.stream().allMatch(p -> p.getAction() instanceof Update);
|
||||
int hunkSet = 0;
|
||||
if(isUpdate){
|
||||
// if(isUpdate){
|
||||
for (HierarchicalActionSet actionSet : actionSets) {
|
||||
|
||||
|
||||
FileOutputStream f = null;
|
||||
try {
|
||||
String pj = diffentryFile.getParent().split("GumTreeInputBug4")[1];
|
||||
String root = diffentryFile.getParent().split("GumTreeInputBug4")[0];
|
||||
String hunkTreeFileName = root+"GumTreeOutput2/" +pj.replace("DiffEntries","ActionSetDumps/") + diffentryFile.getName() + "_" + String.valueOf(hunkSet);
|
||||
String pj = diffentryFile.getParent().split("GumTreeInputBug13April")[1];
|
||||
String root = diffentryFile.getParent().split("GumTreeInputBug13April")[0];
|
||||
String hunkTreeFileName = root+"GumTreeOutput13April/" +pj.replace("DiffEntries","ActionSetDumps/") + diffentryFile.getName() + "_" + String.valueOf(hunkSet);
|
||||
f = new FileOutputStream(new File(hunkTreeFileName));
|
||||
ObjectOutputStream o = new ObjectOutputStream(f);
|
||||
o.writeObject(actionSet);
|
||||
@@ -67,7 +67,7 @@ public class FixedViolationHunkParser extends FixedViolationParser {
|
||||
hunkSet++;
|
||||
}
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
}
|
||||
// public void parseFixPatterns(File prevFile, File revFile, File diffentryFile) {
|
||||
|
||||
@@ -43,9 +43,9 @@ public class TestHunkParser {
|
||||
outputPath = args[0];
|
||||
}else{
|
||||
// inputPath = "/Users/anilkoyuncu/bugStudy/dataset/GumTreeInputBug4";
|
||||
inputPath = "/Volumes/data/bugStudy_backup/dataset/GumTreeInputBug4";
|
||||
inputPath = "/Users/anilkoyuncu/bugStudy/dataset/GumTreeInputBug13April";
|
||||
// outputPath = "/Users/anilkoyuncu/bugStudy/code/python/GumTreeOutput2/";
|
||||
outputPath = "/Users/anilkoyuncu/bugStudy/dataset/GumTreeOutput2";
|
||||
outputPath = "/Users/anilkoyuncu/bugStudy/dataset/GumTreeOutput13April";
|
||||
}
|
||||
|
||||
|
||||
@@ -108,7 +108,7 @@ public class TestHunkParser {
|
||||
try {
|
||||
log.info("Akka begins...");
|
||||
system = ActorSystem.create("Mining-FixPattern-System");
|
||||
parsingActor = system.actorOf(ParseFixPatternActor.props(1, editScriptsFilePath,
|
||||
parsingActor = system.actorOf(ParseFixPatternActor.props(100, editScriptsFilePath,
|
||||
patchesSourceCodeFilePath, buggyTokensFilePath, editScriptSizesFilePath), "mine-fix-pattern-actor");
|
||||
parsingActor.tell(msg, ActorRef.noSender());
|
||||
} catch (Exception e) {
|
||||
|
||||
Reference in New Issue
Block a user