elif project.lower() == "time":
		projectCl = (TimeProject())
	else:
		continue
	projectPath = os.path.join(root, project) 
	if os.path.isfile(projectPath):
		continue
	for bugId in os.listdir(projectPath):
		bugPath = os.path.join(projectPath, bugId) 
		if os.path.isfile(bugPath):
			continue
		for tool in os.listdir(bugPath):
			toolPath = os.path.join(bugPath, tool)
			if os.path.isfile(toolPath):
				continue
			toolCl = NopolPC()
			if tool.lower() == "nopolpc":
				toolCl =  (NopolPC())
			elif tool.lower() == "ranking":
				toolCl =  (Ranking())    
			elif tool.lower() == "nopolc":
				toolCl =  (NopolC())
			elif tool.lower() == "genprog":
				toolCl =  (Astor())
			elif tool.lower() == "kali":
				toolCl =  (Kali())
			else: 
				continue
			logToolPath = os.path.join(toolPath, "stdout.log")
			resultsPath = os.path.join(toolPath, "results.json")
			if os.path.exists(resultsPath):
Example #2
0
project = None
tool = None
projects = None
if args.project == "Lang":
    projects = [LangProject()]
elif args.project == "Math":
    projects = [MathProject()]
elif args.project == "Chart":
    projects = [ChartProject()]
elif args.project == "Time":
    projects = [TimeProject()]
elif args.project == "all":
    projects = [ChartProject(), LangProject(), MathProject(), TimeProject()]

if args.mode == "NopolPC":
    tool = NopolPC()
elif args.mode == "NopolC":
    tool = NopolC()
elif args.mode == "Ranking":
    tool = Ranking()

bugCount = None
if args.id == "all":
    for project in projects:
        if project.__module__.__contains__("Lang"):
            bugCount = 65
        elif project.__module__.__contains__("Math"):
            bugCount = 106
        elif project.__module__.__contains__("Chart"):
            bugCount = 26
        elif project.__module__.__contains__("Time"):
args = initParser()
project = None
tool = None
id = int(args.id)
if args.project == "Lang":
    project = LangProject()
elif args.project == "Math":
    project = MathProject()
elif args.project == "Chart":
    project = ChartProject()
elif args.project == "Time":
    project = TimeProject()  

if args.tool == "NopolPC":
    tool = NopolPC()
elif args.tool == "NopolC":
    tool = NopolC() 
elif args.tool == "BrutpolPC":
    tool = BrutpolPC()
elif args.tool == "BrutpolC":
    tool = BrutpolC() 
elif args.tool == "Ranking":
    tool = Ranking()     
elif args.tool == "Genprog":
    tool = Astor()
elif args.tool == "Kali":
    tool = Kali()

tool.run(project, id)
Example #4
0
 elif project.lower() == "time":
     projectCl = (TimeProject())
 else:
     continue
 projectPath = os.path.join(root, project)
 if os.path.isfile(projectPath):
     continue
 for bugId in os.listdir(projectPath):
     bugPath = os.path.join(projectPath, bugId)
     if os.path.isfile(bugPath):
         continue
     for tool in os.listdir(bugPath):
         toolPath = os.path.join(bugPath, tool)
         if os.path.isfile(toolPath):
             continue
         toolCl = NopolPC()
         if tool.lower() == "nopolpc":
             toolCl = (NopolPC())
         elif tool.lower() == "ranking":
             toolCl = (Ranking())
         elif tool.lower() == "nopolc":
             toolCl = (NopolC())
         elif tool.lower() == "genprog":
             toolCl = (Astor())
         elif tool.lower() == "kali":
             toolCl = (Kali())
         else:
             continue
         logToolPath = os.path.join(toolPath, "stdout.log")
         resultsPath = os.path.join(toolPath, "results.json")
         if os.path.exists(resultsPath):
id = int(args.id)
if args.project == "Lang":
    project = LangProject()
elif args.project == "Math":
    project = MathProject()
elif args.project == "Chart":
    project = ChartProject()
elif args.project == "Time":
    project = TimeProject()
elif args.project == "Closure":
    project = ClosureProject()
elif args.project == "Mockito":
    project = MockitoProject()

if args.tool == "NopolPC":
    tool = NopolPC()
elif args.tool == "NopolC":
    tool = NopolC()
elif args.tool == "Nopol":
    tool = Nopol()
elif args.tool == "Brutpol":
    tool = Brutpol()
elif args.tool == "BrutpolPC":
    tool = BrutpolPC()
elif args.tool == "BrutpolC":
    tool = BrutpolC()
elif args.tool == "Ranking":
    tool = Ranking()
elif args.tool == "Genprog":
    tool = Astor()
elif args.tool == "Kali":
Example #6
0
        projects.append(MockitoProject())

tools = []
for tool in args.tools:
    if tool.lower() == "all":
        tools.append(Nopol())
        tools.append(Astor())
        tools.append(Kali())
        tools.append(BrutpolPC())
        tools.append(BrutpolC())
    elif tool.lower() == "nopol":
        tools.append(Nopol())
    elif tool.lower() == "nopolc":
        tools.append(NopolC())
    elif tool.lower() == "nopolpc":
        tools.append(NopolPC())
    elif tool.lower() == "ranking":
        tools.append(Ranking())
    elif tool.lower() == "brutpol":
        tools.append(Brutpol())
    elif tool.lower() == "brutpolpc":
        tools.append(BrutpolPC())
    elif tool.lower() == "brutpolc":
        tools.append(BrutpolC())
    elif tool.lower() == "genprog":
        tools.append(Astor())
    elif tool.lower() == "kali":
        tools.append(Kali())

tasks = []