Buggy code:
public class DijkstraOneToMany extends AbstractRoutingAlgorithm { private static final int EMPTY_PARENT = - 1 ; private static final int NOT_FOUND = - 1 ; protected double [ ] weights ; private final DijkstraOneToMany . TIntArrayListWithCap changedNodes ; private int [ ] parents ; private int [ ] edgeIds ; private IntDoubleBinHeap heap ; private int visitedNodes ; private boolean doClear = true ; private int limitVisitedNodes = Integer . MAX_VALUE ; private int endNode ; private int currNode ; private int fromNode ; private int to ; public DijkstraOneToMany ( Graph graph , FlagEncoder encoder , Weighting weighting , TraversalMode tMode ) { } public DijkstraOneToMany setLimitVisitedNodes ( int nodes ) { } @ Override public Path calcPath ( int from , int to ) { } @ Override public Path extractPath ( ) { } public DijkstraOneToMany clear ( ) { } public double getWeight ( int endNode ) { } public int findEndNode ( int from , int to ) { if ( ( weights . length ) < 2 ) return DijkstraOneToMany . NOT_FOUND ; this . to = to ; if ( doClear ) { doClear = false ; int vn = changedNodes . size ( ) ; for ( int i = 0 ; i < vn ; i ++ ) { int n = changedNodes . get ( i ) ; weights [ n ] = Double . MAX_VALUE ; parents [ n ] = DijkstraOneToMany . EMPTY_PARENT ; edgeIds [ n ] = EdgeIterator . NO_EDGE ; } heap . clear ( ) ; changedNodes . reset ( ) ; currNode = from ; if ( ! ( traversalMode . isEdgeBased ( ) ) ) { weights [ currNode ] = 0 ; changedNodes . add ( currNode ) ; } } else { int parentNode = parents [ to ] ; <START_BUG> if ( ( parentNode != ( DijkstraOneToMany . EMPTY_PARENT ) ) && ( ( weights [ to ] ) < ( weights [ currNode ] ) ) ) <END_BUG> return to ; if ( ( heap . isEmpty ( ) ) || ( ( visitedNodes ) >= ( limitVisitedNodes ) ) ) return DijkstraOneToMany . NOT_FOUND ; currNode = heap . poll_element ( ) ; } visitedNodes = 0 ; if ( finished ( ) ) return currNode ; while ( true ) { ( visitedNodes ) ++ ; EdgeIterator iter = outEdgeExplorer . setBaseNode ( currNode ) ; while ( iter . next ( ) ) { int adjNode = iter . getAdjNode ( ) ; int prevEdgeId = edgeIds [ adjNode ] ; if ( ! ( accept ( iter , prevEdgeId ) ) ) continue ; double tmpWeight = ( weighting . calcWeight ( iter , false , prevEdgeId ) ) + ( weights [ currNode ] ) ; if ( Double . isInfinite ( tmpWeight ) ) continue ; double w = weights [ adjNode ] ; if ( w == ( Double . MAX_VALUE ) ) { parents [ adjNode ] = currNode ; weights [ adjNode ] = tmpWeight ; heap . insert_ ( tmpWeight , adjNode ) ; changedNodes . add ( adjNode ) ; edgeIds [ adjNode ] = iter . getEdge ( ) ; } else if ( w > tmpWeight ) { parents [ adjNode ] = currNode ; weights [ adjNode ] = tmpWeight ; heap . update_ ( tmpWeight , adjNode ) ; changedNodes . add ( adjNode ) ; edgeIds [ adjNode ] = iter . getEdge ( ) ; } } if ( ( ( heap . isEmpty ( ) ) || ( ( visitedNodes ) >= ( limitVisitedNodes ) ) ) || ( isWeightLimitReached ( ) ) ) return DijkstraOneToMany . NOT_FOUND ; currNode = heap . peek_element ( ) ; if ( finished ( ) ) return currNode ; heap . poll_element ( ) ; } } @ Override public boolean finished ( ) { } protected boolean isWeightLimitReached ( ) { } public void close ( ) { } @ Override public int getVisitedNodes ( ) { } @ Override public String getName ( ) { } public String getMemoryUsageAsString ( ) { } private static class TIntArrayListWithCap extends TIntArrayList { public int getCapacity ( ) { } } }

Fix:
if ( ( parentNode != ( DijkstraOneToMany . EMPTY_PARENT ) ) && ( ( weights [ to ] ) <= ( weights [ currNode ] ) ) )