From cce03be0b7078c3fdcbacc6737a7f6ddc4c1a79d Mon Sep 17 00:00:00 2001 From: Anil Koyuncu Date: Sat, 10 Feb 2018 15:07:13 +0100 Subject: [PATCH] runnable jar --- pom.xml | 35 ++++++++++++++++--- .../MultipleThreadsParser/AkkaParser2.java | 11 +++--- .../lu/uni/serval/config/Configuration.java | 2 +- 3 files changed, 37 insertions(+), 11 deletions(-) diff --git a/pom.xml b/pom.xml index 6cb33af..5f2acdd 100644 --- a/pom.xml +++ b/pom.xml @@ -42,11 +42,11 @@ 2.0.0-SNAPSHOT - - edu.lu.uni.serval - SourceCodeParser - 0.0.1-SNAPSHOT - + + + + + edu.lu.uni.serval @@ -73,6 +73,31 @@ 1.8 + + + org.apache.maven.plugins + maven-assembly-plugin + + + package + + single + + + + + + edu.lu.uni.serval.MultipleThreadsParser.AkkaParser2 + + + + + jar-with-dependencies + + + + + diff --git a/src/main/java/edu/lu/uni/serval/MultipleThreadsParser/AkkaParser2.java b/src/main/java/edu/lu/uni/serval/MultipleThreadsParser/AkkaParser2.java index fa07097..ff4015c 100644 --- a/src/main/java/edu/lu/uni/serval/MultipleThreadsParser/AkkaParser2.java +++ b/src/main/java/edu/lu/uni/serval/MultipleThreadsParser/AkkaParser2.java @@ -31,16 +31,17 @@ public class AkkaParser2 { */ @SuppressWarnings("deprecation") public static void main(String[] args) { -// String inputRootPath = args[0]; - int numberOfWorkers = 10; //Integer.parseInt(args[1]); - int hunkThreshold = 5; + String inputRootPath = args[0]; + int numberOfWorkers = Integer.parseInt(args[1]); + int hunkThreshold = Integer.parseInt(args[2]); // try { // hunkThreshold = Integer.parseInt(args[2]); // } catch (NumberFormatException e1) { // hunkThreshold = 10; // } -// Configuration.ROOT_PATH = inputRootPath; + Configuration.ROOT_PATH = inputRootPath; + log.info(Configuration.ROOT_PATH); Configuration.HUNK_SIZE = hunkThreshold; @@ -51,7 +52,7 @@ public class AkkaParser2 { // String GIT_REPOSITORY_PATH = "/Users/anilkoyuncu/bugLocalizationStudy/irblsensitivity/data/" + pjPath + "/" + pjName + "/gitrepo/.git"; log.info(pjName); // input data - log.info("Get the input data..."); + log.info("Get the input data..." + Configuration.GUM_TREE_INPUT +pjName +"/"); final List msgFiles = getMessageFiles(Configuration.GUM_TREE_INPUT +pjName +"/"); log.info("MessageFiles: " + msgFiles.size()); diff --git a/src/main/java/edu/lu/uni/serval/config/Configuration.java b/src/main/java/edu/lu/uni/serval/config/Configuration.java index 4ff7b50..1f9658c 100644 --- a/src/main/java/edu/lu/uni/serval/config/Configuration.java +++ b/src/main/java/edu/lu/uni/serval/config/Configuration.java @@ -2,7 +2,7 @@ package edu.lu.uni.serval.config; public class Configuration { - public static final long SECONDS_TO_WAIT = 100L; + public static final long SECONDS_TO_WAIT = 300L; // public static String ROOT_PATH = "/Volumes/data/bugStudy/dataset/"; // The root path of all output data. public static String ROOT_PATH = "/Users/anilkoyuncu/bugStudy/dataset/"; // The root path of all output data.