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)
Exemple #2
0
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"):
            bugCount = 27
        for bugId in range(bugCount):
            tool.run(project, bugId + 1)

else:
    for project in projects:
        bugId = int(args.id)
        tool.run(project, bugId)
    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":
    tool = Kali()

tool.run(project, id)