Buggy code:
startPositionLatLng = MapsActivity . getCustomStartPos ( ) ; } } if ( ( ( ( MapsActivity . getCustomEndPos ( ) ) == null ) && ( ! ( MapsActivity . getEditEnd ( ) . getText ( ) . toString ( ) . contains ( "Custom" ) ) ) ) && ( ! ( endPosition . contains ( "Custom" ) ) ) ) { String re1 = "([a-z])" ; String re2 = "(\\d+)" ; String re3 = "(.)" ; String re4 = "(\\d)" ; String re5 = "(\\d)" ; Pattern p = Pattern . compile ( ( ( ( ( re1 + re2 ) + re3 ) + re4 ) + re5 ) , ( ( Pattern . CASE_INSENSITIVE ) | ( Pattern . DOTALL ) ) ) ; Matcher m = p . matcher ( endPosition ) ; if ( m . matches ( ) ) { endRoom = Algorithm . graphHandler . getRooms ( ) . getRoom ( endPosition ) ; if ( endRoom == null ) endRoom = Algorithm . graphHandler . getRooms ( ) . getRoom ( endPosition . toUpperCase ( ) ) ; } else { List < Room > roomsWithName = Algorithm . graphHandler . getRooms ( ) . getAllRoomsWithName ( endPosition ) ; if ( ( roomsWithName . size ( ) ) != 1 ) { double tempCost = 0.0 ; Room tempRoom = null ; for ( Room room : roomsWithName ) { Node node = Algorithm . graphHandler . getNodes ( ) . FindClosestNodeInsideRoom ( room ) ; if ( node != null ) { double cost = Algorithm . graphHandler . getGraph ( ) . drawPath ( startNode . getNodeId ( ) , node . getNodeId ( ) ) ; if ( ( tempCost == 0.0 ) && ( tempRoom == null ) ) { tempCost = cost ; tempRoom = room ; } if ( cost <= tempCost ) { tempCost = cost ; tempRoom = room ; } } } MapDrawer . removePolylines ( ) ; endRoom = tempRoom ; } else { endRoom = Algorithm . graphHandler . getRooms ( ) . getRoom ( endPosition ) ; } } if ( endRoom == null ) { Toast . makeText ( MapsActivity . getContext ( ) . getApplicationContext ( ) , ( ( "To<seq2seq4repair_space>" + endPosition ) + "<seq2seq4repair_space>not<seq2seq4repair_space>found" ) , LENGTH_SHORT ) . show ( ) ; return false ; } String s = endRoom . getLocation ( ) ; String [ ] l = s . split ( "\\." ) ; int floor = Integer . valueOf ( l [ 0 ] . substring ( 1 ) ) ; endNode = Algorithm . graphHandler . getNodes ( ) . FindClosestNodeInsideRoom ( endRoom ) ; if ( endNode == null ) { endNode = Algorithm . graphHandler . getNodes ( ) . findNearestNode ( endRoom . getLatLngBoundsCenter ( ) , floor ) ; if ( startNode != null ) extraCost = CalcMath . measureMeters ( endRoom . getLatLngBoundsCenter ( ) . latitude , endRoom . getLatLngBoundsCenter ( ) . longitude , endNode . getLatLng ( ) . latitude , endNode . getLatLng ( ) . longitude ) ; else return false ; } endPositionLatLng = new LatLng ( endNode . getLatLng ( ) . latitude , endNode . getLatLng ( ) . longitude ) ; } else { <START_BUG> if ( ! ( startPosition . contains ( "Custom<seq2seq4repair_space>End" ) ) ) { <END_BUG> endRoom = Algorithm . graphHandler . getRooms ( ) . getRoom ( endPosition ) ; endNode = Algorithm . graphHandler . getNodes ( ) . findNearestNode ( endRoom . getLatLngBoundsCenter ( ) , endRoom . getFloor ( ) ) ; extraCost = CalcMath . measureMeters ( endRoom . getLatLngBoundsCenter ( ) . latitude , endRoom . getLatLngBoundsCenter ( ) . longitude , endNode . getLatLng ( ) . latitude , endNode . getLatLng ( ) . longitude ) ; endPositionLatLng = endRoom . getLatLngBoundsCenter ( ) ; } else { endNode = Algorithm . graphHandler . getNodes ( ) . findNearestNode ( MapsActivity . getCustomEndPos ( ) , MapsActivity . getCustomEndFloor ( ) ) ; extraCost = CalcMath . measureMeters ( MapsActivity . getCustomEndPos ( ) . latitude , MapsActivity . getCustomEndPos ( ) . longitude , endNode . getLatLng ( ) . latitude , endNode . getLatLng ( ) . longitude ) ; endPositionLatLng = MapsActivity . getCustomEndPos ( ) ; } } if ( ( startNode == null ) || ( endNode == null ) ) { Toast . makeText ( MapsActivity . getContext ( ) . getApplicationContext ( ) , "Navigation<seq2seq4repair_space>not<seq2seq4repair_space>found" , LENGTH_SHORT ) . show ( ) ; return false ; } double cost = 0.0 ; if ( startNode . getNodeId ( ) . equals ( endNode . getNodeId ( ) ) ) Toast . makeText ( MapsActivity . getContext ( ) . getApplicationContext ( ) , "Start<seq2seq4repair_space>and<seq2seq4repair_space>end<seq2seq4repair_space>is<seq2seq4repair_space>same<seq2seq4repair_space>location" , LENGTH_SHORT ) . show ( ) ; else cost = Algorithm . graphHandler . getGraph ( ) . drawPath ( startNode . getNodeId ( ) , endNode . getNodeId ( ) ) ; if ( cost != 0.0 ) { cost += extraCost ; String walkingSpeed = Algorithm . graphHandler . getGraph ( ) . getMovement ( ) . calculateMovingSpeed ( cost ) ; MapsActivity . getTextSpeed ( ) . setText ( ( "ETA:<seq2seq4repair_space>" + walkingSpeed ) ) ; MapsActivity . getTextSpeedCost ( ) . setText ( ( ( "(" + ( String . valueOf ( Math . round ( cost ) ) ) ) + "m)" ) ) ; MapsActivity . getTextFrom ( ) . setText ( startPosition ) ; MapsActivity . getTextTo ( ) . setText ( endPosition ) ; MapDrawer . setFloor ( startNode . getFloor ( ) ) ;

Fix:
if ( ! ( endPosition . contains ( "Custom<seq2seq4repair_space>End" ) ) ) {