Program: 189527
Project: 189527
Buggy source:
private Set<InferredPath> computePaths(PathKey key){
  final InferredEdge currentEdge=key.getState().getInferredEdge();
  final Coordinate toCoord=key.getEndCoord();
  final Coordinate fromCoord=key.getStartCoord();
  final Set<InferredPath> paths=Sets.newHashSet(InferredPath.getEmptyPath());
  final Set<Edge> startEdges=Sets.newHashSet();
  if (!currentEdge.isEmptyEdge()) {
    final PlainStreetEdgeWithOSMData edge=(PlainStreetEdgeWithOSMData)currentEdge.getEdge();
    for (    final Edge outgoing : edge.getTurnVertex().getOutgoing()) {
      startEdges.add(outgoing);
    }
  }
 else {
    final double stateStdDevDistance=1.98d * Math.sqrt(key.getState().getBelief().getCovariance().normFrobenius());
    for (    final Object obj : getNearbyEdges(fromCoord,stateStdDevDistance)) {
      final PlainStreetEdgeWithOSMData edge=(PlainStreetEdgeWithOSMData)obj;
      startEdges.addAll(edge.getTurnVertex().getOutgoing());
    }
  }
  final Set<Edge> endEdges=Sets.newHashSet();
  final double obsStdDevDistance=1.98d * Math.sqrt(key.getState().getMovementFilter().getObsVariance().normFrobenius());
  for (  final Object obj : getNearbyEdges(toCoord,obsStdDevDistance)) {
    final PlainStreetEdgeWithOSMData edge=(PlainStreetEdgeWithOSMData)obj;
    endEdges.addAll(edge.getTurnVertex().getOutgoing());
  }
  final double timeDiff=key.getState().getMovementFilter().getCurrentTimeDiff();
  final double distanceMax=MAX_DISTANCE_SPEED * timeDiff;
  for (  final Edge startEdge : startEdges) {
    final MultiDestinationAStar forwardAStar=new MultiDestinationAStar(turnGraph,endEdges,toCoord,obsStdDevDistance,startEdge,distanceMax);
    final ShortestPathTree spt1=forwardAStar.getSPT(false);
    final MultiDestinationAStar backwardAStar=new MultiDestinationAStar(turnGraph,endEdges,toCoord,obsStdDevDistance,startEdge,distanceMax);
    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,getBaseEdge(startEdge),false);
        if (forwardResult != null) {
          paths.add(forwardResult);
          forwardResult.setStartEdge(this.getInferredEdge(startEdge));
          forwardResult.setEndEdge(this.getInferredEdge(endEdge));
        }
      }
      if (backwardAStar != null) {
        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=key.getEndCoord();
  final Coordinate fromCoord=key.getStartCoord();
  final Set<InferredPath> paths=Sets.newHashSet(InferredPath.getEmptyPath());
  final Set<Edge> startEdges=Sets.newHashSet();
  if (!currentEdge.isEmptyEdge()) {
    final PlainStreetEdgeWithOSMData edge=(PlainStreetEdgeWithOSMData)currentEdge.getEdge();
    for (    final Edge outgoing : edge.getTurnVertex().getOutgoing()) {
      startEdges.add(outgoing);
    }
  }
 else {
    final double stateStdDevDistance=1.98d * Math.sqrt(key.getState().getBelief().getCovariance().normFrobenius());
    for (    final Object obj : getNearbyEdges(fromCoord,stateStdDevDistance)) {
      final PlainStreetEdgeWithOSMData edge=(PlainStreetEdgeWithOSMData)obj;
      startEdges.addAll(edge.getTurnVertex().getOutgoing());
    }
  }
  final Set<Edge> endEdges=Sets.newHashSet();
  final double obsStdDevDistance=1.98d * Math.sqrt(key.getState().getMovementFilter().getObsVariance().normFrobenius());
  for (  final Object obj : getNearbyEdges(toCoord,obsStdDevDistance)) {
    final PlainStreetEdgeWithOSMData edge=(PlainStreetEdgeWithOSMData)obj;
    endEdges.addAll(edge.getTurnVertex().getOutgoing());
  }
  final double timeDiff=key.getState().getMovementFilter().getCurrentTimeDiff();
  final double distanceMax=MAX_DISTANCE_SPEED * timeDiff;
  for (  final Edge startEdge : startEdges) {
    final MultiDestinationAStar forwardAStar=new MultiDestinationAStar(turnGraph,endEdges,toCoord,obsStdDevDistance,startEdge,distanceMax);
    final ShortestPathTree spt1=forwardAStar.getSPT(false);
    final MultiDestinationAStar backwardAStar=new MultiDestinationAStar(turnGraph,endEdges,toCoord,obsStdDevDistance,startEdge,distanceMax);
    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,getBaseEdge(startEdge),false);
        if (forwardResult != null) {
          paths.add(forwardResult);
          forwardResult.setStartSearchEdge(this.getInferredEdge(startEdge));
          forwardResult.setEndSearchEdge(this.getInferredEdge(endEdge));
        }
      }
      if (backwardAStar != null) {
        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.setStartSearchEdge(this.getInferredEdge(startEdge));
            backwardResult.setEndSearchEdge(this.getInferredEdge(endEdge));
          }
        }
      }
    }
  }
  return paths;
}