Program: 189558
Project: 189558
Buggy source:
private Set<InferredPath> computePaths(PathKey key){
  final InferredEdge currentEdge=key.getState().getInferredEdge();
  final Coordinate toCoord=GeoUtils.reverseCoordinates(key.getEndCoord());
  final Set<InferredPath> paths=Sets.newHashSet(InferredPath.getEmptyPath());
  final Set<Edge> startEdges=Sets.newHashSet();
  final double stateStdDevDistance=1.98d * Math.sqrt(key.getState().getBelief().getCovariance().normFrobenius());
  if (!currentEdge.isEmptyEdge()) {
    startEdges.add(currentEdge.getEdge());
  }
 else {
    final Coordinate fromCoord=GeoUtils.reverseCoordinates(key.getStartCoord());
    final Envelope fromEnv=new Envelope(fromCoord);
    fromEnv.expandBy(GeoUtils.getMetersInAngleDegrees(stateStdDevDistance));
    for (    final Object obj : this.pathSampler.getEdgeIndex().query(fromEnv)) {
      final Edge edge=(Edge)obj;
      startEdges.add(edge);
    }
  }
  final Set<Edge> endEdges=Sets.newHashSet();
  final Envelope toEnv=new Envelope(toCoord);
  final double obsStdDevDistance=1.98d * Math.sqrt(key.getState().getMovementFilter().getObsVariance().normFrobenius());
  toEnv.expandBy(GeoUtils.getMetersInAngleDegrees(obsStdDevDistance));
  for (  final Object obj : this.pathSampler.getEdgeIndex().query(toEnv)) {
    final Edge edge=(Edge)obj;
    endEdges.add(edge);
  }
  final List<Edge> endEdgeList=Lists.newArrayList(endEdges);
  for (  final Edge startEdge : startEdges) {
    final MultiDestinationAStar aStar=new MultiDestinationAStar(this.graph,endEdgeList,toCoord,obsStdDevDistance,startEdge);
    final ShortestPathTree spt1=aStar.getSPT(false);
    final ShortestPathTree spt2=aStar.getSPT(true);
    for (    final Edge endEdge : endEdgeList) {
      final GraphPath forwardPath=spt1.getPath(endEdge.getFromVertex(),false);
      if (forwardPath != null) {
        final InferredPath forwardResult=copyAStarResults(forwardPath,false);
        if (forwardResult != null)         paths.add(forwardResult);
      }
      final GraphPath backwardPath=spt2.getPath(endEdge.getFromVertex(),false);
      if (backwardPath != null) {
        final InferredPath backwardResult=copyAStarResults(backwardPath,true);
        if (backwardResult != null)         paths.add(backwardResult);
      }
    }
  }
  return paths;
}

Fixed version (ground truth):
private Set<InferredPath> computePaths(PathKey key){
  final InferredEdge currentEdge=key.getState().getInferredEdge();
  final Coordinate toCoord=GeoUtils.reverseCoordinates(key.getEndCoord());
  final Set<InferredPath> paths=Sets.newHashSet(InferredPath.getEmptyPath());
  final Set<Edge> startEdges=Sets.newHashSet();
  final double stateStdDevDistance=1.98d * Math.sqrt(key.getState().getBelief().getCovariance().normFrobenius());
  if (!currentEdge.isEmptyEdge()) {
    startEdges.add(currentEdge.getEdge());
  }
 else {
    final Coordinate fromCoord=GeoUtils.reverseCoordinates(key.getStartCoord());
    final Envelope fromEnv=new Envelope(fromCoord);
    fromEnv.expandBy(GeoUtils.getMetersInAngleDegrees(stateStdDevDistance));
    for (    final Object obj : this.pathSampler.getEdgeIndex().query(fromEnv)) {
      final Edge edge=(Edge)obj;
      startEdges.add(edge);
    }
  }
  final Set<Edge> endEdges=Sets.newHashSet();
  final Envelope toEnv=new Envelope(toCoord);
  final double obsStdDevDistance=1.98d * Math.sqrt(key.getState().getMovementFilter().getObsVariance().normFrobenius());
  toEnv.expandBy(GeoUtils.getMetersInAngleDegrees(obsStdDevDistance));
  for (  final Object obj : this.pathSampler.getEdgeIndex().query(toEnv)) {
    final Edge edge=(Edge)obj;
    endEdges.add(edge);
  }
  final List<Edge> endEdgeList=Lists.newArrayList(endEdges);
  for (  final Edge startEdge : startEdges) {
    final MultiDestinationAStar forwardAStar=new MultiDestinationAStar(this.graph,endEdgeList,toCoord,obsStdDevDistance,startEdge);
    final MultiDestinationAStar backwardAStar=new MultiDestinationAStar(this.graph,endEdgeList,toCoord,obsStdDevDistance,startEdge);
    final ShortestPathTree spt1=forwardAStar.getSPT(false);
    final ShortestPathTree spt2=backwardAStar.getSPT(true);
    for (    final Edge endEdge : endEdgeList) {
      final GraphPath forwardPath=spt1.getPath(endEdge.getToVertex(),false);
      if (forwardPath != null) {
        final InferredPath forwardResult=copyAStarResults(forwardPath,startEdge,false);
        if (forwardResult != null)         paths.add(forwardResult);
      }
      final GraphPath backwardPath=spt2.getPath(endEdge.getToVertex(),false);
      if (backwardPath != null) {
        final InferredPath backwardResult=copyAStarResults(backwardPath,startEdge,true);
        if (backwardResult != null)         paths.add(backwardResult);
      }
    }
  }
  return paths;
}