Buggy code:
public GraphPlotter ( GraphNode root , boolean debug ) { } public void init ( ) { } public void init ( ConfReader cnf ) { } public void update ( ) { if ( ( this . redrawInterval ) == 0 ) this . redrawInterval = this . maxIteration ; if ( this . waitingNodes . isEmpty ( ) ) return ; if ( ( this . iteration ) == 0 ) { this . plottedNodes . addAll ( movingNodes ) ; this . manager . update ( movingNodes ) ; this . movingNodes . clear ( ) ; GraphNode smallest = root ; for ( GraphNode x : this . waitingNodes ) { if ( ( smallest . getNumberOfAllLeafs ( ) ) > ( x . getParent ( ) . getNumberOfAllLeafs ( ) ) ) smallest = x . getParent ( ) ; } this . movingNodes . addAll ( smallest . getChildren ( ) ) ; this . waitingNodes . removeAll ( smallest . getChildren ( ) ) ; for ( GraphNode x : smallest . getChildren ( ) ) { this . waitingNodes . addAll ( x . getChildren ( ) ) ; } HashSet < GraphNode > tooSmall = new HashSet < GraphNode > ( ) ; for ( GraphNode x : this . waitingNodes ) { if ( ( minNodeLeafs ) > ( x . getNumberOfAllLeafs ( ) ) ) tooSmall . add ( x ) ; } this . waitingNodes . removeAll ( tooSmall ) ; double movingCircleMinRadius = ( Math . sqrt ( ( ( Math . pow ( smallest . getxPos ( ) , 2 ) ) + ( Math . pow ( smallest . getyPos ( ) , 2 ) ) ) ) ) + ( smallest . getRadius ( ) ) ; for ( GraphNode x : this . movingNodes ) { double rad = ( ( Math . atan2 ( x . getParent ( ) . getxPos ( ) , x . getParent ( ) . getyPos ( ) ) ) + ( ( Math . random ( ) ) * ( this . stepsize ) ) ) - ( ( this . stepsize ) * 0.5 ) ; if ( ( x . getParent ( ) ) == ( this . root ) ) rad = ( ( Math . random ( ) ) * ( Math . PI ) ) * 2.0 ; x . setxPos ( ( ( Math . sin ( rad ) ) * ( movingCircleMinRadius + ( this . movingCircleRadius ) ) ) ) ; x . setyPos ( ( ( Math . cos ( rad ) ) * ( movingCircleMinRadius + ( this . movingCircleRadius ) ) ) ) ; } for ( GraphNode x : this . movingNodes ) { x . setMemoryOfMovements ( new ArrayList < ArrayList < Double > > ( ) ) ; } } for ( int i = 0 ; i < ( this . redrawInterval ) ; i ++ ) { this . movingmanager = new NodeSetManager ( ) ; this . movingmanager . setGridsize ( this . manager . getGridsize ( ) ) ; this . movingmanager . update ( this . movingNodes ) ; for ( GraphNode movingNode : this . movingNodes ) { if ( ( ! ( movingNode . isPlotted ( ) ) ) && ( ( movingNode . getMemoryOfMovements ( ) . size ( ) ) >= ( ( this . persistenceBeforeAbort ) + 1 ) ) ) { <START_BUG> double traveledDist = Math . sqrt ( ( ( Math . pow ( movingNode . getMemoryOfMovements ( ) . get ( persistenceBeforeAbort ) . get ( 0 ) , 2.0 ) ) + ( Math . pow ( movingNode . getMemoryOfMovements ( ) . get ( persistenceBeforeAbort ) . get ( 0 ) , 2.0 ) ) ) ) ; <END_BUG> if ( traveledDist <= ( this . minStepSizeBeforeAbort ) ) { movingNode . setPlotted ( true ) ; } } if ( ! ( movingNode . isPlotted ( ) ) ) { double [ ] vIntersect = new double [ 2 ] ; HashSet < GraphNode > toCheck = this . manager . getNearbyNodes ( movingNode ) ; toCheck . addAll ( movingmanager . getNearbyNodes ( movingNode ) ) ; for ( GraphNode anyNode : toCheck ) { double [ ] v = movingNode . intersect ( anyNode ) ; vIntersect [ 0 ] += v [ 0 ] ; vIntersect [ 1 ] += v [ 1 ] ; } double radCenter = Math . atan2 ( movingNode . getxPos ( ) , movingNode . getyPos ( ) ) ; radCenter += ( ( ( Math . random ( ) ) - 0.5 ) * 0.05 ) * ( Math . PI ) ; if ( ( ( vIntersect [ 0 ] ) != 0 ) || ( ( vIntersect [ 1 ] ) != 0 ) ) { double radIntersect = Math . atan2 ( vIntersect [ 0 ] , vIntersect [ 1 ] ) ; movingNode . setxPos ( ( ( ( movingNode . getxPos ( ) ) - ( ( Math . sin ( radIntersect ) ) * ( this . stepsize ) ) ) + ( ( Math . sin ( radCenter ) ) * ( this . stepsize ) ) ) ) ; movingNode . setyPos ( ( ( ( movingNode . getyPos ( ) ) - ( ( Math . cos ( radIntersect ) ) * ( this . stepsize ) ) ) + ( ( Math . cos ( radCenter ) ) * ( this . stepsize ) ) ) ) ; }

Fix:
double traveledDist = Math . sqrt ( ( ( Math . pow ( movingNode . getMemoryOfMovements ( ) . get ( persistenceBeforeAbort ) . get ( 0 ) , 2.0 ) ) + ( Math . pow ( movingNode . getMemoryOfMovements ( ) . get ( persistenceBeforeAbort ) . get ( 1 ) , 2.0 ) ) ) ) ;