Source:
public void load ( com.android.sdklib.internal.repository.DownloadCache cache , boolean forceHttp , com.android.sdklib.internal.repository.ITaskMonitor monitor ) { java.lang.String url = com.android.sdklib.repository.SdkStatsConstants.URL_STATS ; if ( forceHttp ) { url = url.replaceAll ( "https://" , "http://" ) ; } monitor.setProgressMax ( 5 ) ; monitor.setDescription ( "Fetching %1$s" , url ) ; monitor.incProgress ( 1 ) ; java.lang.Exception [ ] exception = new java.lang.Exception [ ] { null } ; java.lang.Boolean [ ] validatorFound = new java.lang.Boolean [ ] { java.lang.Boolean.FALSE } ; java.lang.String [ ] validationError = new java.lang.String [ ] { null } ; org.w3c.dom.Document validatedDoc = null ; java.lang.String validatedUri = null ; java.io.InputStream xml = fetchUrl ( url , cache , monitor.createSubMonitor ( 1 ) , exception ) ; if ( xml != null ) { monitor.setDescription ( "Validate XML" ) ; int version = getXmlSchemaVersion ( xml ) ; if ( ( version >= 1 ) && ( version <= ( com.android.sdklib.repository.SdkStatsConstants.NS_LATEST_VERSION ) ) ) { java.lang.String uri = validateXml ( xml , url , version , validationError , validatorFound ) ; if ( uri != null ) { validatedDoc = getDocument ( xml , monitor ) ; validatedUri = uri ; } } else if ( version > ( com.android.sdklib.repository.SdkStatsConstants.NS_LATEST_VERSION ) ) { return ; } } if ( ( exception [ 0 ] ) != null ) { java.lang.String reason = null ; if ( ( exception [ 0 ] ) instanceof java.io.FileNotFoundException ) { reason = "File not found" ; } else if ( ( ( exception [ 0 ] ) instanceof java.net.UnknownHostException ) && ( ( exception [ 0 ] . getMessage ( ) ) != null ) ) { reason = java.lang.String.format ( "Unknown Host %1$s" , exception [ 0 ] . getMessage ( ) ) ; } else if ( ( exception [ 0 ] ) instanceof javax.net.ssl.SSLKeyException ) { reason = "HTTPS SSL error. You might want to force download through HTTP in the settings." ; } else if ( ( exception [ 0 ] . getMessage ( ) ) != null ) { reason = exception [ 0 ] . getMessage ( ) ; } else { reason = java.lang.String.format ( "Unknown (%1$s)" , exception [ 0 ] . getClass ( ) . getName ( ) ) ; } monitor.logError ( "Failed to fetch URL %1$s, reason: %2$s" , url , reason ) ; } if ( ( validationError [ 0 ] ) != null ) { monitor.logError ( "%s" , validationError [ 0 ] ) ; } if ( validatedDoc == null ) { return ; } monitor.incProgress ( 1 ) ; if ( xml != null ) { monitor.setDescription ( "Parse XML" ) ; monitor.incProgress ( 1 ) ; parseStatsDocument ( validatedDoc , validatedUri , monitor ) ; } monitor.incProgress ( 1 ) ; }

Target:
public void load ( com.android.sdklib.internal.repository.DownloadCache cache , boolean forceHttp , com.android.sdklib.internal.repository.ITaskMonitor monitor ) { java.lang.String url = com.android.sdklib.repository.SdkStatsConstants.URL_STATS ; if ( forceHttp ) { url = url.replaceAll ( "https://" , "http://" ) ; } monitor.setProgressMax ( 5 ) ; monitor.setDescription ( "Fetching %1$s" , url ) ; monitor.incProgress ( 1 ) ; java.lang.Exception [ ] exception = new java.lang.Exception [ ] { null } ; java.lang.Boolean [ ] validatorFound = new java.lang.Boolean [ ] { java.lang.Boolean.FALSE } ; java.lang.String [ ] validationError = new java.lang.String [ ] { null } ; org.w3c.dom.Document validatedDoc = null ; java.lang.String validatedUri = null ; java.io.InputStream xml = fetchXmlUrl ( url , cache , monitor.createSubMonitor ( 1 ) , exception ) ; if ( xml != null ) { monitor.setDescription ( "Validate XML" ) ; int version = getXmlSchemaVersion ( xml ) ; if ( ( version >= 1 ) && ( version <= ( com.android.sdklib.repository.SdkStatsConstants.NS_LATEST_VERSION ) ) ) { java.lang.String uri = validateXml ( xml , url , version , validationError , validatorFound ) ; if ( uri != null ) { validatedDoc = getDocument ( xml , monitor ) ; validatedUri = uri ; } } else if ( version > ( com.android.sdklib.repository.SdkStatsConstants.NS_LATEST_VERSION ) ) { closeStream ( xml ) ; return ; } } if ( ( exception [ 0 ] ) != null ) { java.lang.String reason = null ; if ( ( exception [ 0 ] ) instanceof java.io.FileNotFoundException ) { reason = "File not found" ; } else if ( ( ( exception [ 0 ] ) instanceof java.net.UnknownHostException ) && ( ( exception [ 0 ] . getMessage ( ) ) != null ) ) { reason = java.lang.String.format ( "Unknown Host %1$s" , exception [ 0 ] . getMessage ( ) ) ; } else if ( ( exception [ 0 ] ) instanceof javax.net.ssl.SSLKeyException ) { reason = "HTTPS SSL error. You might want to force download through HTTP in the settings." ; } else if ( ( exception [ 0 ] . getMessage ( ) ) != null ) { reason = exception [ 0 ] . getMessage ( ) ; } else { reason = java.lang.String.format ( "Unknown (%1$s)" , exception [ 0 ] . getClass ( ) . getName ( ) ) ; } monitor.logError ( "Failed to fetch URL %1$s, reason: %2$s" , url , reason ) ; } if ( ( validationError [ 0 ] ) != null ) { monitor.logError ( "%s" , validationError [ 0 ] ) ; } if ( validatedDoc == null ) { closeStream ( xml ) ; return ; } monitor.incProgress ( 1 ) ; if ( xml != null ) { monitor.setDescription ( "Parse XML" ) ; monitor.incProgress ( 1 ) ; parseStatsDocument ( validatedDoc , validatedUri , monitor ) ; } monitor.incProgress ( 1 ) ; closeStream ( xml ) ; }