auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void testEncryptedNetwork ( ) throws java.lang.Exception { android.os.StrictMode.setVmPolicy ( new android.os.StrictMode.VmPolicy.Builder ( ) . detectCleartextNetwork ( ) . penaltyLog ( ) . build ( ) ) ; final long millis = java.lang.System.currentTimeMillis ( ) ; final java.lang.String msg = "Detected cleartext network traffic from UID " + ( android.os.cts.android.os.Process.myUid ( ) ) ; ( ( java.net.HttpURLConnection ) ( new java.net.URL ( "https://example.com/" ) . openConnection ( ) ) ) . getResponseCode ( ) ; android.os.SystemClock.sleep ( 5000 ) ; assertFalse ( "Expected encrypted to be ignored" , readLogSince ( millis ) . contains ( msg ) ) ; }

Target:
public void testEncryptedNetwork ( ) throws java.lang.Exception { if ( ! ( hasInternetConnection ( ) ) ) { android.util.Log.i ( android.os.cts.StrictModeTest.TAG , "testEncryptedNetwork() ignored on device without Internet" ) ; return ; } android.os.StrictMode.setVmPolicy ( new android.os.StrictMode.VmPolicy.Builder ( ) . detectCleartextNetwork ( ) . penaltyLog ( ) . build ( ) ) ; final long millis = java.lang.System.currentTimeMillis ( ) ; final java.lang.String msg = "Detected cleartext network traffic from UID " + ( android.os.cts.android.os.Process.myUid ( ) ) ; ( ( java.net.HttpURLConnection ) ( new java.net.URL ( "https://example.com/" ) . openConnection ( ) ) ) . getResponseCode ( ) ; android.os.SystemClock.sleep ( 5000 ) ; assertFalse ( "Expected encrypted to be ignored" , readLogSince ( millis ) . contains ( msg ) ) ; }
Source:
private void run ( @ javax.annotation.Nonnull com.android.jack.test.runtime.RuntimeTestInfo rti ) throws java.lang.Exception { new com.android.jack.test.helper.RuntimeTestHelper ( rti ) . setSourceLevel ( SourceLevel.JAVA_8 ) . addProperty ( Options.ANDROID_MIN_API_LEVEL.getName ( ) , java.lang.String.valueOf ( AndroidApiLevel.ReleasedLevel.N.getLevel ( ) ) ) . addIgnoredCandidateToolchain ( com.android.jack.test.toolchain.JackApiV01.class ) . compileAndRunTest ( ) ; }

Target:
private void run ( @ javax.annotation.Nonnull com.android.jack.test.runtime.RuntimeTestInfo rti ) throws java.lang.Exception { new com.android.jack.test.helper.RuntimeTestHelper ( rti ) . setSourceLevel ( SourceLevel.JAVA_8 ) . setAndroidMinApiLevel ( java.lang.String.valueOf ( AndroidApiLevel.ReleasedLevel.N.getLevel ( ) ) ) . addIgnoredCandidateToolchain ( com.android.jack.test.toolchain.JackApiV01.class ) . compileAndRunTest ( ) ; }
Source:
private void assertTrusted ( java.security.cert.X509Certificate x , java.lang.String alias ) { assertEquals ( x , store.getCertificate ( alias ) ) ; assertEquals ( org.conscrypt.TrustedCertificateStoreTest.file ( alias ) . lastModified ( ) , store.getCreationDate ( alias ) . getTime ( ) ) ; assertTrue ( store.containsAlias ( alias ) ) ; assertTrue ( store.isTrustAnchor ( x ) ) ; }

Target:
private void assertTrusted ( java.security.cert.X509Certificate x , java.lang.String alias ) { assertEquals ( x , store.getCertificate ( alias ) ) ; assertEquals ( org.conscrypt.TrustedCertificateStoreTest.file ( alias ) . lastModified ( ) , store.getCreationDate ( alias ) . getTime ( ) ) ; assertTrue ( store.containsAlias ( alias ) ) ; assertEquals ( x , store.getTrustAnchor ( x ) ) ; }
Source:
public static android.icu.text.NumberFormat getInstance ( android.icu.util.ULocale desiredLocale , int choice ) { if ( ( choice < ( android.icu.text.NumberFormat.NUMBERSTYLE ) ) || ( choice > ( android.icu.text.NumberFormat.CASHCURRENCYSTYLE ) ) ) { throw new java.lang.IllegalArgumentException ( "choice should be from NUMBERSTYLE to PLURALCURRENCYSTYLE" ) ; } return android.icu.text.NumberFormat.getShim ( ) . createInstance ( desiredLocale , choice ) ; }

Target:
public static android.icu.text.NumberFormat getInstance ( android.icu.util.ULocale desiredLocale , int choice ) { if ( ( choice < ( android.icu.text.NumberFormat.NUMBERSTYLE ) ) || ( choice > ( android.icu.text.NumberFormat.STANDARDCURRENCYSTYLE ) ) ) { throw new java.lang.IllegalArgumentException ( "choice should be from NUMBERSTYLE to STANDARDCURRENCYSTYLE" ) ; } return android.icu.text.NumberFormat.getShim ( ) . createInstance ( desiredLocale , choice ) ; }
Source:
public void checkValue ( @ javax.annotation.Nonnull com.android.sched.util.codec.CodecContext context , @ javax.annotation.Nonnull com.android.sched.util.file.OutputStreamFile stream ) throws com.android.sched.util.codec.CheckingException { checkValue ( context , ( ( com.android.sched.util.file.AbstractStreamFile ) ( stream ) ) ) ; }

Target:
public void checkValue ( @ javax.annotation.Nonnull com.android.sched.util.codec.CodecContext context , @ javax.annotation.Nonnull com.android.sched.util.file.OutputStreamFile stream ) throws com.android.sched.util.codec.CheckingException { com.android.sched.util.location.Location location = stream.getLocation ( ) ; if ( ( location.equals ( StandardOutputKind.STANDARD_OUTPUT.getLocation ( ) ) ) && ( ! ( allowStandardIO ) ) ) { throw new com.android.sched.util.codec.CheckingException ( "Standard output is not allowed" ) ; } else if ( ( location.equals ( StandardOutputKind.STANDARD_ERROR.getLocation ( ) ) ) && ( ! ( allowStandardError ) ) ) { throw new com.android.sched.util.codec.CheckingException ( "Standard error is not allowed" ) ; } }
Source:
public void run ( ) { synchronized ( this ) { if ( ( grid ) != null ) { grid.dispose ( ) ; grid = null ; zoom = model.getZoom ( ) ; } } }

Target:
public void zoomChanged ( ) { org.eclipse.swt.widgets.Display.getDefault ( ) . syncExec ( new java.lang.Runnable ( ) { public void run ( ) { synchronized ( this ) { if ( ( grid ) != null ) { grid.dispose ( ) ; grid = null ; } zoom = model.getZoom ( ) ; } } } ) ; doRedraw ( ) ; }
Source:
private javax.crypto.CipherSpi getSpi ( java.security.Key key ) { synchronized ( initLock ) { if ( ( spiImpl ) != null ) { return spiImpl ; } final org.apache.harmony.security.fortress.Engine.SpiAndProvider sap = javax.crypto.Cipher.tryCombinations ( key , provider , transformParts ) ; if ( sap == null ) { throw new java.security.ProviderException ( ( "No provider for " + ( transformation ) ) ) ; } spiImpl = ( ( javax.crypto.CipherSpi ) ( sap.spi ) ) ; provider = sap.provider ; return spiImpl ; } }

Target:
private javax.crypto.CipherSpi getSpi ( java.security.Key key ) { synchronized ( initLock ) { if ( ( ( spiImpl ) != null ) && ( key == null ) ) { return spiImpl ; } final org.apache.harmony.security.fortress.Engine.SpiAndProvider sap = javax.crypto.Cipher.tryCombinations ( key , specifiedProvider , transformParts ) ; if ( sap == null ) { throw new java.security.ProviderException ( ( "No provider for " + ( transformation ) ) ) ; } spiImpl = ( ( javax.crypto.CipherSpi ) ( sap.spi ) ) ; provider = sap.provider ; return spiImpl ; } }
Source:
private void addAnnotations ( @ com.android.annotations.Nullable org.eclipse.jdt.internal.compiler.ast.Annotation [ ] annotations , @ com.android.annotations.NonNull com.android.build.gradle.tasks.annotations.Extractor.Item item ) { if ( annotations != null ) { for ( org.eclipse.jdt.internal.compiler.ast.Annotation annotation : annotations ) { if ( isRelevantAnnotation ( annotation ) ) { com.android.build.gradle.tasks.annotations.Extractor.AnnotationData annotationData = createAnnotation ( annotation ) ; if ( annotationData != null ) { item.annotations.add ( annotationData ) ; } } } } }

Target:
private void addAnnotations ( @ com.android.annotations.Nullable org.eclipse.jdt.internal.compiler.ast.Annotation [ ] annotations , @ com.android.annotations.NonNull com.android.build.gradle.tasks.annotations.Extractor.Item item ) { if ( annotations != null ) { for ( org.eclipse.jdt.internal.compiler.ast.Annotation annotation : annotations ) { if ( isRelevantAnnotation ( annotation ) ) { com.android.build.gradle.tasks.annotations.Extractor.AnnotationData annotationData = createAnnotation ( annotation ) ; if ( annotationData != null ) { if ( annotationData.name.equals ( com.android.build.gradle.tasks.annotations.Extractor.SUPPORT_KEEP ) ) { keepItems.add ( item ) ; } else { item.annotations.add ( annotationData ) ; } } } } } }
Source:
void putExtra ( java.lang.String callId , java.lang.String key , boolean value ) { android.telecom.Log.v ( this , "putExtra: %s %s=%b" , callId , key , value ) ; for ( com.android.internal.telecom.IConnectionServiceAdapter adapter : mAdapters ) { try { android.os.Bundle bundle = new android.os.Bundle ( ) ; bundle.putBoolean ( key , value ) ; adapter.putExtras ( callId , bundle ) ; } catch ( android.os.RemoteException ignored ) { } } }

Target:
void putExtra ( java.lang.String callId , java.lang.String key , boolean value ) { android.telecom.Log.v ( this , "putExtra: %s %s=%b" , callId , key , value ) ; for ( com.android.internal.telecom.IConnectionServiceAdapter adapter : mAdapters ) { try { android.os.Bundle bundle = new android.os.Bundle ( ) ; bundle.putBoolean ( key , value ) ; adapter.putExtras ( callId , bundle , android.telecom.Log.getExternalSession ( ) ) ; } catch ( android.os.RemoteException ignored ) { } } }
Source:
private final boolean canGcNowLocked ( ) { boolean processingBroadcasts = false ; for ( com.android.server.am.BroadcastQueue q : mBroadcastQueues ) { if ( ( ( q.mParallelBroadcasts.size ( ) ) != 0 ) || ( ( q.mOrderedBroadcasts.size ( ) ) != 0 ) ) { processingBroadcasts = true ; } } return ( ! processingBroadcasts ) && ( ( isSleeping ( ) ) || ( mStackSupervisor.allResumedActivitiesIdle ( ) ) ) ; }

Target:
public void suppressResizeConfigChanges ( boolean suppress ) throws android.os.RemoteException { enforceCallingPermission ( android.Manifest.permission.MANAGE_ACTIVITY_STACKS , "suppressResizeConfigChanges()" ) ; synchronized ( this ) { mSuppressResizeConfigChanges = suppress ; } }
Source:
public static double min ( double a , double b ) { if ( a != a ) return a ; if ( ( ( a == 0.0 ) && ( b == 0.0 ) ) && ( ( java.lang.Double.doubleToRawLongBits ( b ) ) == ( java.lang.StrictMath.negativeZeroDoubleBits ) ) ) { return b ; } return a <= b ? a : b ; }

Target:
public static double abs ( double a ) { return java.lang.Math.abs ( a ) ; }
Source:
private static void fatal ( java.lang.String msg ) { android.util.Log.e ( android.net.nsd.NsdManager.TAG , msg ) ; throw new java.lang.RuntimeException ( msg ) ; }

Target:
private void init ( ) { final android.os.Messenger messenger = getMessenger ( ) ; if ( messenger == null ) throw new java.lang.RuntimeException ( "Failed to initialize" ) ; android.os.HandlerThread t = new android.os.HandlerThread ( "NsdManager" ) ; t.start ( ) ; mHandler = new android.net.nsd.NsdManager.ServiceHandler ( t.getLooper ( ) ) ; mAsyncChannel.connect ( mContext , mHandler , messenger ) ; try { mConnected.await ( ) ; } catch ( java.lang.InterruptedException e ) { android.util.Log.e ( android.net.nsd.NsdManager.TAG , "interrupted wait at init" ) ; } }
Source:
public void test_getInstanceLjava_lang_String02 ( ) { try { javax.net.ssl.TrustManagerFactory.getInstance ( null ) ; fail ( ) ; } catch ( java.security.NoSuchAlgorithmException expected ) { } catch ( java.lang.NullPointerException expected ) { } for ( int i = 0 ; i < ( tests.api.javax.net.ssl.TrustManagerFactory1Test.invalidValues.length ) ; i ++ ) { try { javax.net.ssl.TrustManagerFactory.getInstance ( tests.api.javax.net.ssl.TrustManagerFactory1Test.invalidValues [ i ] ) ; fail ( "NoSuchAlgorithmException was not thrown as expected for algorithm: " . concat ( tests.api.javax.net.ssl.TrustManagerFactory1Test.invalidValues [ i ] ) ) ; } catch ( java.security.NoSuchAlgorithmException e ) { } } }

Target:
public void test_getInstanceLjava_lang_String02 ( ) { try { javax.net.ssl.TrustManagerFactory.getInstance ( null ) ; fail ( ) ; } catch ( java.security.NoSuchAlgorithmException expected ) { } catch ( java.lang.NullPointerException expected ) { } for ( int i = 0 ; i < ( org.apache.harmony.tests.javax.net.ssl.TrustManagerFactory1Test.invalidValues.length ) ; i ++ ) { try { javax.net.ssl.TrustManagerFactory.getInstance ( org.apache.harmony.tests.javax.net.ssl.TrustManagerFactory1Test.invalidValues [ i ] ) ; fail ( "NoSuchAlgorithmException was not thrown as expected for algorithm: " . concat ( org.apache.harmony.tests.javax.net.ssl.TrustManagerFactory1Test.invalidValues [ i ] ) ) ; } catch ( java.security.NoSuchAlgorithmException e ) { } } }
Source:
static android.app.ContextImpl createAppContext ( android.app.ActivityThread mainThread , android.app.LoadedApk packageInfo ) { if ( packageInfo == null ) throw new java.lang.IllegalArgumentException ( "packageInfo" ) ; android.app.ContextImpl context = new android.app.ContextImpl ( null , mainThread , packageInfo , null , null , null , 0 , null ) ; context.setResources ( packageInfo.getResources ( ) ) ; return context ; }

Target:
static android.app.ContextImpl createAppContext ( android.app.ActivityThread mainThread , android.app.LoadedApk loadedApk ) { if ( loadedApk == null ) throw new java.lang.IllegalArgumentException ( "loadedApk" ) ; android.app.ContextImpl context = new android.app.ContextImpl ( null , mainThread , loadedApk , null , null , null , 0 , null ) ; context.setResources ( loadedApk.getResources ( ) ) ; return context ; }
Source:
public boolean isLeEnabled ( ) { final int state = getLeState ( ) ; if ( state == ( android.bluetooth.BluetoothAdapter.STATE_ON ) ) { if ( android.bluetooth.BluetoothAdapter.DBG ) android.util.Log.d ( android.bluetooth.BluetoothAdapter.TAG , "STATE_ON" ) ; } else if ( state == ( android.bluetooth.BluetoothAdapter.STATE_BLE_ON ) ) { if ( android.bluetooth.BluetoothAdapter.DBG ) android.util.Log.d ( android.bluetooth.BluetoothAdapter.TAG , "STATE_BLE_ON" ) ; } else { if ( android.bluetooth.BluetoothAdapter.DBG ) android.util.Log.d ( android.bluetooth.BluetoothAdapter.TAG , "STATE_OFF" ) ; return false ; } return true ; }

Target:
public boolean enableNoAutoConnect ( ) { if ( ( isEnabled ( ) ) == true ) { if ( android.bluetooth.BluetoothAdapter.DBG ) android.util.Log.d ( android.bluetooth.BluetoothAdapter.TAG , "enableNoAutoConnect(): BT already enabled!" ) ; return true ; } try { return mManagerService.enableNoAutoConnect ( android.app.ActivityThread.currentPackageName ( ) ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothAdapter.TAG , "" , e ) ; } return false ; }
Source:
public void testE3 ( ) { dot.junit.opcodes.aget_wide.d.T_aget_wide_1 t = new dot.junit.opcodes.aget_wide.d.T_aget_wide_1 ( ) ; long [ ] arr = new long [ 2 ] ; try { t.run ( arr , ( - 1 ) ) ; fail ( "expected ArrayIndexOutOfBoundsException" ) ; } catch ( java.lang.ArrayIndexOutOfBoundsException aie ) { } }

Target:
public void testVFE4 ( ) { load ( "dot.junit.opcodes.aget_wide.d.T_aget_wide_7" , java.lang.VerifyError.class ) ; }
Source:
void saveProperties ( java.util.Properties props ) { super . saveProperties ( props ) ; mVersion.saveProperties ( props ) ; if ( ( mVersionName ) != null ) { props.setProperty ( com.android.sdklib.internal.repository.PlatformPackage.PROP_VERSION , mVersionName ) ; } if ( ( mLayoutlibVersion.getFirst ( ) . intValue ( ) ) != ( com.android.sdklib.internal.repository.PlatformPackage.LAYOUTLIB_API_NOT_SPECIFIED ) ) { props.setProperty ( com.android.sdklib.internal.repository.PlatformPackage.PROP_LAYOUTLIB_API , mLayoutlibVersion.getFirst ( ) . toString ( ) ) ; props.setProperty ( com.android.sdklib.internal.repository.PlatformPackage.PROP_LAYOUTLIB_REV , mLayoutlibVersion.getSecond ( ) . toString ( ) ) ; } }

Target:
public com.android.util.Pair < java.lang.Integer , java.lang.Integer > getLayoutlibVersion ( ) { return mLayoutlibVersion.getLayoutlibVersion ( ) ; }
Source:
public void execute ( java.lang.String programName ) { java.lang.StringBuilder commandBuilder = new java.lang.StringBuilder ( ) ; commandBuilder.append ( "dalvikvm32 -Xcompiler-option --compiler-backend=Quick " ) ; if ( dexfuzz.Options.executeOnHost ) { commandBuilder.append ( device.getHostExecutionFlags ( ) ) . append ( " " ) ; } commandBuilder.append ( "-cp " ) . append ( testLocation ) . append ( "/" ) . append ( programName ) . append ( " " ) ; commandBuilder.append ( executeClass ) ; executionResult = executeCommandWithTimeout ( commandBuilder.toString ( ) , true ) ; }

Target:
protected java.lang.String constructCommand ( java.lang.String programName ) { java.lang.StringBuilder commandBuilder = new java.lang.StringBuilder ( ) ; commandBuilder.append ( "dalvikvm32 -Xcompiler-option --compiler-backend=Quick " ) ; if ( dexfuzz.Options.executeOnHost ) { commandBuilder.append ( device.getHostExecutionFlags ( ) ) . append ( " " ) ; } commandBuilder.append ( "-cp " ) . append ( testLocation ) . append ( "/" ) . append ( programName ) . append ( " " ) ; commandBuilder.append ( executeClass ) ; return commandBuilder.toString ( ) ; }
Source:
public void test_socket_accept_Blocking_Bound ( ) throws java.io.IOException { serverChannel.configureBlocking ( true ) ; java.net.ServerSocket gotSocket = serverChannel.socket ( ) ; gotSocket.bind ( null ) ; serverChannel.close ( ) ; try { gotSocket.accept ( ) ; fail ( "Should throw a ClosedChannelException" ) ; } catch ( java.nio.channels.ClosedChannelException e ) { } }

Target:
public void test_socket_accept_Nonblocking_Bound ( ) throws java.io.IOException { serverChannel.configureBlocking ( false ) ; serverChannel.bind ( null ) ; java.net.ServerSocket gotSocket = serverChannel.socket ( ) ; try { gotSocket.accept ( ) ; fail ( "Should throw an IllegalBlockingModeException" ) ; } catch ( java.nio.channels.IllegalBlockingModeException expected ) { } serverChannel.close ( ) ; try { gotSocket.accept ( ) ; fail ( "Should throw a ClosedChannelException" ) ; } catch ( java.nio.channels.ClosedChannelException expected ) { } }
Source:
public void setBackgroundColor ( final int color ) { mFactory.startYourEngines ( false ) ; if ( checkNeedsPost ( ) ) { org.chromium.base.ThreadUtils.postOnUiThread ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { setBackgroundColor ( color ) ; } } ) ; return ; } mAwContents.setBackgroundColor ( color ) ; }

Target:
public void computeScroll ( ) { mFactory.startYourEngines ( false ) ; if ( checkNeedsPost ( ) ) { runVoidTaskOnUiThreadBlocking ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { computeScroll ( ) ; } } ) ; return ; } mAwContents.computeScroll ( ) ; }
Source:
public void enter ( ) { cleanup ( ) ; if ( ( ( mWifiP2pChannel ) == null ) && ( ( mWifiP2pServiceImpl ) != null ) ) { mWifiP2pChannel = new com.android.internal.util.AsyncChannel ( ) ; mWifiP2pChannel.connect ( mContext , getHandler ( ) , mWifiP2pServiceImpl.getP2pStateMachineMessenger ( ) ) ; } if ( ( mWifiApConfigStore ) == null ) { mWifiApConfigStore = mFacade.makeApConfigStore ( mContext , mBackupManagerProxy ) ; } }

Target:
public void enter ( ) { cleanup ( ) ; if ( ( ( mWifiP2pChannel ) == null ) && ( ( mWifiP2pServiceImpl ) != null ) ) { mWifiP2pChannel = new com.android.internal.util.AsyncChannel ( ) ; mWifiP2pChannel.connect ( mContext , getHandler ( ) , mWifiP2pServiceImpl.getP2pStateMachineMessenger ( ) ) ; } if ( ( mWifiApConfigStore ) == null ) { mWifiApConfigStore = mWifiInjector.getWifiApConfigStore ( ) ; } }
Source:
public void remove ( ) { this . remove ( prev ) ; prev = prev.prev ; }

Target:
public void remove ( ) { if ( ( remove ) != null ) { if ( ( remove ) == ( next ) ) { next = next.next ; } else { prev = prev.prev ; } this . remove ( remove ) ; remove = null ; } else { throw new java.lang.IllegalStateException ( ) ; } }
Source:
private boolean isFrameworkSizeStyle ( java.lang.String style ) { if ( ! ( ( style.startsWith ( com.android.SdkConstants.ANDROID_THEME_PREFIX ) ) || ( style.startsWith ( com.android.SdkConstants.ANDROID_PREFIX ) ) ) ) { return false ; } if ( style.equals ( "?android:attr/listSeparatorTextViewStyle" ) ) { return true ; } if ( style.startsWith ( "?android:attr/quickContactBadgeStyle" ) ) { return true ; } return false ; }

Target:
private boolean isFrameworkSizeStyle ( java.lang.String style ) { if ( ( style.equals ( "?android:attr/listSeparatorTextViewStyle" ) ) || ( style.equals ( "?android/listSeparatorTextViewStyle" ) ) ) { return true ; } if ( style.startsWith ( "?android:attr/quickContactBadgeStyle" ) ) { return true ; } return false ; }
Source:
private static void provide ( java.lang.String type , java.lang.String algorithm ) { java.util.Set < java.lang.String > algorithms = libcore.java.security.StandardNames.PROVIDER_ALGORITHMS.get ( type ) ; if ( algorithms == null ) { algorithms = new java.util.HashSet ( ) ; libcore.java.security.StandardNames.PROVIDER_ALGORITHMS.put ( type , algorithms ) ; } assertTrue ( ( ( ( "Duplicate " + type ) + " " ) + algorithm ) , algorithms.add ( algorithm.toUpperCase ( java.util.Locale.ROOT ) ) ) ; }

Target:
private static void provide ( java.lang.String type , java.lang.String algorithm ) { java.util.Set < java.lang.String > algorithms = libcore.java.security.StandardNames.PROVIDER_ALGORITHMS.get ( type ) ; if ( algorithms == null ) { algorithms = new java.util.HashSet < java.lang.String > ( ) ; libcore.java.security.StandardNames.PROVIDER_ALGORITHMS.put ( type , algorithms ) ; } org.junit.Assert.assertTrue ( ( ( ( "Duplicate " + type ) + " " ) + algorithm ) , algorithms.add ( algorithm.toUpperCase ( java.util.Locale.ROOT ) ) ) ; }
Source:
private void onDescriptorsChanged ( org.w3c.dom.Document document ) { mUnknownDescriptorMap.clear ( ) ; if ( document != null ) { mUiDocRootNode.loadFromXmlNode ( document ) ; } else { mUiDocRootNode.reloadFromXmlNode ( mUiDocRootNode.getXmlDocument ( ) ) ; } if ( ( mGraphicalEditor ) != null ) { mGraphicalEditor.onTargetChange ( ) ; mGraphicalEditor.reloadPalette ( ) ; } }

Target:
private void onDescriptorsChanged ( org.w3c.dom.Document document ) { mUnknownDescriptorMap.clear ( ) ; if ( document != null ) { mUiDocRootNode.loadFromXmlNode ( document ) ; } else { mUiDocRootNode.reloadFromXmlNode ( mUiDocRootNode.getXmlDocument ( ) ) ; } if ( ( mGraphicalEditor ) != null ) { mGraphicalEditor.onTargetChange ( ) ; mGraphicalEditor.reloadPalette ( ) ; mGraphicalEditor.getCanvasControl ( ) . syncPreviewMode ( ) ; } }
Source:
void waitForQueuedThread ( jsr166.ReentrantLockTest.PublicReentrantLock lock , java.lang.Thread t ) { long startTime = java.lang.System.nanoTime ( ) ; while ( ! ( lock.hasQueuedThread ( t ) ) ) { if ( ( millisElapsedSince ( startTime ) ) > ( LONG_DELAY_MS ) ) throw new jsr166.AssertionFailedError ( "timed out" ) ; java.lang.Thread.yield ( ) ; } assertTrue ( t.isAlive ( ) ) ; assertNotSame ( t , lock.getOwner ( ) ) ; }

Target:
void waitForQueuedThread ( jsr166.ReentrantLockTest.PublicReentrantLock lock , java.lang.Thread t ) { long startTime = java.lang.System.nanoTime ( ) ; while ( ! ( lock.hasQueuedThread ( t ) ) ) { if ( ( millisElapsedSince ( startTime ) ) > ( LONG_DELAY_MS ) ) throw new junit.framework.AssertionFailedError ( "timed out" ) ; java.lang.Thread.yield ( ) ; } assertTrue ( t.isAlive ( ) ) ; assertNotSame ( t , lock.getOwner ( ) ) ; }
Source:
public void finishPackageInstall ( int token ) { com.android.server.pm.PackageManagerService.enforceSystemOrRoot ( "Only the system is allowed to finish installs" ) ; if ( com.android.server.pm.PackageManagerService.DEBUG_INSTALL ) { android.util.Slog.v ( com.android.server.pm.PackageManagerService.TAG , ( "BM finishing package install for " + token ) ) ; } final android.os.Message msg = mHandler.obtainMessage ( com.android.server.pm.PackageManagerService.POST_INSTALL , token , 0 ) ; mHandler.sendMessage ( msg ) ; }

Target:
void scheduleWritePackageListLocked ( int userId ) { if ( ! ( mHandler.hasMessages ( com.android.server.pm.PackageManagerService.WRITE_PACKAGE_LIST ) ) ) { android.os.Message msg = mHandler.obtainMessage ( com.android.server.pm.PackageManagerService.WRITE_PACKAGE_LIST ) ; msg.arg1 = userId ; mHandler.sendMessageDelayed ( msg , com.android.server.pm.PackageManagerService.WRITE_SETTINGS_DELAY ) ; } }
Source:
public void acquire ( ) { if ( ( mWakeLock ) == null ) { com.android.server.telecom.Log.i ( com.android.server.telecom.TelecomWakeLock.TAG , ( "Can not acquire WakeLock (not supported) with level: " + ( mWakeLockLevel ) ) ) ; return ; } if ( ! ( isHeld ( ) ) ) { mWakeLock.acquire ( ) ; com.android.server.telecom.Log.i ( com.android.server.telecom.TelecomWakeLock.TAG , ( "Acquiring WakeLock with id: " + ( mWakeLockLevel ) ) ) ; } else { com.android.server.telecom.Log.i ( com.android.server.telecom.TelecomWakeLock.TAG , ( "WakeLock already acquired for id: " + ( mWakeLockLevel ) ) ) ; } }

Target:
public void acquire ( ) { if ( ( mWakeLock ) == null ) { android.telecom.Log.i ( com.android.server.telecom.TelecomWakeLock.TAG , ( "Can not acquire WakeLock (not supported) with level: " + ( mWakeLockLevel ) ) ) ; return ; } if ( ! ( isHeld ( ) ) ) { mWakeLock.acquire ( ) ; android.telecom.Log.i ( com.android.server.telecom.TelecomWakeLock.TAG , ( "Acquiring WakeLock with id: " + ( mWakeLockLevel ) ) ) ; } else { android.telecom.Log.i ( com.android.server.telecom.TelecomWakeLock.TAG , ( "WakeLock already acquired for id: " + ( mWakeLockLevel ) ) ) ; } }
Source:
private android.net.NetworkRequest makeSubSpecificMmsRequest ( com.android.internal.telephony.dataconnection.TelephonyNetworkFactoryTest.TestSetup ts , int subId ) { android.net.NetworkCapabilities netCap = new android.net.NetworkCapabilities ( ) . addCapability ( NetworkCapabilities.NET_CAPABILITY_MMS ) . addCapability ( NetworkCapabilities.NET_CAPABILITY_NOT_RESTRICTED ) . addTransportType ( NetworkCapabilities.TRANSPORT_CELLULAR ) ; netCap.setNetworkSpecifier ( java.lang.Integer.toString ( subId ) ) ; return ts.connectivityServiceMock.requestNetwork ( netCap , null , 0 , new android.os.Binder ( ) , ( - 1 ) ) ; }

Target:
private android.net.NetworkRequest makeSubSpecificMmsRequest ( com.android.internal.telephony.dataconnection.TelephonyNetworkFactoryTest.TestSetup ts , int subId ) { android.net.NetworkCapabilities netCap = new android.net.NetworkCapabilities ( ) . addCapability ( NetworkCapabilities.NET_CAPABILITY_MMS ) . addCapability ( NetworkCapabilities.NET_CAPABILITY_NOT_RESTRICTED ) . addTransportType ( NetworkCapabilities.TRANSPORT_CELLULAR ) ; netCap.setNetworkSpecifier ( new android.net.StringNetworkSpecifier ( java.lang.Integer.toString ( subId ) ) ) ; return ts.connectivityServiceMock.requestNetwork ( netCap , null , 0 , new android.os.Binder ( ) , ( - 1 ) ) ; }
Source:
public java.lang.Void call ( ) throws java.lang.Exception { java.io.OutputStream out = new java.util.zip.DeflaterOutputStream ( pout , flushing ) ; out.write ( 1 ) ; out.write ( 2 ) ; out.write ( 3 ) ; out.flush ( ) ; return null ; }

Target:
public java.lang.Void call ( ) throws java.lang.Exception { java.io.OutputStream out ; if ( c == ( java.util.zip.DeflaterOutputStream.class ) ) { out = new java.util.zip.DeflaterOutputStream ( pout , flushing ) ; } else if ( c == ( java.util.zip.GZIPOutputStream.class ) ) { out = new java.util.zip.GZIPOutputStream ( pout , flushing ) ; } else { throw new java.lang.AssertionError ( ) ; } out.write ( 1 ) ; out.write ( 2 ) ; out.write ( 3 ) ; out.flush ( ) ; return null ; }
Source:
public void onReceivedTouchIconUrl ( java.lang.String url , boolean precomposed ) { org.chromium.base.TraceEvent.begin ( ) ; if ( ( mWebChromeClient ) != null ) { if ( com.android.webview.chromium.WebViewContentsClientAdapter.TRACE ) android.util.Log.d ( com.android.webview.chromium.WebViewContentsClientAdapter.TAG , ( "onReceivedTouchIconUrl=" + url ) ) ; mWebChromeClient.onReceivedTouchIconUrl ( mWebView , url , precomposed ) ; } org.chromium.base.TraceEvent.end ( ) ; }

Target:
public void onReceivedTouchIconUrl ( java.lang.String url , boolean precomposed ) { try { org.chromium.base.TraceEvent.begin ( "WebViewContentsClientAdapter.onReceivedTouchIconUrl" ) ; if ( ( mWebChromeClient ) != null ) { if ( com.android.webview.chromium.WebViewContentsClientAdapter.TRACE ) android.util.Log.d ( com.android.webview.chromium.WebViewContentsClientAdapter.TAG , ( "onReceivedTouchIconUrl=" + url ) ) ; mWebChromeClient.onReceivedTouchIconUrl ( mWebView , url , precomposed ) ; } } finally { org.chromium.base.TraceEvent.end ( "WebViewContentsClientAdapter.onReceivedTouchIconUrl" ) ; } }
Source:
public void handleUserUnlock ( int userId ) { if ( mVerboseLoggingEnabled ) { android.util.Log.v ( com.android.server.wifi.WifiConfigManager.TAG , ( "Handling user unlock for " + userId ) ) ; } if ( ( userId == ( mCurrentUserId ) ) && ( mPendingUnlockStoreRead ) ) { loadFromStoreAndMigrateAfterUserSwitch ( mCurrentUserId ) ; } }

Target:
private void clearInternalUserData ( int userId ) { for ( android.net.wifi.WifiConfiguration config : getInternalConfiguredNetworks ( ) ) { if ( ( ! ( config.shared ) ) && ( com.android.server.wifi.WifiConfigurationUtil.doesUidBelongToAnyProfile ( config.creatorUid , mUserManager.getProfiles ( userId ) ) ) ) { mConfiguredNetworks.remove ( config.networkId ) ; } } mDeletedEphemeralSSIDs.clear ( ) ; mScanDetailCaches.clear ( ) ; clearLastSelectedNetwork ( ) ; }
Source:
private void checkColorCompletion ( java.lang.String name , java.lang.String caretLocation ) throws java.lang.Exception { org.eclipse.core.resources.IFile file = getTestDataFile ( getProject ( ) , name , ( ( ( ( ( com.android.sdklib.SdkConstants.FD_RES ) + "/" ) + ( com.android.AndroidConstants.FD_RES_COLOR ) ) + "/" ) + name ) ) ; org.eclipse.ui.ide.IDE.setDefaultEditor ( file , ColorEditorDelegate.LEGACY_EDITOR_ID ) ; checkCompletion ( name , file , caretLocation , new com.android.ide.eclipse.adt.internal.editors.color.ColorContentAssist ( ) ) ; }

Target:
private void checkColorCompletion ( java.lang.String name , java.lang.String caretLocation ) throws java.lang.Exception { org.eclipse.core.resources.IFile file = getTestDataFile ( getProject ( ) , name , ( ( ( ( ( com.android.sdklib.SdkConstants.FD_RES ) + "/" ) + ( com.android.AndroidConstants.FD_RES_COLOR ) ) + "/" ) + name ) ) ; org.eclipse.ui.ide.IDE.setDefaultEditor ( file , CommonXmlEditor.ID ) ; checkCompletion ( name , file , caretLocation , new com.android.ide.eclipse.adt.internal.editors.color.ColorContentAssist ( ) ) ; }
Source:
public void processDisconnectReason ( com.android.ims.ImsReasonInfo imsReasonInfo ) { if ( ( ( imsReasonInfo.mCode ) == ( imsReasonInfo.CODE_REGISTRATION_ERROR ) ) && ( ( imsReasonInfo.mExtraMessage ) != null ) ) { if ( com.android.ims.ImsManager.getInstance ( mContext , mPhoneId ) . isWfcEnabledByUser ( ) ) { processWfcDisconnectForNotification ( imsReasonInfo ) ; } } }

Target:
public void processDisconnectReason ( android.telephony.ims.ImsReasonInfo imsReasonInfo ) { if ( ( ( imsReasonInfo.mCode ) == ( imsReasonInfo.CODE_REGISTRATION_ERROR ) ) && ( ( imsReasonInfo.mExtraMessage ) != null ) ) { if ( com.android.ims.ImsManager.getInstance ( mContext , mPhoneId ) . isWfcEnabledByUser ( ) ) { processWfcDisconnectForNotification ( imsReasonInfo ) ; } } }
Source:
public void markChecked_missingRowBehavior ( ) { com.android.server.timezone.CheckToken token1 = mPackageStatusStorage.generateCheckToken ( com.android.server.timezone.PackageStatusStorageTest.VALID_PACKAGE_VERSIONS ) ; org.junit.Assert.assertNotNull ( token1 ) ; org.junit.Assert.assertNotNull ( mPackageStatusStorage.getPackageStatus ( ) ) ; mPackageStatusStorage.deleteRowForTests ( ) ; org.junit.Assert.assertFalse ( mPackageStatusStorage.markChecked ( token1 , true ) ) ; com.android.server.timezone.CheckToken token2 = mPackageStatusStorage.generateCheckToken ( com.android.server.timezone.PackageStatusStorageTest.VALID_PACKAGE_VERSIONS ) ; junit.framework.Assert.assertTrue ( mPackageStatusStorage.markChecked ( token2 , true ) ) ; }

Target:
public void markChecked_missingFileBehavior ( ) { com.android.server.timezone.CheckToken token1 = mPackageStatusStorage.generateCheckToken ( com.android.server.timezone.PackageStatusStorageTest.VALID_PACKAGE_VERSIONS ) ; org.junit.Assert.assertNotNull ( token1 ) ; org.junit.Assert.assertNotNull ( mPackageStatusStorage.getPackageStatus ( ) ) ; mPackageStatusStorage.deleteFileForTests ( ) ; org.junit.Assert.assertFalse ( mPackageStatusStorage.markChecked ( token1 , true ) ) ; com.android.server.timezone.CheckToken token2 = mPackageStatusStorage.generateCheckToken ( com.android.server.timezone.PackageStatusStorageTest.VALID_PACKAGE_VERSIONS ) ; junit.framework.Assert.assertTrue ( mPackageStatusStorage.markChecked ( token2 , true ) ) ; }
Source:
protected void finalize ( ) throws java.io.IOException { if ( ( guard ) != null ) { guard.warnIfOpen ( ) ; } close ( ) ; }

Target:
protected void finalize ( ) throws java.io.IOException { if ( ( guard ) != null ) { if ( guard.isOpen ( ) ) { java.lang.System.logE ( ( ( ( "Open AbstractPlainSocketImpl: fd=" + ( fd.getInt$ ( ) ) ) + ", closed: " ) + ( socket.isClosed ( ) ) ) ) ; } guard.warnIfOpen ( ) ; } close ( ) ; }
Source:
private static java.lang.String secureHash ( byte [ ] input ) { java.security.MessageDigest messageDigest ; try { messageDigest = java.security.MessageDigest.getInstance ( "SHA-1" ) ; } catch ( java.security.NoSuchAlgorithmException e ) { return "####" ; } byte [ ] result = messageDigest.digest ( input ) ; return android.util.Base64.encodeToString ( result , ( ( ( android.util.Base64.URL_SAFE ) | ( android.util.Base64.NO_PADDING ) ) | ( android.util.Base64.NO_WRAP ) ) ) ; }

Target:
private static java.lang.String secureHash ( byte [ ] input ) { if ( android.telephony.Rlog.USER_BUILD ) { return "****" ; } java.security.MessageDigest messageDigest ; try { messageDigest = java.security.MessageDigest.getInstance ( "SHA-1" ) ; } catch ( java.security.NoSuchAlgorithmException e ) { return "####" ; } byte [ ] result = messageDigest.digest ( input ) ; return android.util.Base64.encodeToString ( result , ( ( ( android.util.Base64.URL_SAFE ) | ( android.util.Base64.NO_PADDING ) ) | ( android.util.Base64.NO_WRAP ) ) ) ; }
Source:
public void connectWithCaptivePortal ( java.lang.String redirectUrl ) { mWrappedNetworkMonitor.gen204ProbeResult = 200 ; mWrappedNetworkMonitor.gen204ProbeRedirectUrl = redirectUrl ; connect ( false ) ; com.android.server.ConnectivityServiceTest.waitFor ( new com.android.server.ConnectivityServiceTest.Criteria ( ) { public boolean get ( ) { android.net.NetworkCapabilities.NetworkCapabilities caps = mCm.getNetworkCapabilities ( getNetwork ( ) ) ; return ( caps != null ) && ( caps.hasCapability ( com.android.server.NET_CAPABILITY_CAPTIVE_PORTAL ) ) ; } } ) ; mWrappedNetworkMonitor.gen204ProbeResult = 500 ; mWrappedNetworkMonitor.gen204ProbeRedirectUrl = null ; }

Target:
public android.os.ConditionVariable getPreventReconnectReceived ( ) { return mPreventReconnectReceived ; }
Source:
public void testAesGcm128Udp4 ( ) throws java.lang.Exception { android.net.IpSecAlgorithm authCrypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_CRYPT_AES_GCM , android.net.cts.IpSecManagerTest.getKey ( 288 ) , 128 ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , null , null , authCrypt , false , 1 , false ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , null , null , authCrypt , false , 1 , true ) ; }

Target:
public void testCryptUdp6 ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , android.net.cts.IpSecManagerTest.CRYPT_KEY ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV6_LOOPBACK , crypt , null , false , 1 , false ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV6_LOOPBACK , crypt , null , false , 1 , true ) ; }
Source:
public void printDominatedObjects ( com.android.ahat.Doc doc , com.android.ahat.Query query , com.android.tools.perflib.heap.Instance inst ) { doc.section ( "Immediately Dominated Objects" ) ; java.util.List < com.android.tools.perflib.heap.Instance > instances = mSnapshot.getDominated ( inst ) ; if ( instances != null ) { com.android.ahat.DominatedList.render ( mSnapshot , doc , query , com.android.ahat.ObjectHandler.DOMINATED_OBJECTS_ID , instances ) ; } else { doc.println ( com.android.ahat.DocString.text ( "(none)" ) ) ; } }

Target:
public void printDominatedObjects ( com.android.ahat.Doc doc , com.android.ahat.Query query , com.android.ahat.heapdump.AhatInstance inst ) { doc.section ( "Immediately Dominated Objects" ) ; java.util.List < com.android.ahat.heapdump.AhatInstance > instances = inst.getDominated ( ) ; if ( instances != null ) { com.android.ahat.DominatedList.render ( mSnapshot , doc , query , com.android.ahat.ObjectHandler.DOMINATED_OBJECTS_ID , instances ) ; } else { doc.println ( com.android.ahat.DocString.text ( "(none)" ) ) ; } }
Source:
public com.android.sdklib.AndroidVersion getAndroidVersion ( ) { return version ; }

Target:
public static com.android.sdklib.repository.descriptors.PkgDesc.Builder newPlatform ( @ com.android.annotations.NonNull com.android.sdklib.AndroidVersion version , @ com.android.annotations.NonNull com.android.sdklib.repository.MajorRevision revision , @ com.android.annotations.NonNull com.android.sdklib.repository.FullRevision minToolsRev ) { com.android.sdklib.repository.descriptors.PkgDesc.Builder p = new com.android.sdklib.repository.descriptors.PkgDesc.Builder ( PkgType.PKG_PLATFORMS ) ; p.mAndroidVersion = version ; p.mMajorRevision = revision ; p.mMinToolsRev = minToolsRev ; p.mCustomPath = new com.android.sdklib.repository.descriptors.PkgDesc.IGetPath ( ) { @ java.lang.Override public java.lang.String getPath ( com.android.sdklib.repository.descriptors.PkgDesc thisPkgDesc ) { return com.android.sdklib.AndroidTargetHash.getPlatformHashString ( thisPkgDesc.getAndroidVersion ( ) ) ; } } ; return p ; }
Source:
private boolean stopLazyRoam ( ) { boolean status ; if ( ! ( useHalBasedAutoJoinOffload ( ) ) ) return false ; if ( com.android.server.wifi.WifiStateMachine.DBG ) { android.util.Log.e ( com.android.server.wifi.WifiStateMachine.TAG , "stopLazyRoam" ) ; } return com.android.server.wifi.WifiNative.setLazyRoam ( false , null ) ; }

Target:
private void handleSupplicantConnectionLoss ( boolean killSupplicant ) { if ( killSupplicant ) { mWifiMonitor.stopAllMonitoring ( ) ; try { if ( ! ( mClientInterface.disableSupplicant ( ) ) ) { loge ( "Failed to disable supplicant after connection loss" ) ; } } catch ( android.os.RemoteException e ) { } } mWifiNative.closeSupplicantConnection ( ) ; sendSupplicantConnectionChangedBroadcast ( false ) ; setWifiState ( android.net.wifi.WifiManager.WIFI_STATE_DISABLED ) ; }
Source:
public void dumpService ( java.io.FileDescriptor fd , android.os.IBinder servicetoken , java.lang.String [ ] args ) { android.app.ActivityThread.DumpComponentInfo data = new android.app.ActivityThread.DumpComponentInfo ( ) ; try { data.fd = android.os.ParcelFileDescriptor.dup ( fd ) ; data.token = servicetoken ; data.args = args ; queueOrSendMessage ( android.app.ActivityThread.H.DUMP_SERVICE , data ) ; } catch ( java.io.IOException e ) { android.util.Slog.w ( android.app.ActivityThread.TAG , "dumpService failed" , e ) ; } }

Target:
public void dumpService ( java.io.FileDescriptor fd , android.os.IBinder servicetoken , java.lang.String [ ] args ) { android.app.ActivityThread.DumpComponentInfo data = new android.app.ActivityThread.DumpComponentInfo ( ) ; try { data.fd = android.os.ParcelFileDescriptor.dup ( fd ) ; data.token = servicetoken ; data.args = args ; sendMessage ( android.app.ActivityThread.H.DUMP_SERVICE , data , 0 , 0 , true ) ; } catch ( java.io.IOException e ) { android.util.Slog.w ( android.app.ActivityThread.TAG , "dumpService failed" , e ) ; } }
Source:
public void stopPlayback ( ) { if ( ( mMediaPlayer ) != null ) { mMediaPlayer.stop ( ) ; mMediaPlayer.release ( ) ; mMediaPlayer = null ; mCurrentState = android.widget.VideoView.STATE_IDLE ; mTargetState = android.widget.VideoView.STATE_IDLE ; } }

Target:
public void stopPlayback ( ) { if ( ( mMediaPlayer ) != null ) { mMediaPlayer.stop ( ) ; mMediaPlayer.release ( ) ; mMediaPlayer = null ; mCurrentState = android.widget.VideoView.STATE_IDLE ; mTargetState = android.widget.VideoView.STATE_IDLE ; android.media.AudioManager am = ( ( android.media.AudioManager ) ( mContext.getSystemService ( Context.AUDIO_SERVICE ) ) ) ; am.abandonAudioFocus ( null ) ; } }
Source:
synchronized void registerChunkHandler ( int type , com.android.ddmlib.ChunkHandler handler ) { if ( ( com.android.ddmlib.MonitorThread.mInstance ) == null ) { return ; } synchronized ( mHandlerMap ) { if ( ( mHandlerMap.get ( type ) ) == null ) { mHandlerMap.put ( type , handler ) ; } } }

Target:
synchronized void registerChunkHandler ( int type , com.android.ddmlib.ChunkHandler handler ) { if ( ( com.android.ddmlib.MonitorThread.sInstance ) == null ) { return ; } synchronized ( mHandlerMap ) { if ( ( mHandlerMap.get ( type ) ) == null ) { mHandlerMap.put ( type , handler ) ; } } }
Source:
public void test_SSLEngine_setEnableSessionCreation_server ( ) throws java.lang.Exception { libcore.javax.net.ssl.TestSSLEnginePair p = libcore.javax.net.ssl.TestSSLEnginePair.create ( new libcore.javax.net.ssl.TestSSLEnginePair.Hooks ( ) { @ java.lang.Override void beforeBeginHandshake ( javax.net.ssl.SSLEngine client , javax.net.ssl.SSLEngine server ) { server.setEnableSessionCreation ( false ) ; } } ) ; assertNotConnected ( p ) ; }

Target:
public void test_SSLEngine_setEnableSessionCreation_server ( ) throws java.lang.Exception { try { libcore.javax.net.ssl.TestSSLEnginePair p = libcore.javax.net.ssl.TestSSLEnginePair.create ( new libcore.javax.net.ssl.TestSSLEnginePair.Hooks ( ) { @ java.lang.Override void beforeBeginHandshake ( javax.net.ssl.SSLEngine client , javax.net.ssl.SSLEngine server ) { server.setEnableSessionCreation ( false ) ; } } ) ; assertTrue ( StandardNames.IS_RI ) ; assertNotConnected ( p ) ; } catch ( javax.net.ssl.SSLException maybeExpected ) { assertFalse ( StandardNames.IS_RI ) ; } }
Source:
public void startVariant ( final com.android.build.gradle.internal.ApplicationVariant variant ) { if ( hasConfigs ) { getTextOutput ( ) . println ( ) ; } hasConfigs = true ; renderer = new org.gradle.api.tasks.diagnostics.internal.GraphRenderer ( getTextOutput ( ) ) ; renderer.visit ( new org.gradle.api.Action < org.gradle.logging.StyledTextOutput > ( ) { @ java.lang.Override public void execute ( org.gradle.logging.StyledTextOutput styledTextOutput ) { getTextOutput ( ) . withStyle ( org.gradle.logging.StyledTextOutput.Style.Identifier ) . text ( variant.getName ( ) ) ; getTextOutput ( ) . withStyle ( org.gradle.logging.StyledTextOutput.Style.Description ) . text ( "" ) ; } } , true ) ; }

Target:
public void startVariant ( final com.android.build.gradle.internal.ApplicationVariant variant ) { if ( hasConfigs ) { getTextOutput ( ) . println ( ) ; } hasConfigs = true ; renderer = new org.gradle.internal.graph.GraphRenderer ( getTextOutput ( ) ) ; renderer.visit ( new org.gradle.api.Action < org.gradle.logging.StyledTextOutput > ( ) { @ java.lang.Override public void execute ( org.gradle.logging.StyledTextOutput styledTextOutput ) { getTextOutput ( ) . withStyle ( org.gradle.logging.StyledTextOutput.Style.Identifier ) . text ( variant.getName ( ) ) ; getTextOutput ( ) . withStyle ( org.gradle.logging.StyledTextOutput.Style.Description ) . text ( "" ) ; } } , true ) ; }
Source:
private static void assertCdmaDeviceId ( java.lang.String deviceId ) { if ( ( deviceId.length ( ) ) == 14 ) { android.telephony.cts.TelephonyManagerTest.assertHexadecimalMeidFormat ( deviceId ) ; android.telephony.cts.TelephonyManagerTest.assertReportingBodyIdentifier ( deviceId , false ) ; } else if ( ( deviceId.length ( ) ) == 8 ) { android.telephony.cts.TelephonyManagerTest.assertHexadecimalEsnFormat ( deviceId ) ; } else { fail ( "device id on CDMA must be 14-digit hex MEID or 8-digit hex ESN." ) ; } }

Target:
private static void assertCdmaDeviceId ( java.lang.String deviceId ) { if ( ( deviceId.length ( ) ) == 14 ) { android.telephony.cts.TelephonyManagerTest.assertMeidFormat ( deviceId ) ; } else if ( ( deviceId.length ( ) ) == 8 ) { android.telephony.cts.TelephonyManagerTest.assertHexadecimalEsnFormat ( deviceId ) ; } else { fail ( "device id on CDMA must be 14-digit hex MEID or 8-digit hex ESN." ) ; } }
Source:
public void testInstall_withBadlyFormedRevision ( ) throws java.lang.Exception { libcore.tzdata.update2.BundleVersion validBundleVersion = new libcore.tzdata.update2.BundleVersion ( 1 , 1 , libcore.tzdata.update2.TimeZoneBundleInstallerTest.NEW_RULES_VERSION , 1 ) ; byte [ ] invalidRevisionBytes = validBundleVersion.toBytes ( ) ; invalidRevisionBytes [ ( ( invalidRevisionBytes.length ) - 3 ) ] = 'A' ; libcore.tzdata.update2.TimeZoneBundle bundle = libcore.tzdata.update2.TimeZoneBundleInstallerTest.createTimeZoneBundleWithVersionBytes ( invalidRevisionBytes ) ; assertEquals ( TimeZoneBundleInstaller.INSTALL_FAIL_BAD_BUNDLE_STRUCTURE , installer.installWithErrorCode ( bundle.getBytes ( ) ) ) ; assertNoContentInstalled ( ) ; }

Target:
public void testInstall_withBadlyFormedRevision ( ) throws java.lang.Exception { libcore.tzdata.update2.DistroVersion validDistroVersion = new libcore.tzdata.update2.DistroVersion ( 1 , 1 , libcore.tzdata.update2.TimeZoneBundleInstallerTest.NEW_RULES_VERSION , 1 ) ; byte [ ] invalidRevisionBytes = validDistroVersion.toBytes ( ) ; invalidRevisionBytes [ ( ( invalidRevisionBytes.length ) - 3 ) ] = 'A' ; libcore.tzdata.update2.TimeZoneDistro distro = libcore.tzdata.update2.TimeZoneBundleInstallerTest.createTimeZoneDistroWithVersionBytes ( invalidRevisionBytes ) ; assertEquals ( TimeZoneBundleInstaller.INSTALL_FAIL_BAD_DISTRO_STRUCTURE , installer.installWithErrorCode ( distro.getBytes ( ) ) ) ; assertNoContentInstalled ( ) ; }
Source:
private void onBatteryLevel ( int level ) { com.android.bluetooth.hfpclient.HeadsetClientStateMachine.StackEvent event = new com.android.bluetooth.hfpclient.HeadsetClientStateMachine.StackEvent ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.EVENT_TYPE_BATTERY_LEVEL ) ; event.valueInt = level ; android.util.Log.d ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.TAG , ( "incoming" + event ) ) ; sendMessage ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.STACK_EVENT , event ) ; }

Target:
private void onVolumeChange ( int type , int volume ) { com.android.bluetooth.hfpclient.HeadsetClientStateMachine.StackEvent event = new com.android.bluetooth.hfpclient.HeadsetClientStateMachine.StackEvent ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.EVENT_TYPE_VOLUME_CHANGED ) ; event.valueInt = type ; event.valueInt2 = volume ; if ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.DBG ) { android.util.Log.d ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.TAG , ( "incoming" + event ) ) ; } sendMessage ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.STACK_EVENT , event ) ; }
Source:
public static java.net.InetSocketAddress getLocalInetSocketAddress ( java.io.FileDescriptor fd ) throws java.net.SocketException { try { java.net.SocketAddress socketAddress = Libcore.os.getsockname ( fd ) ; if ( ( socketAddress != null ) && ( ! ( socketAddress instanceof java.net.InetSocketAddress ) ) ) { throw new java.net.SocketException ( ( "Unsupported address type: " + ( socketAddress.getClass ( ) ) ) ) ; } return ( ( java.net.InetSocketAddress ) ( socketAddress ) ) ; } catch ( android.system.ErrnoException errnoException ) { throw errnoException.rethrowAsSocketException ( ) ; } }

Target:
public static java.net.InetSocketAddress getLocalInetSocketAddress ( java.io.FileDescriptor fd ) throws java.net.SocketException { try { java.net.SocketAddress socketAddress = Libcore.os.getsockname ( fd ) ; if ( ( socketAddress != null ) && ( ! ( socketAddress instanceof java.net.InetSocketAddress ) ) ) { throw new java.net.SocketException ( ( ( "Socket assumed to be pending closure: Expected sockname " + "to be an InetSocketAddress, got " ) + ( socketAddress.getClass ( ) ) ) ) ; } return ( ( java.net.InetSocketAddress ) ( socketAddress ) ) ; } catch ( android.system.ErrnoException errnoException ) { throw errnoException.rethrowAsSocketException ( ) ; } }