/** * Only log once for a class * @param className * @param msg */ public synchronized void logWarn(String className, String msg){ AtMostOnceLogger.warn(logger,msg); }
/** * Rather use AtMostOnceLogger directly * * @param logger * @param message */ @Deprecated public static void logWarnAtMostOnce(Logger logger, String message){ AtMostOnceLogger.warn(logger, message); }
/** * Creates a solution based on the best solutions in the archive and the parameter solution. * * @param solution a {@link org.evosuite.testsuite.TestSuiteChromosome} object. * @return a {@link org.evosuite.testsuite.TestSuiteChromosome} object. */ @SuppressWarnings("unchecked") public <C extends Chromosome> C mergeArchiveAndSolution(C solution) { if (solution instanceof TestChromosome) { return (C) this.createMergedSolution((TestChromosome) solution); } else if (solution instanceof TestSuiteChromosome) { return (C) this.createMergedSolution((TestSuiteChromosome) solution); } AtMostOnceLogger.warn(logger, "Type of solution '" + solution.getClass().getCanonicalName() + "' not supported"); return null; }
private void addToArchive(F target, T solution) { this.uncovered.remove(target); this.covered.put(target, solution); this.removeNonCoveredTargetOfAMethod(target); this.hasBeenUpdated = true; ExecutionResult result = solution.getLastExecutionResult(); if (result != null && (result.hasTimeout() || result.hasTestException())) { AtMostOnceLogger.warn(logger, "A solution with a timeout/exception result has been added to the archive. The covered goal was " + target.toString()); } }
/** * This method is called when a new individual is sent from a client. * The individual represents the best individual of the current generation. * * @param individual best individual of current generation */ public void currentIndividual(Chromosome individual) { if(backend == null) return; if(!(individual instanceof TestSuiteChromosome)) { AtMostOnceLogger.warn(logger, "searchStatistics expected a TestSuiteChromosome"); return; } logger.debug("Received individual"); bestIndividual = (TestSuiteChromosome) individual; for(ChromosomeOutputVariableFactory<?> v : variableFactories.values()) { setOutputVariable(v.getVariable((TestSuiteChromosome) individual)); } for(SequenceOutputVariableFactory<?> v : sequenceOutputVariableFactories.values()) { v.update((TestSuiteChromosome) individual); } }
AtMostOnceLogger.warn(logger, "Problem with class "+rawClass.getName()+": " + e.toString()); return false;
AtMostOnceLogger.warn(logger, "Unknown criterion '" + criterion.name() + "'"); break;
AtMostOnceLogger.warn(LoggingUtils.getEvoLogger(), "ArrayStoreException caught while handling class "+c.getName()); AtMostOnceLogger.warn(LoggingUtils.getEvoLogger(), "This is likely due to a missing dependency used as annotation: https://bugs.java.com/view_bug.do?bug_id=JDK-7183985"); return false;
AtMostOnceLogger.warn(logger, "Not sufficient candidates for reproduction, consider increasing the population size, or the truncation rate");
AtMostOnceLogger.warn(logger, msg); throw new ConstructionFailedException(msg);
AtMostOnceLogger.warn(logger, msg); fms.fillWithNullRefs(); return changed;
AtMostOnceLogger.warn(logger,"Failed environment insertion: "+e);
AtMostOnceLogger.warn(logger, "Bounded variable issue when calling createVariable()"); return null;