Program: 17198
Project: 17198
Buggy source:
@Test public void RomanianProblemAStarTest(){
  final HipsterGraph<City,Double> graph=RomanianProblem.graph();
  Hipster.SearchComponents<GraphEdge<City,Double>,City,WeightedNode<GraphEdge<City,Double>,City,Double>> p=ProblemBuilder.create().initialState(City.Arad).defineProblemWithExplicitActions().useTransitionFunction(new TransitionFunction<GraphEdge<City,Double>,City>(){
    @Override public Iterable<Transition<GraphEdge<City,Double>,City>> transitionsFrom(    City fromCity){
      Set<Transition<GraphEdge<City,Double>,City>> successors=new HashSet<Transition<GraphEdge<City,Double>,City>>();
      for (      GraphEdge<City,Double> edge : graph.edgesOf(fromCity)) {
        City toCity=edge.getVertex1().equals(fromCity) ? edge.getVertex2() : fromCity;
        successors.add(Transition.create(fromCity,edge,toCity));
      }
      return successors;
    }
  }
).useCostFunction(new CostFunction<GraphEdge<City,Double>,City,Double>(){
    @Override public Double evaluate(    Transition<GraphEdge<City,Double>,City> transition){
      return transition.getAction().getEdgeValue();
    }
  }
).useHeuristicFunction(new HeuristicFunction<City,Double>(){
    @Override public Double estimate(    City state){
      return RomanianProblem.heuristics().get(state);
    }
  }
).build();
  AStar<GraphEdge<City,Double>,City,Double,WeightedNode<GraphEdge<City,Double>,City,Double>>.AStarIter it=Hipster.createAStar(p).iterator();
  List<Double> expectedScore=Arrays.asList(366d,393d,413d,415d,417d,418d);
  int i=0;
  while (it.hasNext()) {
    WeightedNode<GraphEdge<City,Double>,City,Double> node=it.next();
    assertEquals(expectedScore.get(i),node.getScore());
    i++;
    if (node.state().equals(City.Bucharest)) {
      break;
    }
  }
}

Fixed version (ground truth):
@Test public void RomanianProblemAStarTest(){
  final HipsterGraph<City,Double> graph=RomanianProblem.graph();
  Hipster.SearchComponents<GraphEdge<City,Double>,City,WeightedNode<GraphEdge<City,Double>,City,Double>> p=ProblemBuilder.create().initialState(City.Arad).defineProblemWithExplicitActions().useTransitionFunction(new TransitionFunction<GraphEdge<City,Double>,City>(){
    @Override public Iterable<Transition<GraphEdge<City,Double>,City>> transitionsFrom(    City fromCity){
      Set<Transition<GraphEdge<City,Double>,City>> successors=new HashSet<Transition<GraphEdge<City,Double>,City>>();
      for (      GraphEdge<City,Double> edge : graph.edgesOf(fromCity)) {
        City toCity=edge.getVertexAdjacentTo(fromCity);
        successors.add(Transition.create(fromCity,edge,toCity));
      }
      return successors;
    }
  }
).useCostFunction(new CostFunction<GraphEdge<City,Double>,City,Double>(){
    @Override public Double evaluate(    Transition<GraphEdge<City,Double>,City> transition){
      return transition.getAction().getEdgeValue();
    }
  }
).useHeuristicFunction(new HeuristicFunction<City,Double>(){
    @Override public Double estimate(    City state){
      return RomanianProblem.heuristics().get(state);
    }
  }
).build();
  AStar<GraphEdge<City,Double>,City,Double,WeightedNode<GraphEdge<City,Double>,City,Double>>.AStarIter it=Hipster.createAStar(p).iterator();
  List<Double> expectedScore=Arrays.asList(366d,393d,413d,415d,417d,418d);
  int i=0;
  while (it.hasNext()) {
    WeightedNode<GraphEdge<City,Double>,City,Double> node=it.next();
    assertEquals(expectedScore.get(i),node.getScore());
    i++;
    if (node.state().equals(City.Bucharest)) {
      break;
    }
  }
}