Buggy code:
public final class Locator { public static final String URI_ENCODING = "UTF-8" ; private static boolean [ ] gNeedEscaping = new boolean [ 128 ] ; private static char [ ] gAfterEscaping1 = new char [ 128 ] ; private static char [ ] gAfterEscaping2 = new char [ 128 ] ; private static char [ ] gHexChs = new char [ ] { '0' , '1' , '2' , '3' , '4' , '5' , '6' , '7' , '8' , '9' , 'A' , 'B' , 'C' , 'D' , 'E' , 'F' } ; private Locator ( ) { } public static File getClassSource ( Class c ) { } public static File getResourceSource ( ClassLoader c , String resource ) { } public static String fromURI ( String uri ) { Class uriClazz = null ; try { uriClazz = Class . forName ( "java.net.URI" ) ; } catch ( ClassNotFoundException cnfe ) { } if ( ( uriClazz != null ) && ( uri . startsWith ( "file://" ) ) ) { try { Method createMethod = uriClazz . getMethod ( "create" , new Class [ ] { String . class } ) ; <START_BUG> Object uriObj = createMethod . invoke ( null , new Object [ ] { uri } ) ; <END_BUG> Constructor fileConst = File . class . getConstructor ( new Class [ ] { uriClazz } ) ; File f = ( ( File ) ( fileConst . newInstance ( new Object [ ] { uriObj } ) ) ) ; return f . getAbsolutePath ( ) ; } catch ( InvocationTargetException e ) { Throwable e2 = e . getTargetException ( ) ; if ( e2 instanceof IllegalArgumentException ) { throw ( ( IllegalArgumentException ) ( e2 ) ) ; } else { e2 . printStackTrace ( ) ; } } catch ( Exception e ) { e . printStackTrace ( ) ; } } URL url = null ; try { url = new URL ( uri ) ; } catch ( MalformedURLException emYouEarlEx ) { } if ( ( url == null ) || ( ! ( "file" . equals ( url . getProtocol ( ) ) ) ) ) { throw new IllegalArgumentException ( "Can<seq2seq4repair_space>only<seq2seq4repair_space>handle<seq2seq4repair_space>valid<seq2seq4repair_space>file:<seq2seq4repair_space>URIs" ) ; } StringBuffer buf = new StringBuffer ( url . getHost ( ) ) ; if ( ( buf . length ( ) ) > 0 ) { buf . insert ( 0 , File . separatorChar ) . insert ( 0 , File . separatorChar ) ; } String file = url . getFile ( ) ; int queryPos = file . indexOf ( '?' ) ; buf . append ( ( queryPos < 0 ? file : file . substring ( 0 , queryPos ) ) ) ; uri = buf . toString ( ) . replace ( '//' , File . separatorChar ) ; if ( ( ( ( ( ( File . pathSeparatorChar ) == ';' ) && ( uri . startsWith ( "\\" ) ) ) && ( ( uri . length ( ) ) > 2 ) ) && ( Character . isLetter ( uri . charAt ( 1 ) ) ) ) && ( ( uri . lastIndexOf ( ':' ) ) > ( - 1 ) ) ) { uri = uri . substring ( 1 ) ; } String path = null ; try { path = Locator . decodeUri ( uri ) ; String cwd = System . getProperty ( "user.dir" ) ; int posi = cwd . indexOf ( ":" ) ; if ( ( posi > 0 ) && ( path . startsWith ( File . separator ) ) ) { path = ( cwd . substring ( 0 , ( posi + 1 ) ) ) + path ; } } catch ( UnsupportedEncodingException exc ) { throw new IllegalStateException ( ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>convert<seq2seq4repair_space>URI<seq2seq4repair_space>to<seq2seq4repair_space>path:<seq2seq4repair_space>" + ( exc . getMessage ( ) ) ) ) ; } return path ; } public static String decodeUri ( String uri ) throws UnsupportedEncodingException { } public static String encodeURI ( String path ) throws UnsupportedEncodingException { } public static URL fileToURL ( File file ) throws MalformedURLException { } public static File getToolsJar ( ) { } public static URL [ ] getLocationURLs ( File location ) throws MalformedURLException { } public static URL [ ] getLocationURLs ( File location , final String [ ] extensions ) throws MalformedURLException { } }

Fix:
Object uriObj = createMethod . invoke ( null , new Object [ ] { Locator . encodeURI ( uri ) } ) ;