question: public static double parseDoubleDefault ( String s , double def ) { if ( s == null ) { return def ; } try { return Double . parseDouble ( s ) ; } catch ( NumberFormatException e ) { return def ; } }
target:  Parses a double safely, returning a default if nothing can be sanely parsed from it.