[-] Remove commented code
This commit is contained in:
+1
-1
@@ -96,7 +96,7 @@ def create_dataset(cfg: dict, project_list: str = PROJECT_LIST):
|
||||
raise NotImplementedError(f'Unknown limitCommitsBeforeDays type: {type(value)}. '
|
||||
f'Only timedelta and int/float (days) are supported.')
|
||||
|
||||
print(f'> Has {len(commits)} comments before filtering for date < {end_date}')
|
||||
print(f'> Has {len(commits)} commits before filtering for date < {end_date}')
|
||||
commits = commits[commits.commitDate < end_date]
|
||||
|
||||
commits = commits[commits.commit.isin(fixes)]
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
source activate fixminerEnv
|
||||
|
||||
PYTHONPATH=$(pwd) python -u main.py -root $(pwd) -job $2 -prop $1
|
||||
@@ -16,34 +16,16 @@ import java.util.Properties;
|
||||
/**
|
||||
* Created by anilkoyuncu on 14/04/2018.
|
||||
*/
|
||||
public class Launcher {
|
||||
public class Launcher
|
||||
{
|
||||
|
||||
private static Logger log = LoggerFactory.getLogger(Launcher.class);
|
||||
|
||||
public static void main(String[] args) throws IOException {
|
||||
|
||||
|
||||
public static void main(String[] args) throws IOException
|
||||
{
|
||||
Properties appProps = new Properties();
|
||||
|
||||
// String hostname = "Unknown";
|
||||
// try
|
||||
// {
|
||||
// InetAddress addr;
|
||||
// addr = InetAddress.getLocalHost();
|
||||
// hostname = addr.getHostName();
|
||||
// }
|
||||
// catch (UnknownHostException ex)
|
||||
// {
|
||||
// System.out.println("Hostname can not be resolved");
|
||||
// }
|
||||
// String appConfigPath;
|
||||
// if (hostname.equals("Unknown")){
|
||||
// appConfigPath = "src/main/resource/app.properties";
|
||||
// }
|
||||
// else{
|
||||
// appConfigPath = "src/main/resource/"+hostname.split("\\.")[0]+".app.properties";
|
||||
// }
|
||||
if(args.length != 2)
|
||||
if (args.length != 2)
|
||||
{
|
||||
System.out.println("Proper Usage is: \n\tfirst argument full path to .properties file (e.g. an example is located under resources) \n\tsecond argument jobType (e.g RICHEDITSCRIPT, COMPARE)");
|
||||
System.exit(0);
|
||||
@@ -52,14 +34,10 @@ public class Launcher {
|
||||
String appConfigPath = args[0];
|
||||
|
||||
Yaml yaml = new Yaml();
|
||||
// InputStream inputStream = this.getClass()
|
||||
// .getClassLoader()
|
||||
// .getResourceAsStream("customer.yaml");
|
||||
Map<String, Object> obj = yaml.load(new FileInputStream(appConfigPath));
|
||||
|
||||
appProps.load(new FileInputStream(appConfigPath));
|
||||
Map<String, Object> fixminer = (Map<String, Object>) obj.get("fixminer");
|
||||
// String numOfWorkers = appProps.getProperty("numOfWorkers", "10");
|
||||
String numOfWorkers = String.valueOf(fixminer.get("numOfWorkers"));
|
||||
String portDumps = String.valueOf(fixminer.get("portDumps"));
|
||||
String projectType = (String) fixminer.get("projectType");
|
||||
@@ -72,80 +50,42 @@ public class Launcher {
|
||||
String redisPath = (String) fixminer.get("redisPath");
|
||||
String srcMLPath = (String) fixminer.get("srcMLPath");
|
||||
|
||||
// String parameter = args[2];
|
||||
// String parameter = "L1";
|
||||
String jobType = args[1];
|
||||
// String jobType = "RICHEDITSCRIPT";
|
||||
// jobType = "COMPARE";
|
||||
|
||||
|
||||
mainLaunch( numOfWorkers, jobType, portDumps,projectType,input,redisPath, srcMLPath,hunkLimit,projectList,patchSize);
|
||||
|
||||
|
||||
mainLaunch(numOfWorkers, jobType, portDumps, projectType, input, redisPath, srcMLPath, hunkLimit, projectList, patchSize);
|
||||
}
|
||||
|
||||
public static void mainLaunch(String numOfWorkers, String jobType, String portDumps, String projectType, String input, String redisPath,String srcMLPath,String hunkLimit,String[] projectList,String patchSize){
|
||||
|
||||
|
||||
public static void mainLaunch(String numOfWorkers, String jobType, String portDumps, String projectType, String input, String redisPath, String srcMLPath, String hunkLimit, String[] projectList, String patchSize)
|
||||
{
|
||||
String dbDir;
|
||||
String dumpsName;
|
||||
String gumInput;
|
||||
|
||||
dumpsName = "dumps-"+projectType+".rdb";
|
||||
dumpsName = "dumps-" + projectType + ".rdb";
|
||||
|
||||
gumInput = input;
|
||||
dbDir = redisPath;
|
||||
|
||||
|
||||
try {
|
||||
switch (jobType) {
|
||||
try
|
||||
{
|
||||
switch (jobType)
|
||||
{
|
||||
case "RICHEDITSCRIPT":
|
||||
EnhancedASTDiff.main(gumInput, portDumps, dbDir, dumpsName, srcMLPath,hunkLimit,projectList,patchSize,projectType);
|
||||
EnhancedASTDiff.main(gumInput, portDumps, dbDir, dumpsName, srcMLPath, hunkLimit, projectList, patchSize, projectType);
|
||||
break;
|
||||
|
||||
case "COMPARE":
|
||||
// String job;
|
||||
// String compareDBName;
|
||||
// switch (parameter){
|
||||
// case "L1":
|
||||
//// job = "shape";
|
||||
// job = "single";
|
||||
// compareDBName = "clusterl0-gumInputALL.rdb";
|
||||
// break;
|
||||
// case "L2":
|
||||
// job = "action";
|
||||
// compareDBName = "clusterl1-gumInputALL.rdb";
|
||||
// break;
|
||||
// case "L3":
|
||||
// job = "token";
|
||||
// compareDBName = "clusterl2-gumInputALL.rdb";
|
||||
// break;
|
||||
// default:
|
||||
// throw new Error("unknown level please specify L1,L2,L3");
|
||||
// }
|
||||
|
||||
|
||||
CompareTrees.main(redisPath, portDumps,dumpsName, numOfWorkers);
|
||||
CompareTrees.main(redisPath, portDumps, dumpsName, numOfWorkers);
|
||||
break;
|
||||
// case "PATTERN":
|
||||
// ClusterToPattern.main(portDumps,redisPath, dumpsName, parameter);
|
||||
// break;
|
||||
default:
|
||||
throw new Error("unknown Job");
|
||||
|
||||
}
|
||||
} catch (Exception e) {
|
||||
// log.error(e.getMessage());
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
// e.printStackTrace();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user