Program: 112608
Project: 112608
Buggy source:
@Test public void testShortestPath(){
{
    Graph<Road> map=new Graph<>();
    map.add(new Road(0,0,1,100));
    map.add(new Road(1,1,0,100));
    map.add(new Road(2,0,2,160));
    map.add(new Road(3,2,0,160));
    map.add(new Road(4,1,2,50));
    map.add(new Road(5,2,1,50));
    map.add(new Road(6,1,3,200));
    map.add(new Road(7,3,1,200));
    map.add(new Road(8,2,3,100));
    map.add(new Road(9,3,2,100));
    map.add(new Road(10,2,4,40));
    map.add(new Road(11,4,2,40));
    map.add(new Road(12,3,4,100));
    map.add(new Road(13,4,3,100));
    map.add(new Road(14,3,5,200));
    map.add(new Road(15,5,3,200));
    map.add(new Road(16,4,5,60));
    map.add(new Road(17,5,4,60));
    map.construct();
    Router<Road,Point<Road>> router=new Dijkstra<>();
{
      Set<Point<Road>> sources=new HashSet<>();
      sources.add(new Point<>(map.get(0),0.3));
      sources.add(new Point<>(map.get(1),0.7));
      Set<Point<Road>> targets=new HashSet<>();
      targets.add(new Point<>(map.get(14),0.3));
      targets.add(new Point<>(map.get(15),0.7));
      Map<Point<Road>,Tuple<Point<Road>,List<Road>>> routes=router.route(sources,targets,new Weight(),null,null);
      Map<Long,List<Long>> paths=new HashMap<>();
      paths.put(14L,new LinkedList<>(Arrays.asList(0L,4L,8L,14L)));
      paths.put(15L,new LinkedList<>(Arrays.asList(0L,4L,10L,16L,15L)));
      assertEquals(paths.size(),routes.size());
      for (      Entry<Point<Road>,Tuple<Point<Road>,List<Road>>> pair : routes.entrySet()) {
        List<Road> route=pair.getValue().two();
        assertNotNull(paths.get(pair.getKey().edge().id()));
        List<Long> path=paths.get(pair.getKey().edge().id());
        assertNotNull(route);
        assertEquals(path.get(0).longValue(),pair.getValue().one().edge().id());
        assertEquals(path.size(),route.size());
        int i=0;
        for (        Road road : route) {
          assertEquals((long)path.get(i++),road.id());
        }
      }
    }
{
      Set<Point<Road>> sources=new HashSet<>();
      sources.add(new Point<>(map.get(0),0.3));
      sources.add(new Point<>(map.get(1),0.7));
      Set<Point<Road>> targets=new HashSet<>();
      targets.add(new Point<>(map.get(14),0.1));
      targets.add(new Point<>(map.get(15),0.9));
      Map<Point<Road>,Tuple<Point<Road>,List<Road>>> routes=router.route(sources,targets,new Weight(),null,null);
      Map<Long,List<Long>> paths=new HashMap<>();
      paths.put(14L,new LinkedList<>(Arrays.asList(0L,4L,8L,14L)));
      paths.put(15L,new LinkedList<>(Arrays.asList(0L,4L,10L,16L,15L)));
      assertEquals(paths.size(),routes.size());
      for (      Entry<Point<Road>,Tuple<Point<Road>,List<Road>>> pair : routes.entrySet()) {
        List<Road> route=pair.getValue().two();
        List<Long> path=paths.get(pair.getKey().edge().id());
        assertNotNull(route);
        assertEquals(path.get(0).longValue(),pair.getValue().one().edge().id());
        assertEquals(path.size(),route.size());
        int i=0;
        for (        Road road : route) {
          assertEquals((long)path.get(i++),road.id());
        }
      }
    }
{
      Point<Road> source=new Point<>(map.get(0),0.3);
      Point<Road> target=new Point<>(map.get(14),0.1);
      List<Road> route=router.route(source,target,new Weight(),new Weight(),200d);
      assertNull(route);
    }
  }
}

Fixed version (ground truth):
@Test public void testShortestPath(){
{
    Graph<Road> map=new Graph<>();
    map.add(new Road(0,0,1,100));
    map.add(new Road(1,1,0,100));
    map.add(new Road(2,0,2,160));
    map.add(new Road(3,2,0,160));
    map.add(new Road(4,1,2,50));
    map.add(new Road(5,2,1,50));
    map.add(new Road(6,1,3,200));
    map.add(new Road(7,3,1,200));
    map.add(new Road(8,2,3,100));
    map.add(new Road(9,3,2,100));
    map.add(new Road(10,2,4,40));
    map.add(new Road(11,4,2,40));
    map.add(new Road(12,3,4,100));
    map.add(new Road(13,4,3,100));
    map.add(new Road(14,3,5,200));
    map.add(new Road(15,5,3,200));
    map.add(new Road(16,4,5,60));
    map.add(new Road(17,5,4,60));
    map.construct();
    Router<Road,Point<Road>> router=new Dijkstra<>();
{
      Set<Point<Road>> sources=new HashSet<>();
      sources.add(new Point<>(map.get(0),0.3));
      sources.add(new Point<>(map.get(1),0.7));
      Set<Point<Road>> targets=new HashSet<>();
      targets.add(new Point<>(map.get(14),0.3));
      targets.add(new Point<>(map.get(15),0.7));
      Map<Point<Road>,Tuple<Point<Road>,List<Road>>> routes=router.route(sources,targets,new Weight(),null,null);
      Map<Long,List<Long>> paths=new HashMap<>();
      paths.put(14L,new LinkedList<>(Arrays.asList(0L,4L,8L,14L)));
      paths.put(15L,new LinkedList<>(Arrays.asList(0L,4L,10L,16L,15L)));
      assertEquals(paths.size(),routes.size());
      for (      Entry<Point<Road>,Tuple<Point<Road>,List<Road>>> pair : routes.entrySet()) {
        List<Road> route=pair.getValue().two();
        assertNotNull(paths.get(pair.getKey().edge().id()));
        List<Long> path=paths.get(pair.getKey().edge().id());
        assertNotNull(route);
        assertEquals(path.get(0).longValue(),pair.getValue().one().edge().id());
        assertEquals(path.size(),route.size());
        int i=0;
        for (        Road road : route) {
          assertEquals((long)path.get(i++),road.id());
        }
      }
    }
{
      Set<Point<Road>> sources=new HashSet<>();
      sources.add(new Point<>(map.get(0),0.3));
      sources.add(new Point<>(map.get(1),0.7));
      Set<Point<Road>> targets=new HashSet<>();
      targets.add(new Point<>(map.get(14),0.1));
      targets.add(new Point<>(map.get(15),0.9));
      Map<Point<Road>,Tuple<Point<Road>,List<Road>>> routes=router.route(sources,targets,new Weight(),null,null);
      Map<Long,List<Long>> paths=new HashMap<>();
      paths.put(14L,new LinkedList<>(Arrays.asList(0L,4L,8L,14L)));
      paths.put(15L,new LinkedList<>(Arrays.asList(0L,4L,10L,16L,15L)));
      assertEquals(paths.size(),routes.size());
      for (      Entry<Point<Road>,Tuple<Point<Road>,List<Road>>> pair : routes.entrySet()) {
        List<Road> route=pair.getValue().two();
        List<Long> path=paths.get(pair.getKey().edge().id());
        assertNotNull(route);
        assertEquals(path.get(0).longValue(),pair.getValue().one().edge().id());
        assertEquals(path.size(),route.size());
        int i=0;
        for (        Road road : route) {
          assertEquals((long)path.get(i++),road.id());
        }
      }
    }
{
      Point<Road> source=new Point<>(map.get(0),0.3);
      Point<Road> target=new Point<>(map.get(14),0.1);
      List<Road> route=router.route(source,target,new Weight(),new Weight(),200d);
      assertNull(route);
    }
{
      Set<Point<Road>> sources=new HashSet<>();
      sources.add(new Point<>(map.get(0),0.3));
      sources.add(new Point<>(map.get(1),0.7));
      Set<Point<Road>> targets=new HashSet<>();
      targets.add(new Point<>(map.get(14),0.1));
      targets.add(new Point<>(map.get(14),0.8));
      Map<Point<Road>,Tuple<Point<Road>,List<Road>>> routes=router.route(sources,targets,new Weight(),null,null);
      Map<Long,List<Long>> paths=new HashMap<>();
      paths.put(14L,new LinkedList<>(Arrays.asList(0L,4L,8L,14L)));
      assertEquals(2,routes.size());
      for (      Entry<Point<Road>,Tuple<Point<Road>,List<Road>>> pair : routes.entrySet()) {
        List<Road> route=pair.getValue().two();
        List<Long> path=paths.get(pair.getKey().edge().id());
        assertNotNull(route);
        assertEquals(path.get(0).longValue(),pair.getValue().one().edge().id());
        assertEquals(path.size(),route.size());
        int i=0;
        for (        Road road : route) {
          assertEquals((long)path.get(i++),road.id());
        }
      }
    }
  }
}