@Test public void testCrashReproductionGoalFactory() { CrashProperties.fitnessFunctions = new CrashProperties.FitnessFunction[]{CrashProperties.FitnessFunction.IntegrationSingleObjective}; crashReproductionGoalFactory = new CrashReproductionGoalFactory(); assertEquals("class eu.stamp.botsing.fitnessfunction.IntegrationTestingFF", crashReproductionGoalFactory.getCoverageGoals().get(0).getClass().toString()); CrashProperties.fitnessFunctions = new CrashProperties.FitnessFunction[]{CrashProperties.FitnessFunction.WeightedSum, CrashProperties.FitnessFunction.SimpleSum}; crashReproductionGoalFactory = new CrashReproductionGoalFactory(); assertEquals("class eu.stamp.botsing.fitnessfunction.WeightedSum", crashReproductionGoalFactory.getCoverageGoals().get(0).getClass().toString()); }
public CrashReproductionGoalFactory() { fitnessFunctionHelper = new FitnessFunctionHelper(); goals.clear(); if (CrashProperties.getInstance().getCrashesSize() > 1 || CrashProperties.fitnessFunctions.length > 1) { TestFitnessFunction[] fetchedGoals = fitnessFunctionHelper.getMultiObjectives(); for (TestFitnessFunction goal : fetchedGoals) { String key = getKey(goal); goals.put(key, goal); } } else { TestFitnessFunction goal = fitnessFunctionHelper.getSingleObjective(); String key = getKey(goal); if (!goals.containsKey(key)) { goals.put(key, goal); } } }
CrashReproductionGoalFactory extends AbstractFitnessFactory<TestFitnessFunction> { public CrashReproductionGoalFactory() { fitnessFunctionHelper = new FitnessFunctionHelper(); goals.clear(); if (CrashProperties.getInstance().getCrashesSize() > 1 || CrashProperties.fitnessFunctions.length > 1) { TestFitnessFunction[] fetchedGoals = fitnessFunctionHelper.getMultiObjectives(); for (TestFitnessFunction goal : fetchedGoals) { String key = getKey(goal); goals.put(key, goal); } } else { TestFitnessFunction goal = fitnessFunctionHelper.getSingleObjective(); String key = getKey(goal); if (!goals.containsKey(key)) { goals.put(key, goal); } } } }
CrashReproductionGoalFactory extends AbstractFitnessFactory<TestFitnessFunction> { public CrashReproductionGoalFactory() { fitnessFunctionHelper = new FitnessFunctionHelper(); goals.clear(); if (CrashProperties.getInstance().getCrashesSize() > 1 || CrashProperties.fitnessFunctions.length > 1) { TestFitnessFunction[] fetchedGoals = fitnessFunctionHelper.getMultiObjectives(); for (TestFitnessFunction goal : fetchedGoals) { String key = getKey(goal); goals.put(key, goal); } } else { TestFitnessFunction goal = fitnessFunctionHelper.getSingleObjective(); String key = getKey(goal); if (!goals.containsKey(key)) { goals.put(key, goal); } } } CrashReproductionGoalFactory(); }
CrashReproductionGoalFactory extends AbstractFitnessFactory<TestFitnessFunction> { public CrashReproductionGoalFactory() { fitnessFunctionHelper = new FitnessFunctionHelper(); goals.clear(); if (CrashProperties.getInstance().getCrashesSize() > 1 || CrashProperties.fitnessFunctions.length > 1) { TestFitnessFunction[] fetchedGoals = fitnessFunctionHelper.getMultiObjectives(); for (TestFitnessFunction goal : fetchedGoals) { String key = getKey(goal); goals.put(key, goal); } } else { TestFitnessFunction goal = fitnessFunctionHelper.getSingleObjective(); String key = getKey(goal); if (!goals.containsKey(key)) { goals.put(key, goal); } } } CrashReproductionGoalFactory(); @Override List<TestFitnessFunction> getCoverageGoals(); String getKey(TestFitnessFunction goal); }
CrashReproductionGoalFactory extends AbstractFitnessFactory<TestFitnessFunction> { public CrashReproductionGoalFactory() { fitnessFunctionHelper = new FitnessFunctionHelper(); goals.clear(); if (CrashProperties.getInstance().getCrashesSize() > 1 || CrashProperties.fitnessFunctions.length > 1) { TestFitnessFunction[] fetchedGoals = fitnessFunctionHelper.getMultiObjectives(); for (TestFitnessFunction goal : fetchedGoals) { String key = getKey(goal); goals.put(key, goal); } } else { TestFitnessFunction goal = fitnessFunctionHelper.getSingleObjective(); String key = getKey(goal); if (!goals.containsKey(key)) { goals.put(key, goal); } } } CrashReproductionGoalFactory(); @Override List<TestFitnessFunction> getCoverageGoals(); String getKey(TestFitnessFunction goal);  }