Program: 189551
Project: 189551
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.narratedGraph.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.narratedGraph.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);
          forwardResult.setStartEdge(this.getInferredEdge(startEdge));
          forwardResult.setEndEdge(this.getInferredEdge(endEdge));
        }
      }
      final GraphPath backwardPath=spt2.getPath(endEdge.getFromVertex(),false);
      if (backwardPath != null) {
        final InferredPath backwardResult=copyAStarResults(backwardPath,startEdge,true);
        if (backwardResult != null) {
          paths.add(backwardResult);
          backwardResult.setStartEdge(this.getInferredEdge(startEdge));
          backwardResult.setEndEdge(this.getInferredEdge(endEdge));
        }
      }
    }
  }
  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.narratedGraph.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));
  final RoutingRequest options=new RoutingRequest(TraverseMode.CAR);
  for (  final Object obj : this.narratedGraph.getEdgeIndex().query(toEnv)) {
    final Edge edge=(Edge)obj;
    if (((StreetEdge)edge).canTraverse(options)) {
      endEdges.add(edge);
    }
  }
  for (  final Edge startEdge : startEdges) {
    final MultiDestinationAStar forwardAStar=new MultiDestinationAStar(this.graph,endEdges,toCoord,obsStdDevDistance,startEdge);
    final MultiDestinationAStar backwardAStar=new MultiDestinationAStar(this.graph,endEdges,toCoord,obsStdDevDistance,startEdge);
    final ShortestPathTree spt1=forwardAStar.getSPT(false);
    final ShortestPathTree spt2=backwardAStar.getSPT(true);
    for (    final Edge endEdge : endEdges) {
      final GraphPath forwardPath=spt1.getPath(endEdge.getToVertex(),false);
      if (forwardPath != null) {
        final InferredPath forwardResult=copyAStarResults(forwardPath,startEdge,false);
        if (forwardResult != null) {
          paths.add(forwardResult);
          forwardResult.setStartEdge(this.getInferredEdge(startEdge));
          forwardResult.setEndEdge(this.getInferredEdge(endEdge));
        }
      }
      final GraphPath backwardPath=spt2.getPath(endEdge.getFromVertex(),false);
      if (backwardPath != null) {
        final InferredPath backwardResult=copyAStarResults(backwardPath,startEdge,true);
        if (backwardResult != null) {
          paths.add(backwardResult);
          backwardResult.setStartEdge(this.getInferredEdge(startEdge));
          backwardResult.setEndEdge(this.getInferredEdge(endEdge));
        }
      }
    }
  }
  return paths;
}