Program: 189474
Project: 189474
Buggy source:
@Override public Set<InferredPath> getPaths(final VehicleState fromState,final Coordinate toCoord){
  InferredEdge currentEdge=fromState.getBelief().getEdge().getInferredEdge();
  Set<InferredEdge> startEdges=Sets.newHashSet();
  if (!currentEdge.isNullEdge()) {
    startEdges.add(currentEdge);
  }
 else {
    final MultivariateGaussian obsBelief=fromState.getMovementFilter().getObservationBelief(fromState.getBelief());
    final double beliefDistance=Math.min(StatisticsUtil.getLargeNormalCovRadius((DenseMatrix)obsBelief.getCovariance()),MAX_STATE_SNAP_RADIUS);
    startEdges.addAll(getNearbyEdges(fromState.getMeanLocation(),beliefDistance));
  }
  final Set<InferredEdge> endEdges=Sets.newHashSet();
  final double obsStdDevDistance=Math.min(StatisticsUtil.getLargeNormalCovRadius((DenseMatrix)fromState.getMovementFilter().getObsCovar()),MAX_OBS_SNAP_RADIUS);
  double maxEndEdgeLength=Double.NEGATIVE_INFINITY;
  for (  final InferredEdge edge : getNearbyEdges(toCoord,obsStdDevDistance)) {
    if (edge.getLength() > maxEndEdgeLength)     maxEndEdgeLength=edge.getLength();
    endEdges.add(edge);
  }
  Set<InferredPath> paths=Sets.newHashSet();
  paths.add(getNullPath());
  if (endEdges.isEmpty())   return paths;
  for (  InferredEdge startEdge : startEdges) {
    paths.add(getInferredPath(getPathEdge(startEdge,0,false)));
    for (    InferredEdge endEdge : endEdges) {
      final Node source=((DirectedEdge)startEdge.getBackingEdge()).getInNode();
      final Node target=((DirectedEdge)endEdge.getBackingEdge()).getOutNode();
      AStarFunctions afuncs=new VehicleStateAStarFunction(target,toCoord,obsStdDevDistance);
      AStarShortestPathFinder aStarIter=new AStarShortestPathFinder(this.graphGenerator.getGraph(),source,target,afuncs);
      aStarIter.calculate();
      try {
        Path path=aStarIter.getPath();
        final boolean isBackward=false;
        List<PathEdge> pathEdges=Lists.newArrayList();
        double distToStart=0d;
        Iterator iter=path.riterator();
        BasicDirectedNode prevNode=null;
        while (iter.hasNext()) {
          BasicDirectedNode node=(BasicDirectedNode)iter.next();
          if (prevNode != null && node.equals(prevNode)) {
            Edge edge=Preconditions.checkNotNull(node.getOutEdge(node));
            InferredEdge infEdge=getInferredEdge(edge);
            pathEdges.add(getPathEdge(infEdge,distToStart,isBackward));
            distToStart+=isBackward ? -infEdge.getLength() : infEdge.getLength();
          }
          prevNode=node;
        }
        if (!pathEdges.isEmpty())         paths.add(getInferredPath(pathEdges,isBackward));
      }
 catch (      Exception e) {
        log.warn("String_Node_Str" + e);
      }
    }
  }
  return paths;
}

Fixed version (ground truth):
@Override public Set<InferredPath> getPaths(final VehicleState fromState,final Coordinate toCoord){
  InferredEdge currentEdge=fromState.getBelief().getEdge().getInferredEdge();
  Set<InferredEdge> startEdges=Sets.newHashSet();
  if (!currentEdge.isNullEdge()) {
    startEdges.add(currentEdge);
  }
 else {
    final MultivariateGaussian obsBelief=fromState.getMovementFilter().getObservationBelief(fromState.getBelief());
    final double beliefDistance=Math.min(StatisticsUtil.getLargeNormalCovRadius((DenseMatrix)obsBelief.getCovariance()),MAX_STATE_SNAP_RADIUS);
    startEdges.addAll(getNearbyEdges(fromState.getMeanLocation(),beliefDistance));
  }
  final double obsStdDevDistance=Math.min(StatisticsUtil.getLargeNormalCovRadius((DenseMatrix)fromState.getMovementFilter().getObsCovar()),MAX_OBS_SNAP_RADIUS);
  final Set<Node> endNodes=Sets.newHashSet();
  for (  final InferredEdge edge : getNearbyEdges(toCoord,obsStdDevDistance)) {
    final DirectedEdge bEdge=((DirectedEdge)edge.getBackingEdge());
    endNodes.add(bEdge.getNodeA());
    endNodes.add(bEdge.getNodeB());
  }
  Set<InferredPath> paths=Sets.newHashSet();
  paths.add(getNullPath());
  if (endNodes.isEmpty())   return paths;
  for (  InferredEdge startEdge : startEdges) {
    paths.add(getInferredPath(getPathEdge(startEdge,0,false)));
    final DirectedEdge bStartEdge=((DirectedEdge)startEdge.getBackingEdge());
    final Node source=bStartEdge.getOutNode();
    Set<Node> reachedEndNodes=Sets.newHashSet(source);
    for (    Node target : endNodes) {
      if (reachedEndNodes.contains(target))       continue;
      AStarFunctions afuncs=new VehicleStateAStarFunction(target,toCoord,obsStdDevDistance);
      AStarShortestPathFinder aStarIter=new AStarShortestPathFinder(this.graphGenerator.getGraph(),source,target,afuncs);
      aStarIter.calculate();
      try {
        Path path=aStarIter.getPath();
        List<PathEdge> pathEdges=Lists.newArrayList();
        double distToStart=0d;
        Iterator iter=path.riterator();
        BasicDirectedNode prevNode=(BasicDirectedNode)bStartEdge.getInNode();
        while (iter.hasNext()) {
          BasicDirectedNode node=(BasicDirectedNode)iter.next();
          Edge edge=Preconditions.checkNotNull(prevNode.getOutEdge(node));
          InferredEdge infEdge=getInferredEdge(edge);
          pathEdges.add(getPathEdge(infEdge,distToStart,false));
          distToStart+=infEdge.getLength();
          reachedEndNodes.add(node);
          prevNode=node;
        }
        if (!pathEdges.isEmpty())         paths.add(getInferredPath(pathEdges,false));
      }
 catch (      Exception e) {
        log.warn("String_Node_Str" + e);
      }
    }
  }
  return paths;
}