public String[] projectTestClasses() { return nopolContext.getProjectTests(); }
/** uses {@link #createInstance(NopolContext)} */ private GZoltarFaultLocalizer(NopolContext nopolContext) throws IOException { this(nopolContext.getProjectClasspath(), checkNotNull(Arrays.asList("")), nopolContext.getProjectTests(), new Ochiai()); }
public NoPol(NopolContext nopolContext) { this.startTime = System.currentTimeMillis(); this.nopolContext = nopolContext; this.classpath = nopolContext.getProjectClasspath(); this.sourceFiles = nopolContext.getProjectSources(); this.nopolResult = new NopolResult(nopolContext, this.startTime); RepairType type = nopolContext.getType(); logger.info("Source files: " + Arrays.toString(sourceFiles)); logger.info("Classpath: " + Arrays.toString(classpath)); logger.info("Statement type: " + type); logger.info("Args: " + Arrays.toString(nopolContext.getProjectTests())); logger.info("Config: " + nopolContext); this.logSystemInformation(); this.spooner = new SpoonedProject(this.sourceFiles, nopolContext); this.testClasses = nopolContext.getProjectTests(); this.testPatch = new TestPatch(this.sourceFiles[0], this.spooner, nopolContext); }
public CocoSpoonBasedSpectrumBasedFaultLocalizer(NopolContext nopolContext, Metric metric) { runTests(nopolContext.getProjectTests(), nopolContext, new SpoonedProject(nopolContext.getProjectSources(), nopolContext), new WatcherProcessor()); this.metric = metric; this.statements = new ArrayList<>(); }
public Ranking(NopolContext nopolContext) { this.classpath = nopolContext.getProjectClasspath(); this.testClasses = nopolContext.getProjectTests(); // get all test classes of the current project if (this.testClasses.length == 0) { this.testClasses = new TestClassesFinder().findIn(classpath, false); } // init gzoltar gZoltar = GZoltarFaultLocalizer.createInstance(nopolContext); }
for (String testClass : nopolContext.getProjectTests()) { try { URLClassLoader urlClassLoader = new URLClassLoader(nopolContext.getProjectClasspath(), this.getClass().getClassLoader());