Buggy code:
public class MapActivityActions implements DialogProvider { private static final String KEY_LONGITUDE = "longitude" ; private static final String KEY_LATITUDE = "latitude" ; private static final String KEY_NAME = "name" ; private static final String KEY_FAVORITE = "favorite" ; private static final String KEY_ZOOM = "zoom" ; private static final int DIALOG_ADD_FAVORITE = 100 ; private static final int DIALOG_REPLACE_FAVORITE = 101 ; private static final int DIALOG_ADD_WAYPOINT = 102 ; private static final int DIALOG_RELOAD_TITLE = 103 ; private static final int DIALOG_SHARE_LOCATION = 104 ; private static final int DIALOG_ABOUT_ROUTE = 105 ; private static final int DIALOG_SAVE_DIRECTIONS = 106 ; private Bundle dialogBundle = new Bundle ( ) ; private final MapActivity mapActivity ; public MapActivityActions ( MapActivity mapActivity ) { } protected void addFavouritePoint ( final double latitude , final double longitude ) { } private Bundle enhance ( Bundle aBundle , double latitude , double longitude , String name ) { } private Bundle enhance ( Bundle bundle , double latitude , double longitude , final int zoom ) { } protected void prepareAddFavouriteDialog ( Dialog dialog , Bundle args ) { } protected Dialog createAddFavouriteDialog ( final Bundle args ) { } protected Dialog createReplaceFavouriteDialog ( final Bundle args ) { } protected void addWaypoint ( final double latitude , final double longitude ) { } private Dialog createAddWaypointDialog ( final Bundle args ) { } protected void reloadTile ( final int zoom , final double latitude , final double longitude ) { } private Dialog createReloadTitleDialog ( final Bundle args ) { } protected String getString ( int res ) { } protected void updatePoiDb ( int zoom , double latitude , double longitude ) { } protected void showToast ( final String msg ) { } protected void shareLocation ( final double latitude , final double longitude , int zoom ) { } private Dialog createShareLocationDialog ( final Bundle args ) { } protected void aboutRoute ( ) { } private void prepareAboutRouteDialog ( Dialog dlg , Bundle args ) { } private Dialog createAboutRouteDialog ( Bundle args ) { } private boolean checkPointToNavigate ( ) { } protected void getDirections ( final double lat , final double lon , boolean followEnabled ) { } protected OsmandApplication getMyApplication ( ) { } private Location getLocationToStartFrom ( final double lat , final double lon ) { } public void navigateUsingGPX ( final ApplicationMode appMode ) { } private ApplicationMode getAppMode ( ToggleButton [ ] buttons , OsmandSettings settings ) { } public void saveDirections ( ) { } private Dialog createSaveDirections ( ) { OsmandSettings settings = getMyApplication ( ) . getSettings ( ) ; final File fileDir = settings . extendOsmandPath ( GPX_PATH ) ; final Dialog dlg = new Dialog ( mapActivity ) ; dlg . setTitle ( save_route_dialog_title ) ; dlg . setContentView ( save_directions_dialog ) ; final EditText edit = ( ( EditText ) ( dlg . findViewById ( FileNameEdit ) ) ) ; <START_BUG> edit . setText ( MessageFormat . format ( "{0,date,dd-MM-yyyy}" , new Date ( ) ) ) ; <END_BUG> ( ( android . widget . Button ) ( dlg . findViewById ( R . id . Save ) ) ) . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { String name = edit . getText ( ) . toString ( ) ; fileDir . mkdirs ( ) ; File toSave = fileDir ; if ( ( name . length ( ) ) > 0 ) { if ( ! ( name . endsWith ( ".gpx" ) ) ) { name += ".gpx" ; } toSave = new File ( fileDir , name ) ; } if ( toSave . exists ( ) ) { dlg . findViewById ( DuplicateFileName ) . setVisibility ( VISIBLE ) ; } else { dlg . dismiss ( ) ; new MapActivityActions . SaveDirectionsAsyncTask ( ) . execute ( toSave ) ; } } } ) ; ( ( android . widget . Button ) ( dlg . findViewById ( R . id . Cancel ) ) ) . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { dlg . dismiss ( ) ; } } ) ; return dlg ; } private class SaveDirectionsAsyncTask extends AsyncTask < File , Void , String > { @ Override protected String doInBackground ( File ... params ) { } @ Override protected void onPostExecute ( String result ) { } } @ Override public Dialog onCreateDialog ( int id ) { } @ Override public void onPrepareDialog ( int id , Dialog dialog ) { } }

Fix:
edit . setText ( MessageFormat . format ( "{0,date,yyyy-MM-dd}" , new Date ( ) ) ) ;