Skip to content

Commit

Permalink
Commit by Martin Monperrus on 06 March 2018
Browse files Browse the repository at this point in the history
  • Loading branch information
monperrus committed Mar 6, 2018
1 parent e27c120 commit 7cb359a
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions nopol/src/main/java/fr/inria/lille/repair/nopol/NoPol.java
Expand Up @@ -276,13 +276,17 @@ private List<Patch> runNopolProcessor(List<TestResult> tests, SourceLocation sou
}

Synthesizer synth = SynthesizerFactory.build(sourceFiles, spooner, nopolContext, sourceLocation, nopolProcessor, angelicValue, spoonCl);
if (synth == Synthesizer.NO_OP_SYNTHESIZER) {
return patches;
}

Collection<TestCase> failingTest = reRunFailingTestCases(getFailingTestCase(tests), classpath);

if (failingTest.isEmpty()) {
return patches;
throw new RuntimeException("nothing to repair, no failing test cases");
}

// Collecting the angelic values
// TODO

// Collecting the patches
List<Patch> tmpPatches = synth.buildPatch(classpath, tests, failingTest, nopolContext.getMaxTimeBuildPatch());

if (tmpPatches.size() > 0) {
Expand All @@ -307,8 +311,7 @@ private AngelicValue buildConstraintsModelBuilder(NopolProcessor nopolProcessor,
RuntimeValues<Boolean> runtimeValuesInstance = RuntimeValues.newInstance();
switch (nopolContext.getOracle()) {
case ANGELIC:
Processor<CtStatement> processor = new ConditionalLoggingInstrumenter(runtimeValuesInstance, nopolProcessor);
return new ConstraintModelBuilder(runtimeValuesInstance, statement, processor, spooner, nopolContext);
return new ConstraintModelBuilder(runtimeValuesInstance, statement, new ConditionalLoggingInstrumenter(runtimeValuesInstance, nopolProcessor), spooner, nopolContext);
case SYMBOLIC:
return new JPFRunner<>(runtimeValuesInstance, statement, nopolProcessor, spoonCl, spooner, nopolContext);
}
Expand Down

0 comments on commit 7cb359a

Please sign in to comment.