Buggy code:
public class Utils { public static final String [ ] ogrPaths = new String [ ] { "C://Program<seq2seq4repair_space>Files//QGIS<seq2seq4repair_space>Wien//bin" , "C://Programmi//QGIS<seq2seq4repair_space>Wien//bin" , "C://QGIS<seq2seq4repair_space>Dufour//bin//" , "C://QGIS//bin//" , "C://Programmi//QGIS<seq2seq4repair_space>Dufour//bin//" , "C://Program<seq2seq4repair_space>Files//QGIS<seq2seq4repair_space>Dufour//bin//" , "C://OSGeo4W//bin//" , "C://Programmi//OSGeo4W//bin//" , "C://Programmi//qGis//bin//" } ; public static final String [ ] sqlPaths = new String [ ] { "C://Programmi//Microsoft<seq2seq4repair_space>SQL<seq2seq4repair_space>Server//90//Tools//Binn//bcp.exe" , "C://Program<seq2seq4repair_space>Files//Microsoft<seq2seq4repair_space>SQL<seq2seq4repair_space>Server//90//Tools//Binn//bcp.exe" } ; public static String getOgr2Ogr ( ) { } public static String getSQLPath ( ) { } private static String getFirstExistent ( String [ ] paths ) { } public static void saveText ( String filename , String content ) throws IOException { } public static boolean deleteQueryCoordsResults ( String path , String coord_type ) { } public static boolean deleteQueryCatastoResults ( String path ) { } public static String ReadWholeFile ( String filename ) throws IOException { } public static String ReadWholeFileNetwork ( String filename ) throws IOException { } public static boolean WriteToBeginningOfFile ( String filename , String text ) { } public static boolean WriteToBeginningOfFileAndClean ( String filename , String text , char [ ] invalid_chars ) { } public static boolean FileClean ( String filename , char [ ] invalid_chars ) { } public static void MessageBox ( String text , String title ) { } public static boolean MessageBoxShowAgain ( String message , String title ) { } public static void MessageBox ( String text , String title , int type ) { } public static boolean MessageBoxYesNo ( Component window , String text , String title ) { } public static int MessageBoxYesNoCancel ( Component window , String text , String title ) { } public static int USER_YES = 0 ; public static int USER_NO = 1 ; public static int USER_CANCEL = 2 ; public static String MessageBoxString ( String title ) { } public static String [ ] MessageBoxStrings ( String title ) { } public static String [ ] MessageBoxStrings ( String title , String separator ) { } public static void centerWindow ( JFrame form ) { } public static String peekFile ( String filename , int nlines ) { } public static void jtable_adjustRowSizes ( JTable jTable ) { } public static void jtable_adjustColumnSizes ( JTable table , int column , int margin ) { } public static JPanel createOpenFileTextField ( final Component window , final JTextField textedit , final String desc , final String extension ) { } public static JPanel createOpenDirectoryTextField ( final Component window , final JTextField textedit , final String dialog_title ) { } public static String getFolderOfFile ( String filename ) { } public static String formatDouble ( double value , int numdec ) { } public static String formatDouble ( double value , int intcip , int numdec ) { } public static String formatCoord ( double value ) { } public static String formatHeight ( double value ) { } public static String formatDoubleAsNeeded ( double value ) { } public static String formatDoubleAsNeeded ( double value , int maxdec ) { } public static String stringFromRepChar ( char c , int times ) { } public static int roundAngle ( double a ) { } public static double normalizeAngle ( double a ) { } public static String ConnectionString ( String host , String dbname , String username , String password ) { } public static String formatTwoDigitInt ( int x ) { } public static int numberOfDecimals ( double d ) { } public static void clipboardCopy ( String data ) { } public static String clipboardPaste ( ) { } public static int [ ] getAllIntsInString ( String s ) { } public static String saveFileDialog ( String dialog_title , Component component , String description , String ... extensions ) { } public static String openFileDialog ( String dialog_title , Component component , String description , String ... extensions ) { } public static String openFileDialog ( String lastUsedFolder , String dialog_title , Component component , String description , String ... extensions ) { } public static String openDirectoryDialog ( String dialog_title , Component component ) { } public static String openDirectoryDialog ( String lastUsedFolder , String dialog_title , Component component ) { } public static String saveFileDialog ( String lastUsedFolder , String dialog_title , Component component , String description , String ... extensions ) { } public static String saveDirectoryDialog ( String dialog_title , Component component ) { } public static String saveDirectoryDialog ( String lastUsedFolder , String dialog_title , Component component ) { } public static boolean hasText ( JTextField component ) { } public static < E > int [ ] ArrayGetSortPermutation ( final Collection < E > input , final Comparator < Integer > comparator ) { } public static int [ ] ArrayIntegerToInt ( List < Integer > array ) { } public static void touch ( String filename ) { } public static boolean abortOnExistingAndDontOverwrite ( String filename ) { } public static < T > int [ ] permutationSort ( final List < T > list , final Comparator < T > comparator ) { } public static < T > int [ ] permutationSort ( final T [ ] array , final Comparator < T > comparator ) { } public static < T > void applyPermutation ( final T [ ] input , final T [ ] output , int [ ] permutation ) { } public static < T > void applyPermutation ( final List < T > input , final List < T > output , int [ ] permutation ) { } public static String captureOutputOfProcess ( Process p ) { } public static final String PathSeparator = File . separator ; public static boolean mkdirs ( String filename ) { try { <START_BUG> new File ( filename ) . mkdirs ( ) ; <END_BUG> return true ; } catch ( Exception e ) { return false ; } } }

Fix:
new File ( new File ( filename ) . getParent ( ) ) . mkdirs ( ) ;