private String tweakNativeLaunchUri(String uri,boolean forDebugging,LaunchInfo launchInfo) throws IOException, FileNotFoundException {
  if (launchInfo.isHttpOrAbout()) {
    boolean modify=(getPreference(PREF_URI_MODIFICATION) != 0);
    if (modify && forDebugging && !launchInfo.isAbout()) {
      uri=URLHelper.escapeSpace(uri);
      URLHelper urlHelper=new URLHelper(uri);
      Map<String,String> params=urlHelper.getParameterMap();
      params.put("debug","true");
      urlHelper.setParameterMap(params);
      uri=urlHelper.getURL();
    }
  }
 else {
    File f=null;
    if (uri.startsWith("file:")) {
      try {
        f=new File(new URI(uri));
      }
 catch (      URISyntaxException e) {
        IOException ioe=new IOException(e.getMessage());
        ioe.initCause(e);
        throw ioe;
      }
    }
 else {
      f=new File(uri);
    }
    if (f != null && f.exists()) {
      uri=f.getAbsolutePath();
    }
 else {
      throw new FileNotFoundException(uri);
    }
  }
  return uri;
}

private String tweakNativeLaunchUri ( String uri , boolean forDebugging , LaunchInfo launchInfo ) throws IOException , FileNotFoundException { if ( launchInfo . isHttpOrAbout ( ) ) { boolean modify = ( getPreference ( PREF_URI_MODIFICATION ) != 0 ) ; if ( modify && forDebugging && ! launchInfo . isAbout ( ) ) { uri = URLHelper . escapeSpace ( uri ) ; URLHelper urlHelper = new URLHelper ( uri ) ; Map < String , String > params = urlHelper . getParameterMap ( ) ; params . put ( "debug" , "true" ) ; urlHelper . setParameterMap ( params ) ; uri = urlHelper . getURL ( ) ; } } else { File f = null ; if ( uri . startsWith ( "file:" ) ) { try { f = new File ( new URI ( uri ) ) ; } catch ( URISyntaxException e ) { IOException ioe = new IOException ( e . getMessage ( ) ) ; ioe . initCause ( e ) ; throw ioe ; } } else { f = new File ( uri ) ; } if ( f != null && f . exists ( ) ) { uri = f . getAbsolutePath ( ) ; } else { throw new FileNotFoundException ( uri ) ; } } return uri ; }
tweaks the launch uri if necessary , e . g . may append " ? debug = true "
