auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public java.lang.String getRUIMOperatorNumeric ( ) { if ( ( mImsi ) == null ) { return null ; } if ( ( ( mncLength ) != ( UNINITIALIZED ) ) && ( ( mncLength ) != ( UNKNOWN ) ) ) { return mImsi.substring ( 0 , ( 3 + ( mncLength ) ) ) ; } int mcc = java.lang.Integer.parseInt ( mImsi.substring ( 0 , 3 ) ) ; return mImsi.substring ( 0 , ( 3 + ( com.android.internal.telephony.MccTable.smallestDigitsMccForMnc ( mcc ) ) ) ) ; }

Target:
public java.lang.String getRUIMOperatorNumeric ( ) { if ( ( mImsi ) == null ) { return null ; } if ( ( ( mMncLength ) != ( UNINITIALIZED ) ) && ( ( mMncLength ) != ( UNKNOWN ) ) ) { return mImsi.substring ( 0 , ( 3 + ( mMncLength ) ) ) ; } int mcc = java.lang.Integer.parseInt ( mImsi.substring ( 0 , 3 ) ) ; return mImsi.substring ( 0 , ( 3 + ( com.android.internal.telephony.MccTable.smallestDigitsMccForMnc ( mcc ) ) ) ) ; }
Source:
public int subtreeDepth ( ) throws java.lang.UnsupportedOperationException { java.lang.String subtree = name ; int i = 1 ; for ( ; ( subtree.lastIndexOf ( '.' ) ) >= 0 ; i ++ ) { subtree = subtree.substring ( 0 , subtree.lastIndexOf ( '.' ) ) ; } return i ; }

Target:
public int subtreeDepth ( ) throws java.lang.UnsupportedOperationException { int sum = 1 ; for ( int i = name.indexOf ( '.' ) ; i >= 0 ; i = name.indexOf ( '.' , ( i + 1 ) ) ) { ++ sum ; } return sum ; }
Source:
boolean stopGattProfileService ( ) { setProfileServiceState ( com.android.bluetooth.gatt.GattService.class , BluetoothAdapter.STATE_OFF ) ; return true ; }

Target:
boolean stopProfileServices ( ) { java.lang.Class [ ] supportedProfileServices = com.android.bluetooth.btservice.Config.getSupportedProfiles ( ) ; if ( ( mProfilesStarted ) && ( ( supportedProfileServices.length ) > 0 ) ) { setProfileServiceState ( supportedProfileServices , BluetoothAdapter.STATE_OFF ) ; return true ; } debugLog ( "stopProfileServices() - No profiles services to stop or already stopped." ) ; return false ; }
Source:
public void put ( com.ibm.icu.impl.UResource.Key key , com.ibm.icu.impl.UResource.Value value ) { if ( key.contentEquals ( "dnam" ) ) { } else if ( key.contentEquals ( "per" ) ) { setFormatterIfAbsent ( com.ibm.icu.text.MeasureFormat.MeasureFormatData.PER_UNIT_INDEX , value , 0 ) ; } else { setFormatterIfAbsent ( com.ibm.icu.text.PluralRules.StandardPluralCategories.getIndex ( key ) , value , 0 ) ; } }

Target:
public void put ( com.ibm.icu.impl.UResource.Key key , com.ibm.icu.impl.UResource.Value value ) { if ( key.contentEquals ( "dnam" ) ) { } else if ( key.contentEquals ( "per" ) ) { setFormatterIfAbsent ( com.ibm.icu.text.MeasureFormat.MeasureFormatData.PER_UNIT_INDEX , value , 0 ) ; } else { setFormatterIfAbsent ( com.ibm.icu.impl.StandardPlural.indexFromString ( key ) , value , 0 ) ; } }
Source:
public void test_getDisplayName ( ) throws java.lang.Exception { assertEquals ( "Swiss Franc" , java.util.Currency.getInstance ( "CHF" ) . getDisplayName ( java.util.Locale.US ) ) ; assertEquals ( "Schweizer Franken" , java.util.Currency.getInstance ( "CHF" ) . getDisplayName ( new java.util.Locale ( "de" , "CH" ) ) ) ; assertEquals ( "franc suisse" , java.util.Currency.getInstance ( "CHF" ) . getDisplayName ( new java.util.Locale ( "fr" , "CH" ) ) ) ; assertEquals ( "franco svizzero" , java.util.Currency.getInstance ( "CHF" ) . getDisplayName ( new java.util.Locale ( "it" , "CH" ) ) ) ; }

Target:
public void test_getDisplayName_locale_chf ( ) throws java.lang.Exception { java.util.Currency currency = java.util.Currency.getInstance ( "CHF" ) ; assertEquals ( "Swiss Franc" , currency.getDisplayName ( java.util.Locale.US ) ) ; assertEquals ( "Schweizer Franken" , currency.getDisplayName ( new java.util.Locale ( "de" , "CH" ) ) ) ; assertEquals ( "franc suisse" , currency.getDisplayName ( new java.util.Locale ( "fr" , "CH" ) ) ) ; assertEquals ( "franco svizzero" , currency.getDisplayName ( new java.util.Locale ( "it" , "CH" ) ) ) ; }
Source:
public void test_getInstanceLjava_lang_StringLjava_security_Provider03 ( ) throws java.lang.IllegalArgumentException , java.security.NoSuchAlgorithmException { if ( ! ( tests.api.javax.net.ssl.KeyManagerFactory1Test.DEFSupported ) ) { fail ( tests.api.javax.net.ssl.KeyManagerFactory1Test.NotSupportedMsg ) ; return ; } javax.net.ssl.KeyManagerFactory kMF ; for ( int i = 0 ; i < ( tests.api.javax.net.ssl.KeyManagerFactory1Test.validValues.length ) ; i ++ ) { kMF = javax.net.ssl.KeyManagerFactory.getInstance ( tests.api.javax.net.ssl.KeyManagerFactory1Test.validValues [ i ] , tests.api.javax.net.ssl.KeyManagerFactory1Test.defaultProvider ) ; assertNotNull ( "No KeyManagerFactory created" , kMF ) ; assertEquals ( kMF.getAlgorithm ( ) , tests.api.javax.net.ssl.KeyManagerFactory1Test.validValues [ i ] ) ; assertEquals ( kMF.getProvider ( ) , tests.api.javax.net.ssl.KeyManagerFactory1Test.defaultProvider ) ; } }

Target:
public void test_getInstanceLjava_lang_StringLjava_security_Provider03 ( ) throws java.lang.IllegalArgumentException , java.security.NoSuchAlgorithmException { if ( ! ( org.apache.harmony.tests.javax.net.ssl.KeyManagerFactory1Test.DEFSupported ) ) { fail ( org.apache.harmony.tests.javax.net.ssl.KeyManagerFactory1Test.NotSupportedMsg ) ; return ; } javax.net.ssl.KeyManagerFactory kMF ; for ( int i = 0 ; i < ( org.apache.harmony.tests.javax.net.ssl.KeyManagerFactory1Test.validValues.length ) ; i ++ ) { kMF = javax.net.ssl.KeyManagerFactory.getInstance ( org.apache.harmony.tests.javax.net.ssl.KeyManagerFactory1Test.validValues [ i ] , org.apache.harmony.tests.javax.net.ssl.KeyManagerFactory1Test.defaultProvider ) ; assertNotNull ( "No KeyManagerFactory created" , kMF ) ; assertEquals ( kMF.getAlgorithm ( ) , org.apache.harmony.tests.javax.net.ssl.KeyManagerFactory1Test.validValues [ i ] ) ; assertEquals ( kMF.getProvider ( ) , org.apache.harmony.tests.javax.net.ssl.KeyManagerFactory1Test.defaultProvider ) ; } }
Source:
public boolean isDrawnLw ( ) { final com.android.server.WindowManagerService.AppWindowToken atoken = mAppToken ; return ( ( ( ( mSurface ) != null ) && ( ! ( mDestroying ) ) ) && ( ! ( mDrawPending ) ) ) && ( ! ( mCommitDrawPending ) ) ; }

Target:
public boolean isDrawnLw ( ) { final com.android.server.WindowManagerService.AppWindowToken atoken = mAppToken ; return ( ( ( mSurface ) != null ) && ( ! ( mDestroying ) ) ) && ( ( mOrientationChanging ) || ( ( ! ( mDrawPending ) ) && ( ! ( mCommitDrawPending ) ) ) ) ; }
Source:
public void setDnsConfigurationForNetwork ( int netId , java.lang.String [ ] servers , java.lang.String [ ] domains , int [ ] params , boolean useTls , java.lang.String tlsHostname ) { mContext.enforceCallingOrSelfPermission ( android.Manifest.permission.CONNECTIVITY_INTERNAL , com.android.server.NetworkManagementService.TAG ) ; final java.lang.String [ ] tlsFingerprints = new java.lang.String [ 0 ] ; try { mNetdService.setResolverConfiguration ( netId , servers , domains , params , useTls , tlsHostname , tlsFingerprints ) ; } catch ( android.os.RemoteException e ) { throw new java.lang.RuntimeException ( e ) ; } }

Target:
public void setDnsConfigurationForNetwork ( int netId , java.lang.String [ ] servers , java.lang.String [ ] domains , int [ ] params , java.lang.String tlsHostname , java.lang.String [ ] tlsServers ) { mContext.enforceCallingOrSelfPermission ( android.Manifest.permission.CONNECTIVITY_INTERNAL , com.android.server.NetworkManagementService.TAG ) ; final java.lang.String [ ] tlsFingerprints = new java.lang.String [ 0 ] ; try { mNetdService.setResolverConfiguration ( netId , servers , domains , params , tlsHostname , tlsServers , tlsFingerprints ) ; } catch ( android.os.RemoteException e ) { throw new java.lang.RuntimeException ( e ) ; } }
Source:
private void sendTrackChangedRsp ( ) { if ( ! ( isBrowseSupported ( getCurrentAddrPlayer ( ) ) ) ) { trackChangeRspForBrowseUnsupported ( ) ; } else { mAddressedMediaPlayer.sendTrackChangeWithId ( mTrackChangedNT , mMediaController ) ; } }

Target:
private void sendTrackChangedRsp ( ) { com.android.bluetooth.avrcp.MediaPlayerInfo info = getAddressedPlayerInfo ( ) ; if ( ( info != null ) && ( ! ( info.isBrowseSupported ( ) ) ) ) { trackChangeRspForBrowseUnsupported ( ) ; } else { mAddressedMediaPlayer.sendTrackChangeWithId ( mTrackChangedNT , mMediaController ) ; } }
Source:
public void init ( org.bouncycastle.crypto.CipherParameters params ) { if ( params instanceof org.bouncycastle.crypto.params.KeyParameter ) { cipher.init ( true , params ) ; L = new byte [ ZEROES.length ] ; cipher.processBlock ( ZEROES , 0 , L , 0 ) ; Lu = org.bouncycastle.crypto.macs.CMac.doubleLu ( L ) ; Lu2 = org.bouncycastle.crypto.macs.CMac.doubleLu ( Lu ) ; } else if ( params != null ) { throw new java.lang.IllegalArgumentException ( "CMac mode only permits key to be set." ) ; } reset ( ) ; }

Target:
public void init ( org.bouncycastle.crypto.CipherParameters params ) { validate ( params ) ; cipher.init ( true , params ) ; L = new byte [ ZEROES.length ] ; cipher.processBlock ( ZEROES , 0 , L , 0 ) ; Lu = org.bouncycastle.crypto.macs.CMac.doubleLu ( L ) ; Lu2 = org.bouncycastle.crypto.macs.CMac.doubleLu ( Lu ) ; reset ( ) ; }
Source:
public void testInstall_withMissingBundleVersionFile ( ) throws java.lang.Exception { libcore.tzdata.update2.TimeZoneBundle bundle = libcore.tzdata.update2.TimeZoneBundleInstallerTest.createValidTimeZoneBundleBuilder ( libcore.tzdata.update2.TimeZoneBundleInstallerTest.NEW_RULES_VERSION , "001" ) . clearVersionForTests ( ) . buildUnvalidated ( ) ; assertFalse ( installer.install ( bundle.getBytes ( ) ) ) ; assertNoContentInstalled ( ) ; }

Target:
public void testInstall_withNewerBundleVersion ( ) throws java.lang.Exception { libcore.tzdata.update2.TimeZoneBundle bundle = libcore.tzdata.update2.TimeZoneBundleInstallerTest.createValidTimeZoneBundleBuilder ( libcore.tzdata.update2.TimeZoneBundleInstallerTest.NEW_RULES_VERSION , 1 ) . replaceFormatVersionForTests ( 2 , 1 ) . buildUnvalidated ( ) ; assertEquals ( TimeZoneBundleInstaller.INSTALL_FAIL_BAD_BUNDLE_FORMAT_VERSION , installer.installWithErrorCode ( bundle.getBytes ( ) ) ) ; assertNoContentInstalled ( ) ; }
Source:
synchronized void nAllocationData3D ( long id , int xoff , int yoff , int zoff , int mip , int w , int h , int depth , byte [ ] d , int sizeBytes ) { validate ( ) ; rsnAllocationData3D ( mContext , id , xoff , yoff , zoff , mip , w , h , depth , d , sizeBytes ) ; }

Target:
synchronized void nAllocationData3D ( long id , int xoff , int yoff , int zoff , int mip , int w , int h , int depth , java.lang.Object d , int sizeBytes , android.support.v8.renderscript.Element.DataType dt ) { validate ( ) ; rsnAllocationData3D ( mContext , id , xoff , yoff , zoff , mip , w , h , depth , d , sizeBytes , dt.mID ) ; }
Source:
public static java.lang.String formatNumber ( @ android.support.annotation.Nullable java.lang.String number , android.content.Context context ) { if ( number == null ) { return null ; } java.lang.String formattedNumber = android.telephony.PhoneNumberUtils.formatNumber ( number , com.android.dialer.phonenumberutil.PhoneNumberHelper.getCurrentCountryIso ( context , java.util.Locale.getDefault ( ) ) ) ; return formattedNumber != null ? formattedNumber : number ; }

Target:
public static java.lang.String formatNumber ( @ android.support.annotation.Nullable java.lang.String number , java.lang.String countryIso ) { if ( number == null ) { return null ; } java.lang.String formattedNumber = android.telephony.PhoneNumberUtils.formatNumber ( number , countryIso ) ; return formattedNumber != null ? formattedNumber : number ; }
Source:
private void initializeGlobals ( com.android.rs.test.RenderScript RS , com.android.rs.test.ScriptC_kernel s ) { com.android.rs.test.Type.Builder typeBuilder = new com.android.rs.test.Type.Builder ( RS , com.android.rs.test.Element.I32 ( RS ) ) ; int X = 5 ; s.set_dimX ( X ) ; typeBuilder.setX ( X ) ; A = com.android.rs.test.Allocation.createTyped ( RS , typeBuilder.create ( ) ) ; s.bind_ain ( A ) ; B = com.android.rs.test.Allocation.createTyped ( RS , typeBuilder.create ( ) ) ; s.bind_aout ( B ) ; return ; }

Target:
private void initializeGlobals ( android.renderscript.RenderScript RS , com.android.rs.test.ScriptC_kernel s ) { android.renderscript.Type.Builder typeBuilder = new android.renderscript.Type.Builder ( RS , android.renderscript.Element.I32 ( RS ) ) ; int X = 5 ; s.set_dimX ( X ) ; typeBuilder.setX ( X ) ; A = android.renderscript.Allocation.createTyped ( RS , typeBuilder.create ( ) ) ; s.bind_ain ( A ) ; B = android.renderscript.Allocation.createTyped ( RS , typeBuilder.create ( ) ) ; s.bind_aout ( B ) ; return ; }
Source:
public java.lang.String getDescription ( ) { java.lang.String prefix ; switch ( getType ( ) ) { case ANDROID_TEST : prefix = "Android (on device) tests" ; break ; case UNIT_TEST : prefix = "Unit tests" ; break ; default : throw new java.lang.IllegalStateException ( "Unknown test variant type." ) ; } if ( getVariantConfiguration ( ) . hasFlavors ( ) ) { return java.lang.String.format ( "%s for the %s%s build" , prefix , getCapitalizedFlavorName ( ) , getCapitalizedBuildTypeName ( ) ) ; } else { return java.lang.String.format ( "%s for the %s build" , prefix , getCapitalizedBuildTypeName ( ) ) ; } }

Target:
public java.lang.String getDescription ( ) { java.lang.String prefix ; switch ( getType ( ) ) { case ANDROID_TEST : prefix = "android (on device) tests" ; break ; case UNIT_TEST : prefix = "unit tests" ; break ; default : throw new java.lang.IllegalStateException ( "Unknown test variant type." ) ; } if ( getVariantConfiguration ( ) . hasFlavors ( ) ) { return java.lang.String.format ( "%s for the %s%s build" , prefix , getCapitalizedFlavorName ( ) , getCapitalizedBuildTypeName ( ) ) ; } else { return java.lang.String.format ( "%s for the %s build" , prefix , getCapitalizedBuildTypeName ( ) ) ; } }
Source:
public void copyFromUnchecked ( int [ ] d ) { android.os.Trace.traceBegin ( RenderScript.TRACE_TAG , "copyFromUnchecked" ) ; mRS.validate ( ) ; if ( ( mCurrentDimZ ) > 0 ) { copy3DRangeFromUnchecked ( 0 , 0 , 0 , mCurrentDimX , mCurrentDimY , mCurrentDimZ , d ) ; } else if ( ( mCurrentDimY ) > 0 ) { copy2DRangeFromUnchecked ( 0 , 0 , mCurrentDimX , mCurrentDimY , d ) ; } else { copy1DRangeFromUnchecked ( 0 , mCurrentCount , d ) ; } android.os.Trace.traceEnd ( RenderScript.TRACE_TAG ) ; }

Target:
private void validateIsInt64 ( ) { if ( ( ( mType.mElement.mType ) == ( Element.DataType.SIGNED_64 ) ) || ( ( mType.mElement.mType ) == ( Element.DataType.UNSIGNED_64 ) ) ) { return ; } throw new android.renderscript.RSIllegalArgumentException ( ( "64 bit integer source does not match allocation type " + ( mType.mElement.mType ) ) ) ; }
Source:
private void updateLocation ( final java.lang.String providerName , final double latitude , final double longitude ) { updateLocation ( providerName , providerName , latitude , longitude ) ; }

Target:
private void updateLocation ( final java.lang.String providerName , final double latitude , final double longitude ) { android.location.Location location = new android.location.Location ( providerName ) ; location.setLatitude ( latitude ) ; location.setLongitude ( longitude ) ; location.setAccuracy ( 1.0F ) ; location.setTime ( java.lang.System.currentTimeMillis ( ) ) ; location.setElapsedRealtimeNanos ( android.os.SystemClock.elapsedRealtimeNanos ( ) ) ; mManager.setTestProviderLocation ( providerName , location ) ; }
Source:
public void testDefaultConfiguration ( ) throws java.lang.Exception { javax.net.ssl.SSLServerSocket serverSocket = ( ( javax.net.ssl.SSLServerSocket ) ( javax.net.ssl.SSLServerSocketFactory.getDefault ( ) . createServerSocket ( ) ) ) ; libcore.java.security.StandardNames.assertDefaultCipherSuites ( serverSocket.getEnabledCipherSuites ( ) ) ; libcore.java.security.StandardNames.assertSupportedCipherSuites ( serverSocket.getSupportedCipherSuites ( ) ) ; libcore.java.security.StandardNames.assertValidProtocols ( serverSocket.getEnabledProtocols ( ) ) ; libcore.java.security.StandardNames.assertSupportedProtocols ( serverSocket.getSupportedProtocols ( ) ) ; assertTrue ( serverSocket.getEnableSessionCreation ( ) ) ; assertFalse ( serverSocket.getNeedClientAuth ( ) ) ; assertFalse ( serverSocket.getWantClientAuth ( ) ) ; }

Target:
public void testDefaultConfiguration ( ) throws java.lang.Exception { javax.net.ssl.SSLServerSocket serverSocket = ( ( javax.net.ssl.SSLServerSocket ) ( javax.net.ssl.SSLServerSocketFactory.getDefault ( ) . createServerSocket ( ) ) ) ; libcore.java.security.StandardNames.assertDefaultCipherSuites ( serverSocket.getEnabledCipherSuites ( ) ) ; libcore.java.security.StandardNames.assertSupportedCipherSuites ( serverSocket.getSupportedCipherSuites ( ) ) ; libcore.java.security.StandardNames.assertDefaultProtocolsServer ( serverSocket.getEnabledProtocols ( ) ) ; libcore.java.security.StandardNames.assertSupportedProtocols ( serverSocket.getSupportedProtocols ( ) ) ; assertTrue ( serverSocket.getEnableSessionCreation ( ) ) ; assertFalse ( serverSocket.getNeedClientAuth ( ) ) ; assertFalse ( serverSocket.getWantClientAuth ( ) ) ; }
Source:
public void onRangingAborted ( int rangingId ) { if ( com.android.server.wifi.nan.WifiNanClientState.VDBG ) android.util.Log.v ( com.android.server.wifi.nan.WifiNanClientState.TAG , ( "onRangingSuccess: rangingId=" + rangingId ) ) ; try { mCallback.onRangingAborted ( rangingId ) ; } catch ( android.os.RemoteException e ) { android.util.Log.w ( com.android.server.wifi.nan.WifiNanClientState.TAG , ( "onRangingAborted: RemoteException - ignored: " + e ) ) ; } }

Target:
public void onRangingAborted ( int rangingId ) { if ( com.android.server.wifi.aware.WifiAwareClientState.VDBG ) android.util.Log.v ( com.android.server.wifi.aware.WifiAwareClientState.TAG , ( "onRangingSuccess: rangingId=" + rangingId ) ) ; try { mCallback.onRangingAborted ( rangingId ) ; } catch ( android.os.RemoteException e ) { android.util.Log.w ( com.android.server.wifi.aware.WifiAwareClientState.TAG , ( "onRangingAborted: RemoteException - ignored: " + e ) ) ; } }
Source:
public void testMeteredCapability ( ) throws java.lang.Exception { mContextFixture.getCarrierConfigBundle ( ) . putStringArray ( CarrierConfigManager.KEY_CARRIER_METERED_APN_TYPES_STRINGS , new java.lang.String [ ] { "default" } ) ; testConnectEvent ( ) ; org.junit.Assert.assertFalse ( getCopyNetworkCapabilities ( ) . hasCapability ( NetworkCapabilities.NET_CAPABILITY_NOT_METERED ) ) ; org.junit.Assert.assertTrue ( getNetworkInfo ( ) . isMetered ( ) ) ; }

Target:
public void testMeteredCapability ( ) throws java.lang.Exception { mContextFixture.getCarrierConfigBundle ( ) . putStringArray ( CarrierConfigManager.KEY_CARRIER_METERED_APN_TYPES_STRINGS , new java.lang.String [ ] { "default" } ) ; testConnectEvent ( ) ; org.junit.Assert.assertFalse ( getNetworkCapabilities ( ) . hasCapability ( NetworkCapabilities.NET_CAPABILITY_NOT_METERED ) ) ; org.junit.Assert.assertTrue ( getNetworkInfo ( ) . isMetered ( ) ) ; }
Source:
public void testAesCbcHmacSha256Udp4 ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , android.net.cts.IpSecManagerTest.getKey ( 256 ) ) ; android.net.IpSecAlgorithm auth = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_HMAC_SHA256 , android.net.cts.IpSecManagerTest.getKey ( 256 ) , 128 ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , null , false , 1 , false ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , null , false , 1 , true ) ; }

Target:
public void testAesCbcHmacSha256Udp6 ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , android.net.cts.IpSecManagerTest.CRYPT_KEY ) ; android.net.IpSecAlgorithm auth = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_HMAC_SHA256 , getAuthKey ( 256 ) , 128 ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV6_LOOPBACK , crypt , auth , false , 1 , false ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV6_LOOPBACK , crypt , auth , false , 1 , true ) ; }
Source:
private org.apache.http.HttpResponse createTestDownloadResponse ( android.net.Uri uri ) throws java.io.IOException { java.lang.String downloadId = uri.getQueryParameter ( android.webkit.cts.CtsTestServer.DOWNLOAD_ID_PARAMETER ) ; int numBytes = ( ( uri.getQueryParameter ( android.webkit.cts.CtsTestServer.NUM_BYTES_PARAMETER ) ) != null ) ? java.lang.Integer.parseInt ( uri.getQueryParameter ( android.webkit.cts.CtsTestServer.NUM_BYTES_PARAMETER ) ) : 0 ; org.apache.http.HttpResponse response = createResponse ( HttpStatus.SC_OK ) ; response.setHeader ( "Content-Length" , java.lang.Integer.toString ( numBytes ) ) ; response.setEntity ( createFileEntity ( downloadId , numBytes ) ) ; return response ; }

Target:
private static org.apache.http.HttpResponse createTestDownloadResponse ( android.net.Uri uri ) throws java.io.IOException { java.lang.String downloadId = uri.getQueryParameter ( android.webkit.cts.CtsTestServer.DOWNLOAD_ID_PARAMETER ) ; int numBytes = ( ( uri.getQueryParameter ( android.webkit.cts.CtsTestServer.NUM_BYTES_PARAMETER ) ) != null ) ? java.lang.Integer.parseInt ( uri.getQueryParameter ( android.webkit.cts.CtsTestServer.NUM_BYTES_PARAMETER ) ) : 0 ; org.apache.http.HttpResponse response = android.webkit.cts.CtsTestServer.createResponse ( HttpStatus.SC_OK ) ; response.setHeader ( "Content-Length" , java.lang.Integer.toString ( numBytes ) ) ; response.setEntity ( android.webkit.cts.CtsTestServer.createFileEntity ( downloadId , numBytes ) ) ; return response ; }
Source:
com.android.ide.eclipse.adt.internal.wizards.templates.TemplateHandler getTemplateHandler ( ) { if ( ( mTemplateHandler ) == null ) { java.io.File inputPath ; if ( ( mTemplateLocation ) != null ) { inputPath = mTemplateLocation ; } else { inputPath = com.android.ide.eclipse.adt.internal.wizards.templates.TemplateHandler.getTemplateLocation ( com.android.ide.eclipse.adt.internal.wizards.templates.NewTemplateWizard.BLANK_ACTIVITY ) ; } mTemplateHandler = com.android.ide.eclipse.adt.internal.wizards.templates.TemplateHandler.createFromPath ( inputPath ) ; } return mTemplateHandler ; }

Target:
com.android.ide.eclipse.adt.internal.wizards.templates.TemplateHandler getTemplateHandler ( ) { if ( ( mTemplateHandler ) == null ) { java.io.File inputPath ; if ( ( mTemplateLocation ) != null ) { inputPath = mTemplateLocation ; } else { inputPath = com.android.ide.eclipse.adt.internal.wizards.templates.TemplateManager.getTemplateLocation ( com.android.ide.eclipse.adt.internal.wizards.templates.NewTemplateWizard.BLANK_ACTIVITY ) ; } mTemplateHandler = com.android.ide.eclipse.adt.internal.wizards.templates.TemplateHandler.createFromPath ( inputPath ) ; } return mTemplateHandler ; }
Source:
public static void testSendEtwsMessageOther ( android.app.Activity activity , int serialNumber ) { android.content.Intent intent = new android.content.Intent ( android.provider.Telephony.Sms.Intents.SMS_EMERGENCY_CB_RECEIVED_ACTION ) ; intent.putExtra ( "message" , com.android.cellbroadcastreceiver.tests.SendTestMessages.createFromPdu ( activity , com.android.cellbroadcastreceiver.tests.SendTestMessages.etwsMessageNormal , serialNumber , SmsCbConstants.MESSAGE_ID_ETWS_OTHER_EMERGENCY_TYPE ) ) ; activity.sendOrderedBroadcastAsUser ( intent , UserHandle.ALL , Manifest.permission.RECEIVE_EMERGENCY_BROADCAST , AppOpsManager.OP_RECEIVE_EMERGECY_SMS , null , null , Activity.RESULT_OK , null , null ) ; }

Target:
public static void testSendEtwsMessageEarthquake ( android.app.Activity activity , int serialNumber ) { com.android.cellbroadcastreceiver.tests.SendTestMessages.sendBroadcast ( activity , serialNumber , SmsCbConstants.MESSAGE_ID_ETWS_EARTHQUAKE_WARNING , com.android.cellbroadcastreceiver.tests.SendTestMessages.etwsMessageNormal ) ; }
Source:
public void xmlParsing_missingIanaVersionAttribute ( ) throws java.lang.Exception { libcore.util.TimeZoneFinder finder = libcore.util.TimeZoneFinderTest.validate ( ( "<timezones>\n" + ( ( ( ( ( " <countryzones>\n" + " <country code=\"gb\" default=\"Europe/London\">\n" ) + " <id>Europe/London</id>\n" ) + " </country>\n" ) + " </countryzones>\n" ) + "</timezones>\n" ) ) ) ; libcore.util.TimeZoneFinderTest.assertZonesEqual ( libcore.util.TimeZoneFinderTest.zones ( "Europe/London" ) , finder.lookupTimeZonesByCountry ( "gb" ) ) ; org.junit.Assert.assertNull ( finder.getIanaVersion ( ) ) ; }

Target:
public void xmlParsing_missingIanaVersionAttribute ( ) throws java.lang.Exception { libcore.util.TimeZoneFinder finder = libcore.util.TimeZoneFinderTest.validate ( ( "<timezones>\n" + ( ( ( ( ( " <countryzones>\n" + " <country code=\"gb\" default=\"Europe/London\">\n" ) + " <id>Europe/London</id>\n" ) + " </country>\n" ) + " </countryzones>\n" ) + "</timezones>\n" ) ) ) ; org.junit.Assert.assertEquals ( libcore.util.TimeZoneFinderTest.list ( "Europe/London" ) , finder.lookupTimeZoneIdsByCountry ( "gb" ) ) ; org.junit.Assert.assertNull ( finder.getIanaVersion ( ) ) ; }
Source:
public void testSelectedDescendantsMatch_SelectedDescendantsDoNotMatch ( ) { android.view.View grany = setUpViewHierarchy ( ) ; try { android.support.test.espresso.assertion.ViewAssertions.selectedDescendantsMatch ( android.support.test.espresso.matcher.ViewMatchers.withText ( "no content description" ) , android.support.test.espresso.matcher.ViewMatchers.hasContentDescription ( ) ) . check ( grany , absentException ) ; } catch ( junit.framework.AssertionFailedError expected ) { return ; } fail ( "should fail because descendants do not match." ) ; }

Target:
public void selectedDescendantsMatch_SelectedDescendantsDoNotMatch ( ) { android.view.View grany = setUpViewHierarchy ( ) ; expectedException.expect ( junit.framework.AssertionFailedError.class ) ; android.support.test.espresso.assertion.ViewAssertions.selectedDescendantsMatch ( android.support.test.espresso.matcher.ViewMatchers.withText ( "no content description" ) , android.support.test.espresso.matcher.ViewMatchers.hasContentDescription ( ) ) . check ( grany , absentException ) ; }
Source:
public void handleMessage ( android.os.Message msg ) { switch ( msg.what ) { case com.android.internal.telephony.uicc.UiccController.EVENT_ICC_STATUS_CHANGED : if ( com.android.internal.telephony.uicc.UiccController.DBG ) log ( "Received EVENT_ICC_STATUS_CHANGED, calling getIccCardStatus" ) ; mCi.getIccCardStatus ( obtainMessage ( com.android.internal.telephony.uicc.UiccController.EVENT_GET_ICC_STATUS_DONE ) ) ; break ; case com.android.internal.telephony.uicc.UiccController.EVENT_GET_ICC_STATUS_DONE : if ( com.android.internal.telephony.uicc.UiccController.DBG ) log ( "Received EVENT_GET_ICC_STATUS_DONE" ) ; android.os.AsyncResult ar = ( ( android.os.AsyncResult ) ( msg.obj ) ) ; onGetIccCardStatusDone ( ar ) ; break ; default : android.util.Log.e ( com.android.internal.telephony.uicc.UiccController.LOG_TAG , ( " Unknown Event " + ( msg.what ) ) ) ; } }

Target:
public void handleMessage ( android.os.Message msg ) { synchronized ( com.android.internal.telephony.uicc.UiccController.mLock ) { switch ( msg.what ) { case com.android.internal.telephony.uicc.UiccController.EVENT_ICC_STATUS_CHANGED : if ( com.android.internal.telephony.uicc.UiccController.DBG ) log ( "Received EVENT_ICC_STATUS_CHANGED, calling getIccCardStatus" ) ; mCi.getIccCardStatus ( obtainMessage ( com.android.internal.telephony.uicc.UiccController.EVENT_GET_ICC_STATUS_DONE ) ) ; break ; case com.android.internal.telephony.uicc.UiccController.EVENT_GET_ICC_STATUS_DONE : if ( com.android.internal.telephony.uicc.UiccController.DBG ) log ( "Received EVENT_GET_ICC_STATUS_DONE" ) ; android.os.AsyncResult ar = ( ( android.os.AsyncResult ) ( msg.obj ) ) ; onGetIccCardStatusDone ( ar ) ; break ; default : android.telephony.Rlog.e ( com.android.internal.telephony.uicc.UiccController.LOG_TAG , ( " Unknown Event " + ( msg.what ) ) ) ; } } }
Source:
protected java.security.AlgorithmParameters engineGetParameters ( ) { if ( ( engineParams ) == null ) { if ( ( pbeSpec ) != null ) { try { java.security.AlgorithmParameters engineParams = java.security.AlgorithmParameters.getInstance ( pbeAlgorithm , BouncyCastleProvider.PROVIDER_NAME ) ; engineParams.init ( pbeSpec ) ; return engineParams ; } catch ( java.lang.Exception e ) { return null ; } } } return engineParams ; }

Target:
protected java.security.AlgorithmParameters engineGetParameters ( ) { if ( ( engineParams ) == null ) { if ( ( pbeSpec ) != null ) { try { java.security.AlgorithmParameters engineParams = createParametersInstance ( pbeAlgorithm ) ; engineParams.init ( pbeSpec ) ; return engineParams ; } catch ( java.lang.Exception e ) { return null ; } } } return engineParams ; }
Source:
public static void setVideoCallingGroupId ( android.content.Context context , long videoCallingGroupId ) { android.content.SharedPreferences.Editor eabPref = context.getSharedPreferences ( com.android.service.ims.presence.SharedPrefUtil.EAB_SHARED_PREF , Context.MODE_PRIVATE ) . edit ( ) ; eabPref.putLong ( com.android.service.ims.presence.SharedPrefUtil.VIDEO_CALLING_GROUP_ID , videoCallingGroupId ) . commit ( ) ; }

Target:
private static long validateDeviceTimestamp ( android.content.Context context , long lastSyncedTimestamp ) { long deviceCurrentTimeMillis = java.lang.System.currentTimeMillis ( ) ; if ( ( lastSyncedTimestamp != 0 ) && ( lastSyncedTimestamp > deviceCurrentTimeMillis ) ) { android.content.SharedPreferences.Editor eabPref = context.getSharedPreferences ( com.android.service.ims.presence.SharedPrefUtil.EAB_SHARED_PREF , Context.MODE_PRIVATE ) . edit ( ) ; eabPref.putLong ( com.android.service.ims.presence.SharedPrefUtil.CONTACT_CHANGED_PREF_KEY , 0 ) ; eabPref.putLong ( com.android.service.ims.presence.SharedPrefUtil.CONTACT_DELETE_PREF_KEY , 0 ) ; eabPref.putLong ( com.android.service.ims.presence.SharedPrefUtil.CONTACT_PROFILE_CHANGED_PREF_KEY , 0 ) ; eabPref.commit ( ) ; lastSyncedTimestamp = 0 ; } return lastSyncedTimestamp ; }
Source:
public void testExampleOperation ( ) throws java.lang.Throwable { fakeHandler.setFakeResult ( "expected" ) ; com.google.dexmaker.stock.ProxyBuilderTest.SimpleClass proxy = proxyFor ( com.google.dexmaker.stock.ProxyBuilderTest.SimpleClass.class ) . build ( ) ; assertEquals ( "expected" , proxy.simpleMethod ( ) ) ; }

Target:
public void testExampleOperation ( ) throws java.lang.Throwable { fakeHandler.setFakeResult ( "expected" ) ; com.google.dexmaker.stock.ProxyBuilderTest.SimpleClass proxy = proxyFor ( com.google.dexmaker.stock.ProxyBuilderTest.SimpleClass.class ) . build ( ) ; assertEquals ( "expected" , proxy.simpleMethod ( ) ) ; assertEquals ( 2 , versionedDxDir.listFiles ( ) . length ) ; }
Source:
public void shutdown ( ) { for ( java.util.Map.Entry < java.lang.String , com.googlecode.android_scripting.facade.bluetooth.BluetoothConnection > entry : connections.entrySet ( ) ) { entry.getValue ( ) . stop ( ) ; } connections.clear ( ) ; }

Target:
public void shutdown ( ) { for ( java.util.Map.Entry < java.lang.String , com.googlecode.android_scripting.facade.bluetooth.BluetoothConnection > entry : connections.entrySet ( ) ) { entry.getValue ( ) . stop ( ) ; } if ( ( mMultiStateReceiver ) != null ) bluetoothStopListeningForAdapterStateChange ( ) ; connections.clear ( ) ; }
Source:
public void testVariantLevelAbiFilter ( ) { com.android.build.SplitOutput match ; java.util.List < com.android.build.SplitOutput > list = com.google.common.collect.Lists.newArrayList ( ) ; list.add ( ( match = com.android.ide.common.build.SplitOutputMatcherTest.getUniversalOutput ( 1 ) ) ) ; com.android.build.SplitOutput result = com.android.ide.common.build.SplitOutputMatcherTest.computeBestOutput ( list , com.google.common.collect.Sets.newHashSet ( "bar" , "foo" ) , 160 , "foo" , "zzz" ) ; assertEquals ( match , result ) ; }

Target:
public void testVariantLevelAbiFilter ( ) { com.android.build.VariantOutput match ; java.util.List < com.android.build.VariantOutput > list = com.google.common.collect.Lists.newArrayList ( ) ; list.add ( ( match = com.android.ide.common.build.SplitOutputMatcherTest.getUniversalOutput ( 1 ) ) ) ; java.util.List < java.io.File > result = com.android.ide.common.build.SplitOutputMatcherTest.computeBestOutput ( list , com.google.common.collect.Sets.newHashSet ( "bar" , "foo" ) , 160 , "foo" , "zzz" ) ; assertEquals ( 1 , result.size ( ) ) ; assertEquals ( match.getMainOutputFile ( ) . getOutputFile ( ) , result.get ( 0 ) ) ; }
Source:
public void visitElement ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.XmlContext context , @ com.android.annotations.NonNull org.w3c.dom.Element element ) { java.lang.String tag = element.getTagName ( ) ; java.lang.String correct = ( java.lang.Character.toLowerCase ( tag.charAt ( 0 ) ) ) + ( tag.substring ( 1 ) ) ; context.report ( com.android.tools.lint.checks.WrongCaseDetector.WRONG_CASE , element , context.getLocation ( element ) , java.lang.String.format ( "Invalid tag <%1$s>; should be <%2$s>" , tag , correct ) , null ) ; }

Target:
public void visitElement ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.XmlContext context , @ com.android.annotations.NonNull org.w3c.dom.Element element ) { java.lang.String tag = element.getTagName ( ) ; java.lang.String correct = ( java.lang.Character.toLowerCase ( tag.charAt ( 0 ) ) ) + ( tag.substring ( 1 ) ) ; context.report ( com.android.tools.lint.checks.WrongCaseDetector.WRONG_CASE , element , context.getLocation ( element ) , java.lang.String.format ( "Invalid tag `<%1$s>`; should be `<%2$s>`" , tag , correct ) , null ) ; }
Source:
private void createPropertySheet ( ) { mPropertySheetComposite = new org.eclipse.wb.internal.core.editor.structure.PageSiteComposite ( mControl , org.eclipse.swt.SWT.BORDER ) ; mPropertySheetComposite.setTitleText ( "Properties" ) ; mPropertySheetComposite.setTitleImage ( com.android.ide.eclipse.adt.internal.editors.IconFactory.getInstance ( ) . getIcon ( "properties_view" ) ) ; mPropertySheet = new com.android.ide.eclipse.adt.internal.editors.layout.properties.PropertySheetPage ( mGraphicalEditorPart ) ; mPropertySheetComposite.setPage ( mPropertySheet ) ; }

Target:
public void mouseDoubleClick ( org.eclipse.swt.events.MouseEvent e ) { }
Source:
private void updateNewResButton ( ) { com.android.ide.eclipse.adt.internal.resources.ResourceType type = getSelectedResourceType ( ) ; mNewResButton.setEnabled ( ( type == ( com.android.ide.eclipse.adt.internal.resources.ResourceType.STRING ) ) ) ; java.lang.String title = java.lang.String.format ( "New %1$s..." , ( type == null ? "Resource" : type.getDisplayName ( ) ) ) ; mNewResButton.setText ( title ) ; mNewResButton.pack ( ) ; }

Target:
private void updateNewResButton ( ) { com.android.resources.ResourceType type = getSelectedResourceType ( ) ; mNewResButton.setEnabled ( ( type == ( com.android.resources.ResourceType.STRING ) ) ) ; java.lang.String title = java.lang.String.format ( "New %1$s..." , ( type == null ? "Resource" : type.getDisplayName ( ) ) ) ; mNewResButton.setText ( title ) ; mNewResButton.pack ( ) ; }
Source:
public void testAesCbcHmacSha512Udp6 ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , android.net.cts.IpSecManagerTest.CRYPT_KEY ) ; android.net.IpSecAlgorithm auth = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_HMAC_SHA512 , getAuthKey ( 512 ) , 256 ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV6_LOOPBACK , crypt , auth , false , 1 , false ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV6_LOOPBACK , crypt , auth , false , 1 , true ) ; }

Target:
public void testAesCbcHmacSha512Tcp6 ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , android.net.cts.IpSecManagerTest.CRYPT_KEY ) ; android.net.IpSecAlgorithm auth = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_HMAC_SHA512 , android.net.cts.IpSecManagerTest.getKey ( 512 ) , 256 ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IpSecManagerTest.IPV6_LOOPBACK , crypt , auth , null , false , 1 , false ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IpSecManagerTest.IPV6_LOOPBACK , crypt , auth , null , false , 1 , true ) ; }
Source:
public static < E extends java.lang.Comparable < ? super E > > com.google.common.collect.ImmutableSortedSet < E > of ( E e1 , E e2 , E e3 ) { return com.google.common.collect.ImmutableSortedSet.copyOf ( com.google.common.collect.Ordering.natural ( ) , java.util.Arrays.asList ( e1 , e2 , e3 ) ) ; }

Target:
public static < E extends java.lang.Comparable < ? super E > > com.google.common.collect.ImmutableSortedSet < E > of ( E e1 , E e2 , E e3 ) { return com.google.common.collect.ImmutableSortedSet.construct ( com.google.common.collect.Ordering.natural ( ) , 3 , e1 , e2 , e3 ) ; }
Source:
public static void w ( java.lang.String prefix , java.lang.String format , java.lang.Object ... args ) { if ( android.telecom.Log.WARN ) { android.util.Log.w ( android.telecom.Log.TAG , android.telecom.Log.buildMessage ( prefix , format , args ) ) ; } }

Target:
public static void v ( java.lang.String prefix , java.lang.String format , java.lang.Object ... args ) { if ( android.telecom.Log.sIsUserExtendedLoggingEnabled ) { android.telecom.Log.maybeDisableLogging ( ) ; android.util.Slog.i ( android.telecom.Log.TAG , android.telecom.Log.buildMessage ( prefix , format , args ) ) ; } else if ( android.telecom.Log.VERBOSE ) { android.util.Slog.v ( android.telecom.Log.TAG , android.telecom.Log.buildMessage ( prefix , format , args ) ) ; } }
Source:
static java.lang.String [ ] getReportLines ( com.android.tradefed.device.ITestDevice device , java.lang.String reportPath ) throws com.android.tradefed.device.DeviceNotAvailableException { java.lang.String cat = java.lang.String.format ( "cat %s" , reportPath ) ; java.lang.String output = device.executeShellCommand ( cat ) ; return output.isEmpty ( ) ? new java.lang.String [ 0 ] : output.split ( "\n" ) ; }

Target:
static java.lang.String [ ] getReportLines ( com.android.tradefed.device.ITestDevice device , java.lang.String reportPath ) throws com.android.tradefed.device.DeviceNotAvailableException { java.io.File reportFile = device.pullFile ( reportPath ) ; try { return com.android.tradefed.util.FileUtil.readStringFromFile ( reportFile ) . split ( "\n" ) ; } catch ( java.io.IOException e ) { com.android.tradefed.log.LogUtil.CLog.w ( e ) ; return new java.lang.String [ 0 ] ; } finally { reportFile.delete ( ) ; } }
Source:
public void testExceptionInScreeningService ( ) throws java.lang.Exception { org.mockito.Mockito.doThrow ( new android.os.RemoteException ( ) ) . when ( mCallScreeningService ) . screenCall ( org.mockito.Matchers.any ( com.android.internal.telecom.ICallScreeningAdapter.class ) , org.mockito.Matchers.any ( android.telecom.ParcelableCall.class ) ) ; mFilter.startFilterLookup ( mCall , mCallback ) ; android.content.ServiceConnection serviceConnection = verifyBindingIntent ( ) ; serviceConnection.onServiceConnected ( com.android.server.telecom.tests.CallScreeningServiceFilterTest.COMPONENT_NAME , mBinder ) ; org.mockito.Mockito.verify ( mCallback ) . onCallFilteringComplete ( org.mockito.Matchers.eq ( mCall ) , org.mockito.Matchers.eq ( com.android.server.telecom.tests.CallScreeningServiceFilterTest.PASS_RESULT ) ) ; }

Target:
public void testExceptionInScreeningService ( ) throws java.lang.Exception { org.mockito.Mockito.doThrow ( new android.os.RemoteException ( ) ) . when ( mCallScreeningService ) . screenCall ( org.mockito.ArgumentMatchers.nullable ( com.android.internal.telecom.ICallScreeningAdapter.class ) , org.mockito.ArgumentMatchers.nullable ( android.telecom.ParcelableCall.class ) ) ; mFilter.startFilterLookup ( mCall , mCallback ) ; android.content.ServiceConnection serviceConnection = verifyBindingIntent ( ) ; serviceConnection.onServiceConnected ( com.android.server.telecom.tests.CallScreeningServiceFilterTest.COMPONENT_NAME , mBinder ) ; org.mockito.Mockito.verify ( mCallback ) . onCallFilteringComplete ( org.mockito.Matchers.eq ( mCall ) , org.mockito.Matchers.eq ( com.android.server.telecom.tests.CallScreeningServiceFilterTest.PASS_RESULT ) ) ; }
Source:
public static java.lang.String getBestDateTimePattern ( java.lang.String skeleton , java.lang.String localeName ) { java.lang.String key = ( skeleton + "\t" ) + localeName ; synchronized ( libcore.icu.ICU.CACHED_PATTERNS ) { java.lang.String pattern = libcore.icu.ICU.CACHED_PATTERNS.get ( key ) ; if ( pattern == null ) { pattern = libcore.icu.ICU.getBestDateTimePatternNative ( skeleton , localeName ) ; libcore.icu.ICU.CACHED_PATTERNS.put ( key , pattern ) ; } return pattern ; } }

Target:
public static java.lang.String getBestDateTimePattern ( java.lang.String skeleton , java.util.Locale locale ) { java.lang.String languageTag = locale.toLanguageTag ( ) ; java.lang.String key = ( skeleton + "\t" ) + languageTag ; synchronized ( libcore.icu.ICU.CACHED_PATTERNS ) { java.lang.String pattern = libcore.icu.ICU.CACHED_PATTERNS.get ( key ) ; if ( pattern == null ) { pattern = libcore.icu.ICU.getBestDateTimePatternNative ( skeleton , languageTag ) ; libcore.icu.ICU.CACHED_PATTERNS.put ( key , pattern ) ; } return pattern ; } }
Source:
private java.lang.String getPreviousNewSignature ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethod method ) { com.android.jack.shrob.obfuscation.NewMethodSignatureMarker marker = method.getEnclosingType ( ) . getMarker ( com.android.jack.shrob.obfuscation.NewMethodSignatureMarker.class ) ; if ( marker != null ) { return marker.getNewSignature ( method.getMethodId ( ) . getMethodIdWide ( ) ) ; } return null ; }

Target:
private com.android.jack.shrob.obfuscation.key.MethodKey getPreviousNewKey ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethod method ) { com.android.jack.shrob.obfuscation.NewMethodKeyMarker marker = method.getEnclosingType ( ) . getMarker ( com.android.jack.shrob.obfuscation.NewMethodKeyMarker.class ) ; if ( marker != null ) { return marker.getNewKey ( method.getMethodId ( ) . getMethodIdWide ( ) ) ; } return null ; }
Source:
private static void recordCustomTimesHistogramMilliseconds ( java.lang.String name , long duration , long min , long max , int numBuckets ) { if ( ( org.chromium.base.metrics.RecordHistogram.sDisabledBy ) != null ) return ; long key = org.chromium.base.metrics.RecordHistogram.getCachedHistogramKey ( name ) ; long result = org.chromium.base.metrics.RecordHistogram.nativeRecordCustomTimesHistogramMilliseconds ( name , key , org.chromium.base.metrics.RecordHistogram.clampToInt ( duration ) , org.chromium.base.metrics.RecordHistogram.clampToInt ( min ) , org.chromium.base.metrics.RecordHistogram.clampToInt ( max ) , numBuckets ) ; if ( result != key ) org.chromium.base.metrics.RecordHistogram.sCache.put ( name , result ) ; }

Target:
private static void recordCustomTimesHistogramMilliseconds ( java.lang.String name , long duration , long min , long max , int numBuckets ) { if ( org.chromium.base.metrics.RecordHistogram.sIsDisabledForTests ) return ; long key = org.chromium.base.metrics.RecordHistogram.getCachedHistogramKey ( name ) ; long result = org.chromium.base.metrics.RecordHistogram.nativeRecordCustomTimesHistogramMilliseconds ( name , key , org.chromium.base.metrics.RecordHistogram.clampToInt ( duration ) , org.chromium.base.metrics.RecordHistogram.clampToInt ( min ) , org.chromium.base.metrics.RecordHistogram.clampToInt ( max ) , numBuckets ) ; if ( result != key ) org.chromium.base.metrics.RecordHistogram.sCache.put ( name , result ) ; }
Source:
public void start ( ) { android.util.Log.d ( com.android.server.connectivity.tethering.OffloadController.TAG , "tethering offload not supported" ) ; }

Target:
public void start ( ) { if ( started ( ) ) return ; if ( ! ( mConfigInitialized ) ) { mConfigInitialized = mHwInterface.initOffloadConfig ( ) ; if ( ! ( mConfigInitialized ) ) { android.util.Log.d ( com.android.server.connectivity.tethering.OffloadController.TAG , "tethering offload config not supported" ) ; return ; } } mControlInitialized = mHwInterface.initOffloadControl ( ) ; }
Source:
public static java.lang.String formatProgressText ( long totalBytes , long currentBytes ) { if ( totalBytes <= 0 ) { return "0%" ; } long progress = ( currentBytes * 100 ) / totalBytes ; java.lang.StringBuilder sb = new java.lang.StringBuilder ( ) ; sb.append ( progress ) ; sb.append ( '%' ) ; return sb.toString ( ) ; }

Target:
static android.net.Uri generateUri ( android.net.Uri uri , com.android.bluetooth.opp.BluetoothOppSendFileInfo sendFileInfo ) { java.lang.String fileInfo = sendFileInfo.toString ( ) ; int atIndex = fileInfo.lastIndexOf ( "@" ) ; fileInfo = fileInfo.substring ( atIndex ) ; uri = android.net.Uri.parse ( ( uri + fileInfo ) ) ; if ( com.android.bluetooth.opp.BluetoothOppUtility.V ) android.util.Log.v ( com.android.bluetooth.opp.BluetoothOppUtility.TAG , ( "generateUri: " + uri ) ) ; return uri ; }
Source:
private void processUsesConfiguration ( org.xml.sax.Attributes attributes ) { mManifestData.mUsesConfiguration = new com.android.sdklib.xml.ManifestData.UsesConfiguration ( ) ; mManifestData.mUsesConfiguration.mReqFiveWayNav = getAttributeBooleanValue ( attributes , AndroidManifest.ATTRIBUTE_REQ_5WAYNAV , true ) ; mManifestData.mUsesConfiguration.mReqNavigation = com.android.sdklib.resources.Navigation.getEnum ( getAttributeValue ( attributes , AndroidManifest.ATTRIBUTE_REQ_NAVIGATION , true ) ) ; mManifestData.mUsesConfiguration.mReqHardKeyboard = getAttributeBooleanValue ( attributes , AndroidManifest.ATTRIBUTE_REQ_HARDKEYBOARD , true ) ; mManifestData.mUsesConfiguration.mReqKeyboardType = com.android.sdklib.resources.Keyboard.getEnum ( getAttributeValue ( attributes , AndroidManifest.ATTRIBUTE_REQ_KEYBOARDTYPE , true ) ) ; mManifestData.mUsesConfiguration.mReqTouchScreen = com.android.sdklib.resources.TouchScreen.getEnum ( getAttributeValue ( attributes , AndroidManifest.ATTRIBUTE_REQ_TOUCHSCREEN , true ) ) ; }

Target:
private void processUsesConfiguration ( org.xml.sax.Attributes attributes ) { mManifestData.mUsesConfiguration = new com.android.sdklib.xml.ManifestData.UsesConfiguration ( ) ; mManifestData.mUsesConfiguration.mReqFiveWayNav = getAttributeBooleanValue ( attributes , AndroidManifest.ATTRIBUTE_REQ_5WAYNAV , true ) ; mManifestData.mUsesConfiguration.mReqNavigation = com.android.resources.Navigation.getEnum ( getAttributeValue ( attributes , AndroidManifest.ATTRIBUTE_REQ_NAVIGATION , true ) ) ; mManifestData.mUsesConfiguration.mReqHardKeyboard = getAttributeBooleanValue ( attributes , AndroidManifest.ATTRIBUTE_REQ_HARDKEYBOARD , true ) ; mManifestData.mUsesConfiguration.mReqKeyboardType = com.android.resources.Keyboard.getEnum ( getAttributeValue ( attributes , AndroidManifest.ATTRIBUTE_REQ_KEYBOARDTYPE , true ) ) ; mManifestData.mUsesConfiguration.mReqTouchScreen = com.android.resources.TouchScreen.getEnum ( getAttributeValue ( attributes , AndroidManifest.ATTRIBUTE_REQ_TOUCHSCREEN , true ) ) ; }
Source:
public com.google.common.util.concurrent.ListenableFuture < java.lang.Void > onSuccessfulBulkUpdate ( ) { return com.google.common.util.concurrent.MoreExecutors.newDirectExecutorService ( ) . submit ( ( ) -> { if ( ( currentLastTimestampProcessed ) != null ) { sharedPreferences.edit ( ) . putLong ( com.android.dialer.phonelookup.cp2.Cp2PhoneLookup.PREF_LAST_TIMESTAMP_PROCESSED , currentLastTimestampProcessed ) . apply ( ) ; } return null ; } ) ; }

Target:
public com.google.common.util.concurrent.ListenableFuture < java.lang.Void > onSuccessfulBulkUpdate ( ) { return backgroundExecutorService.submit ( ( ) -> { if ( ( currentLastTimestampProcessed ) != null ) { sharedPreferences.edit ( ) . putLong ( com.android.dialer.phonelookup.cp2.Cp2PhoneLookup.PREF_LAST_TIMESTAMP_PROCESSED , currentLastTimestampProcessed ) . apply ( ) ; } return null ; } ) ; }