Skip to content

Commit

Permalink
Fixing few NPEs for input and output coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
apanichella committed Sep 15, 2017
1 parent c47bc31 commit 29b9522
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ private void addDependencies4Output() {
OutputCoverageTestFitness output = (OutputCoverageTestFitness) ff;
ClassLoader loader = TestGenerationContext.getInstance().getClassLoaderForSUT();
BytecodeInstructionPool pool = BytecodeInstructionPool.getInstance(loader);
if (pool.getInstructionsIn(output.getClassName(), output.getMethod()) == null)
continue;
for (BytecodeInstruction instruction : pool.getInstructionsIn(output.getClassName(), output.getMethod())) {
if (instruction.getBasicBlock() != null){
Set<ControlDependency> cds = instruction.getBasicBlock().getControlDependencies();
Expand Down Expand Up @@ -159,6 +161,8 @@ private void addDependencies4Input() {
InputCoverageTestFitness input = (InputCoverageTestFitness) ff;
ClassLoader loader = TestGenerationContext.getInstance().getClassLoaderForSUT();
BytecodeInstructionPool pool = BytecodeInstructionPool.getInstance(loader);
if (pool.getInstructionsIn(input.getClassName(), input.getMethod()) == null)
continue;
for (BytecodeInstruction instruction : pool.getInstructionsIn(input.getClassName(), input.getMethod())) {
if (instruction.getBasicBlock() != null){
Set<ControlDependency> cds = instruction.getBasicBlock().getControlDependencies();
Expand Down

0 comments on commit 29b9522

Please sign in to comment.