auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void onSurfaceTextureAvailable ( android.graphics.SurfaceTexture surface , int width , int height ) { mPreviewTexture = surface ; mPreviewTexWidth = width ; mPreviewTexHeight = height ; if ( ( mCamera ) != null ) { startPreview ( ) ; } }

Target:
public void onSurfaceTextureAvailable ( android.graphics.SurfaceTexture surface , int width , int height ) { mPreviewTexture = surface ; if ( ( ( mFormatView.getMeasuredWidth ( ) ) != width ) || ( ( mFormatView.getMeasuredHeight ( ) ) != height ) ) { mPreviewTexWidth = mFormatView.getMeasuredWidth ( ) ; mPreviewTexHeight = mFormatView.getMeasuredHeight ( ) ; } else { mPreviewTexWidth = width ; mPreviewTexHeight = height ; } if ( ( mCamera ) != null ) { startPreview ( ) ; } }
Source:
public final void onSmsStatusReportReceived ( int messageRef , java.lang.String format , byte [ ] pdu ) { synchronized ( mLock ) { if ( ( mListener ) == null ) { throw new java.lang.IllegalStateException ( "Feature not ready." ) ; } try { mListener.onSmsStatusReportReceived ( messageRef , format , pdu ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.telephony.ims.internal.SmsImplBase.LOG_TAG , ( "Can not process sms status report: " + ( e.getMessage ( ) ) ) ) ; acknowledgeSmsReport ( messageRef , android.telephony.ims.internal.SmsImplBase.STATUS_REPORT_STATUS_ERROR ) ; } } }

Target:
public final void onSmsStatusReportReceived ( int token , int messageRef , java.lang.String format , byte [ ] pdu ) { synchronized ( mLock ) { if ( ( mListener ) == null ) { throw new java.lang.IllegalStateException ( "Feature not ready." ) ; } try { mListener.onSmsStatusReportReceived ( token , messageRef , format , pdu ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.telephony.ims.internal.SmsImplBase.LOG_TAG , ( "Can not process sms status report: " + ( e.getMessage ( ) ) ) ) ; acknowledgeSmsReport ( token , messageRef , android.telephony.ims.internal.SmsImplBase.STATUS_REPORT_STATUS_ERROR ) ; } } }
Source:
public android.webkit.WebBackForwardList restoreState ( final android.os.Bundle inState ) { mFactory.startYourEngines ( true ) ; if ( checkNeedsPost ( ) ) { android.webkit.WebBackForwardList ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < android.webkit.WebBackForwardList > ( ) { @ java.lang.Override public android.webkit.WebBackForwardList call ( ) { return restoreState ( inState ) ; } } ) ; return ret ; } if ( inState == null ) return null ; if ( ! ( mAwContents.restoreState ( inState ) ) ) return null ; return copyBackForwardList ( ) ; }

Target:
public void saveWebArchive ( final java.lang.String basename , final boolean autoname , final android.webkit.ValueCallback < java.lang.String > callback ) { if ( checkNeedsPost ( ) ) { mRunQueue.addTask ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { saveWebArchive ( basename , autoname , callback ) ; } } ) ; return ; } mAwContents.saveWebArchive ( basename , autoname , callback ) ; }
Source:
public com.android.sched.vfs.InputVFS checkString ( @ javax.annotation.Nonnull com.android.sched.util.codec.CodecContext context , @ javax.annotation.Nonnull final java.lang.String string ) throws com.android.sched.util.codec.ParsingException { try { com.android.sched.vfs.VFS vfs = new com.android.sched.vfs.DirectFS ( new com.android.sched.util.file.Directory ( context.getWorkingDirectory ( ) , string , context.getRunnableHooks ( ) , com.android.sched.util.file.FileOrDirectory.Existence.MUST_EXIST , com.android.sched.util.file.FileOrDirectory.Permission.READ , change ) , com.android.sched.util.file.FileOrDirectory.Permission.READ ) ; return new com.android.sched.vfs.GenericInputVFS ( vfs ) ; } catch ( java.io.IOException e ) { throw new com.android.sched.util.codec.ParsingException ( e.getMessage ( ) , e ) ; } }

Target:
public com.android.sched.vfs.InputVFS checkString ( @ javax.annotation.Nonnull com.android.sched.util.codec.CodecContext context , @ javax.annotation.Nonnull java.lang.String string ) throws com.android.sched.util.codec.ParsingException { com.android.sched.vfs.VFS vfs = directFSCodec.checkString ( context , string ) ; return new com.android.sched.vfs.GenericInputVFS ( vfs ) ; }
Source:
public void testBasicSourceProviders ( ) throws java.lang.Exception { com.android.build.gradle.model.AndroidProjectTest.ProjectData projectData = getModelForProject ( "basic" ) ; com.android.builder.model.AndroidProject model = projectData.model ; java.io.File projectDir = projectData.projectDir ; testDefaultSourceSets ( model , projectDir ) ; for ( com.android.builder.model.Variant variant : model.getVariants ( ) ) { com.android.builder.model.AndroidArtifact artifact = variant.getMainArtifact ( ) ; assertNull ( artifact.getVariantSourceProvider ( ) ) ; assertNull ( artifact.getMultiFlavorSourceProvider ( ) ) ; } }

Target:
public void testBasicSourceProviders ( ) throws java.lang.Exception { com.android.build.gradle.model.AndroidProjectTest.ProjectData projectData = getModelForProject ( "basic" ) ; com.android.builder.model.AndroidProject model = projectData.model ; java.io.File projectDir = projectData.projectDir ; com.android.build.gradle.model.AndroidProjectTest.testDefaultSourceSets ( model , projectDir ) ; for ( com.android.builder.model.Variant variant : model.getVariants ( ) ) { com.android.builder.model.AndroidArtifact artifact = variant.getMainArtifact ( ) ; assertNull ( artifact.getVariantSourceProvider ( ) ) ; assertNull ( artifact.getMultiFlavorSourceProvider ( ) ) ; } }
Source:
private void persistBluetoothSetting ( int value ) { Settings.Global.putInt ( mContext.getContentResolver ( ) , Settings.Global.BLUETOOTH_ON , value ) ; }

Target:
private void persistBluetoothSetting ( int value ) { if ( com.android.server.BluetoothManagerService.DBG ) android.util.Slog.d ( com.android.server.BluetoothManagerService.TAG , ( "Persisting Bluetooth Setting: " + value ) ) ; long callingIdentity = android.os.Binder.clearCallingIdentity ( ) ; Settings.Global.putInt ( mContext.getContentResolver ( ) , Settings.Global.BLUETOOTH_ON , value ) ; android.os.Binder.restoreCallingIdentity ( callingIdentity ) ; }
Source:
public void run ( ) { for ( int i = 0 ; ( i < ( componentNames.size ( ) ) ) && ( i < ( services.size ( ) ) ) ; i ++ ) { mRemoteConnectionManager.addConnectionService ( componentNames.get ( i ) , IConnectionService.Stub.asInterface ( services.get ( i ) ) ) ; } onAccountsInitialized ( ) ; android.telecom.Log.d ( this , ( "remote connection services found: " + services ) ) ; }

Target:
public void loggedRun ( ) { for ( int i = 0 ; ( i < ( componentNames.size ( ) ) ) && ( i < ( services.size ( ) ) ) ; i ++ ) { mRemoteConnectionManager.addConnectionService ( componentNames.get ( i ) , IConnectionService.Stub.asInterface ( services.get ( i ) ) ) ; } onAccountsInitialized ( ) ; android.telecom.Log.d ( this , ( "remote connection services found: " + services ) ) ; }
Source:
private void connectToWifi ( ) throws java.lang.InterruptedException { if ( ! ( mWifiManager.isWifiEnabled ( ) ) ) { android.net.http.cts.ApacheHttpClientTest.ConnectivityActionReceiver receiver = new android.net.http.cts.ApacheHttpClientTest.ConnectivityActionReceiver ( android.net.ConnectivityManager.TYPE_WIFI , android.net.NetworkInfo.State.CONNECTED ) ; android.content.IntentFilter filter = new android.content.IntentFilter ( ) ; filter.addAction ( ConnectivityManager.CONNECTIVITY_ACTION ) ; mContext.registerReceiver ( receiver , filter ) ; assertTrue ( mWifiManager.setWifiEnabled ( true ) ) ; assertTrue ( "Wifi must be configured to connect to an access point for this test." , receiver.waitForStateChange ( ) ) ; mContext.unregisterReceiver ( receiver ) ; } }

Target:
private void connectToWifi ( ) throws java.lang.InterruptedException { if ( ! ( mWifiManager.isWifiEnabled ( ) ) ) { android.net.http.cts.ApacheHttpClientTest.ConnectivityActionReceiver receiver = new android.net.http.cts.ApacheHttpClientTest.ConnectivityActionReceiver ( android.net.ConnectivityManager.TYPE_WIFI , android.net.NetworkInfo.State.CONNECTED ) ; android.content.IntentFilter filter = new android.content.IntentFilter ( ) ; filter.addAction ( ConnectivityManager.CONNECTIVITY_ACTION ) ; mContext.registerReceiver ( receiver , filter ) ; assertTrue ( mWifiManager.setWifiEnabled ( true ) ) ; assertTrue ( "[RERUN] Wifi must be configured to connect to an access point for this test." , receiver.waitForStateChange ( ) ) ; mContext.unregisterReceiver ( receiver ) ; } }
Source:
public static com.android.server.connectivity.DnsManager.PrivateDnsConfig tryBlockingResolveOf ( android.net.Network network , java.lang.String name ) { final android.system.StructAddrinfo hints = new android.system.StructAddrinfo ( ) ; hints.ai_flags = 0 ; hints.ai_family = android.system.OsConstants.AF_UNSPEC ; hints.ai_socktype = android.system.OsConstants.SOCK_DGRAM ; try { final java.net.InetAddress [ ] ips = Libcore.os.android_getaddrinfo ( name , hints , network.netId ) ; if ( ( ips != null ) && ( ( ips.length ) > 0 ) ) { return new com.android.server.connectivity.DnsManager.PrivateDnsConfig ( name , ips ) ; } } catch ( android.system.GaiException ignored ) { } return null ; }

Target:
public void removeNetwork ( android.net.Network network ) { mPrivateDnsMap.remove ( network.netId ) ; mPrivateDnsValidationMap.remove ( network.netId ) ; }
Source:
void expectAvailableCallbacks ( com.android.server.ConnectivityServiceTest.MockNetworkAgent agent , boolean expectSuspended , int timeoutMs ) { expectCallback ( com.android.server.ConnectivityServiceTest.CallbackState.AVAILABLE , agent , timeoutMs ) ; if ( expectSuspended ) { expectCallback ( com.android.server.ConnectivityServiceTest.CallbackState.SUSPENDED , agent , timeoutMs ) ; } expectCallback ( com.android.server.ConnectivityServiceTest.CallbackState.NETWORK_CAPABILITIES , agent , timeoutMs ) ; expectCallback ( com.android.server.ConnectivityServiceTest.CallbackState.LINK_PROPERTIES , agent , timeoutMs ) ; }

Target:
void expectAvailableCallbacksUnvalidated ( com.android.server.ConnectivityServiceTest.MockNetworkAgent agent ) { expectAvailableCallbacks ( agent , false , false , com.android.server.ConnectivityServiceTest.TestNetworkCallback.TIMEOUT_MS ) ; }
Source:
void copy3DRangeFromUnchecked ( int xoff , int yoff , int zoff , int w , int h , int d , short [ ] data ) { mRS.validate ( ) ; validate3DRange ( xoff , yoff , zoff , w , h , d ) ; mRS.nAllocationData3D ( getIDSafe ( ) , xoff , yoff , zoff , mSelectedLOD , w , h , d , data , ( ( data.length ) * 2 ) ) ; }

Target:
void copy3DRangeFromUnchecked ( int xoff , int yoff , int zoff , int w , int h , int d , short [ ] data ) { mRS.validate ( ) ; validate3DRange ( xoff , yoff , zoff , w , h , d ) ; mRS.nAllocationData3D ( getIDSafe ( ) , xoff , yoff , zoff , mSelectedLOD , w , h , d , data , ( ( data.length ) * 2 ) , Element.DataType.SIGNED_16 ) ; }
Source:
private static void createOngoingCallChannel ( @ android.support.annotation.NonNull android.content.Context context ) { android.app.NotificationChannel channel = new android.app.NotificationChannel ( NotificationChannelId.ONGOING_CALL , context.getText ( R.string.notification_channel_ongoing_call ) , android.app.NotificationManager.IMPORTANCE_MAX ) ; channel.setShowBadge ( false ) ; channel.enableLights ( false ) ; channel.enableVibration ( false ) ; channel.setSound ( null , new android.media.AudioAttributes.Builder ( ) . setUsage ( AudioAttributes.USAGE_NOTIFICATION ) . build ( ) ) ; context.getSystemService ( android.app.NotificationManager.class ) . createNotificationChannel ( channel ) ; }

Target:
private static void createOngoingCallChannel ( @ android.support.annotation.NonNull android.content.Context context ) { android.app.NotificationChannel channel = new android.app.NotificationChannel ( NotificationChannelId.ONGOING_CALL , context.getText ( R.string.notification_channel_ongoing_call ) , android.app.NotificationManager.IMPORTANCE_DEFAULT ) ; channel.setShowBadge ( false ) ; channel.enableLights ( false ) ; channel.enableVibration ( false ) ; channel.setSound ( null , new android.media.AudioAttributes.Builder ( ) . setUsage ( AudioAttributes.USAGE_NOTIFICATION ) . build ( ) ) ; context.getSystemService ( android.app.NotificationManager.class ) . createNotificationChannel ( channel ) ; }
Source:
public void tesUiccProfileInfoSanity ( ) { org.junit.Assert.assertEquals ( 0 , mUiccProfile.getNumApplications ( ) ) ; org.junit.Assert.assertNull ( mUiccProfile.getUniversalPinState ( ) ) ; org.junit.Assert.assertNull ( mUiccProfile.getOperatorBrandOverride ( ) ) ; for ( com.android.internal.telephony.uicc.IccCardApplicationStatus.AppType mAppType : IccCardApplicationStatus.AppType.values ( ) ) { org.junit.Assert.assertFalse ( mUiccProfile.isApplicationOnIcc ( mAppType ) ) ; } }

Target:
public void tesUiccProfileInfoSanity ( ) { org.junit.Assert.assertEquals ( 1 , mUiccProfile.getNumApplications ( ) ) ; org.junit.Assert.assertNull ( mUiccProfile.getUniversalPinState ( ) ) ; org.junit.Assert.assertNull ( mUiccProfile.getOperatorBrandOverride ( ) ) ; for ( com.android.internal.telephony.uicc.IccCardApplicationStatus.AppType mAppType : IccCardApplicationStatus.AppType.values ( ) ) { if ( mAppType == ( IccCardApplicationStatus.AppType.APPTYPE_USIM ) ) { org.junit.Assert.assertTrue ( mUiccProfile.isApplicationOnIcc ( mAppType ) ) ; } else { org.junit.Assert.assertFalse ( mUiccProfile.isApplicationOnIcc ( mAppType ) ) ; } } }
Source:
public void handleMessage ( android.os.Message msg ) { switch ( msg.what ) { case com.android.bluetooth.avrcp.AvrcpControllerService.MESSAGE_SEND_PASS_THROUGH_CMD : if ( com.android.bluetooth.avrcp.AvrcpControllerService.DBG ) android.util.Log.v ( com.android.bluetooth.avrcp.AvrcpControllerService.TAG , "MESSAGE_SEND_PASS_THROUGH_CMD" ) ; android.bluetooth.BluetoothDevice device = ( ( android.bluetooth.BluetoothDevice ) ( msg.obj ) ) ; sendPassThroughCommandNative ( getByteAddress ( device ) , msg.arg1 , msg.arg2 ) ; break ; } }

Target:
public android.media.session.PlaybackState getPlaybackState ( android.bluetooth.BluetoothDevice device ) { if ( com.android.bluetooth.avrcp.AvrcpControllerService.DBG ) android.util.Log.d ( com.android.bluetooth.avrcp.AvrcpControllerService.TAG , ( "getPlayBackState device = " + device ) ) ; enforceCallingOrSelfPermission ( com.android.bluetooth.avrcp.BLUETOOTH_PERM , "Need BLUETOOTH permission" ) ; return getCurrentPlayBackState ( ) ; }
Source:
com.google.devtools.common.options.OptionsParser.OptionDescription getOptionDescription ( java.lang.String name ) { java.lang.reflect.Field field = optionsData.getFieldFromName ( name ) ; if ( field == null ) { return null ; } com.google.devtools.common.options.Option optionAnnotation = field.getAnnotation ( com.google.devtools.common.options.Option.class ) ; return new com.google.devtools.common.options.OptionsParser.OptionDescription ( name , optionsData.getDefaultValue ( field ) , optionsData.getConverter ( field ) , optionAnnotation.allowMultiple ( ) ) ; }

Target:
com.google.devtools.common.options.OptionsParser.OptionDescription getOptionDescription ( java.lang.String name ) throws com.google.devtools.common.options.OptionsParsingException { java.lang.reflect.Field field = optionsData.getFieldFromName ( name ) ; if ( field == null ) { return null ; } com.google.devtools.common.options.Option optionAnnotation = field.getAnnotation ( com.google.devtools.common.options.Option.class ) ; return new com.google.devtools.common.options.OptionsParser.OptionDescription ( name , optionsData.getDefaultValue ( field ) , optionsData.getConverter ( field ) , optionsData.getAllowMultiple ( field ) , getExpansionDescriptions ( optionsData.getEvaluatedExpansion ( field ) , name , null ) , getExpansionDescriptions ( optionAnnotation.implicitRequirements ( ) , null , name ) ) ; }
Source:
private static com.android.tv.dvr.ScheduledRecording findReplaceableRecording ( java.util.List < com.android.tv.dvr.ScheduledRecording > recordings , com.android.tv.dvr.ScheduledRecording schedule ) { com.android.tv.dvr.ScheduledRecording candidate = null ; for ( com.android.tv.dvr.ScheduledRecording recording : recordings ) { if ( ( schedule.getPriority ( ) ) > ( recording.getPriority ( ) ) ) { if ( ( candidate == null ) || ( ( com.android.tv.dvr.DvrScheduleManager.CANDIDATE_COMPARATOR.compare ( candidate , recording ) ) > 0 ) ) { candidate = recording ; } } } return candidate ; }

Target:
private static com.android.tv.dvr.data.ScheduledRecording findReplaceableRecording ( java.util.List < com.android.tv.dvr.data.ScheduledRecording > recordings , com.android.tv.dvr.data.ScheduledRecording schedule ) { com.android.tv.dvr.data.ScheduledRecording candidate = null ; for ( com.android.tv.dvr.data.ScheduledRecording recording : recordings ) { if ( ( schedule.getPriority ( ) ) > ( recording.getPriority ( ) ) ) { if ( ( candidate == null ) || ( ( com.android.tv.dvr.DvrScheduleManager.CANDIDATE_COMPARATOR.compare ( candidate , recording ) ) > 0 ) ) { candidate = recording ; } } } return candidate ; }
Source:
public void onServicesUpdated ( ) { boolean changed = false ; synchronized ( mLock ) { if ( ( mForegroundCurrent ) != null ) { if ( ! ( isForegroundAllowedLocked ( mForegroundCurrent ) ) ) { android.util.Log.d ( com.android.nfc.cardemulation.PreferredServices.TAG , "Removing foreground preferred service because of conflict." ) ; mForegroundRequested = null ; mForegroundUid = - 1 ; changed = true ; } } else { } } if ( changed ) { computePreferredForegroundService ( ) ; } }

Target:
public void onServicesUpdated ( ) { boolean changed = false ; synchronized ( mLock ) { if ( ( mForegroundCurrent ) != null ) { if ( ! ( isForegroundAllowedLocked ( mForegroundCurrent ) ) ) { android.util.Log.d ( com.android.nfc.cardemulation.PreferredServices.TAG , "Removing foreground preferred service." ) ; mForegroundRequested = null ; mForegroundUid = - 1 ; changed = true ; } } else { } } if ( changed ) { computePreferredForegroundService ( ) ; } }
Source:
private static void testPackagePrivate ( ) { try { java.lang.Class < ? > c = java.lang.Class.forName ( "sub.PPClass" ) ; java.lang.reflect.Constructor cons = c.getConstructor ( ) ; cons.newInstance ( ) ; throw new java.lang.RuntimeException ( "Expected IllegalAccessException." ) ; } catch ( java.lang.IllegalAccessException e ) { } catch ( java.lang.Exception e ) { e.printStackTrace ( ) ; } }

Target:
private static void testPackagePrivateConstructor ( ) { try { java.lang.Class < ? > c = java.lang.Class.forName ( "sub.PPClass" ) ; java.lang.reflect.Constructor cons = c.getConstructor ( ) ; cons.newInstance ( ) ; throw new java.lang.RuntimeException ( "Expected IllegalAccessException." ) ; } catch ( java.lang.IllegalAccessException e ) { } catch ( java.lang.Exception e ) { e.printStackTrace ( ) ; } }
Source:
private void responseHardwareConfig ( android.hardware.radio.V1_0.RadioResponseInfo responseInfo , java.util.ArrayList < com.android.internal.telephony.V1_0.HardwareConfig > config ) { com.android.internal.telephony.RILRequest rr = mRil.processResponse ( responseInfo ) ; if ( rr != null ) { java.util.ArrayList < com.android.internal.telephony.HardwareConfig > ret = null ; if ( ( responseInfo.error ) == ( android.hardware.radio.V1_0.RadioError.NONE ) ) { ret = com.android.internal.telephony.RIL.convertHalHwConfigList ( config , mRil ) ; sendMessageResponse ( rr.mResult , ret ) ; } mRil.processResponseDone ( rr , responseInfo , ret ) ; } }

Target:
private void responseRadioCapability ( android.hardware.radio.V1_0.RadioResponseInfo responseInfo , com.android.internal.telephony.V1_0.RadioCapability rc ) { com.android.internal.telephony.RILRequest rr = mRil.processResponse ( responseInfo ) ; if ( rr != null ) { com.android.internal.telephony.RadioCapability ret = null ; if ( ( responseInfo.error ) == ( android.hardware.radio.V1_0.RadioError.NONE ) ) { ret = com.android.internal.telephony.RIL.convertHalRadioCapability ( rc , mRil ) ; com.android.internal.telephony.RadioResponse.sendMessageResponse ( rr.mResult , ret ) ; } mRil.processResponseDone ( rr , responseInfo , ret ) ; } }
Source:
public void checkLink ( java.lang.String lib ) { }

Target:
public void checkLink ( java.lang.String lib ) { if ( ( isRelevant ( ) ) && ( ( ( lib.indexOf ( '/' ) ) != ( - 1 ) ) || ( ( lib.indexOf ( '\\' ) ) != ( - 1 ) ) ) ) { throw com.android.ide.common.rendering.RenderSecurityException.create ( "Link" , lib ) ; } }
Source:
public static int IntNonmatCond_IntVarVar ( int a , int b , int x , int y ) { return a > b ? x : y ; }

Target:
public static int IntMatCond_IntVarVar ( int a , int b , int x , int y ) { if ( Main.doThrow ) { throw new java.lang.Error ( ) ; } int result = ( a > b ) ? x : y ; return result + ( a > b ? 0 : 1 ) ; }
Source:
void replyFailed ( android.os.Message msg , int reason , java.lang.String description ) { if ( ( msg.replyTo ) != null ) { android.os.Message reply = android.os.Message.obtain ( ) ; reply.what = android.net.wifi.WifiScanner.CMD_OP_FAILED ; reply.arg2 = msg.arg2 ; reply.obj = new android.net.wifi.WifiScanner.OperationResult ( reason , description ) ; try { msg.replyTo.send ( reply ) ; } catch ( android.os.RemoteException e ) { } } else { } }

Target:
void replyFailed ( android.os.Message msg , int reason , java.lang.String description ) { if ( ( msg.replyTo ) != null ) { android.os.Message reply = android.os.Message.obtain ( ) ; reply.what = android.net.wifi.WifiScanner.CMD_OP_FAILED ; reply.arg2 = msg.arg2 ; reply.obj = new android.net.wifi.WifiScanner.OperationResult ( reason , description ) ; try { msg.replyTo.send ( reply ) ; mLog.trace ( "replyFailed recvdMessage=% reason=%" ) . c ( msg.what ) . c ( reason ) . flush ( ) ; } catch ( android.os.RemoteException e ) { } } else { } }
Source:
public boolean isWifiCallingAvailable ( ) { try { return getITelephony ( ) . isWifiCallingAvailable ( ) ; } catch ( android.os.RemoteException ex ) { return false ; } catch ( java.lang.NullPointerException ex ) { return false ; } }

Target:
private void setUserMobileDataEnabled ( int subId , boolean enable ) { try { android.util.Log.d ( android.telephony.TelephonyManager.TAG , ( "setUserMobileDataEnabled: enabled=" + enable ) ) ; com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony != null ) telephony.setUserDataEnabled ( subId , enable ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.telephony.TelephonyManager.TAG , "Error calling ITelephony#setUserDataEnabled" , e ) ; } }
Source:
public boolean ping ( ) { java.lang.String pong = doStringCommand ( "PING" ) ; return ( pong != null ) && ( pong.equals ( "PONG" ) ) ; }

Target:
public void setSupplicantLogLevel ( boolean turnOnVerbose ) { if ( com.android.server.wifi.WifiNative.HIDL_SUP_ENABLE ) { int logLevel = ( turnOnVerbose ) ? SupplicantStaIfaceHal.LOG_LEVEL_DEBUG : SupplicantStaIfaceHal.LOG_LEVEL_INFO ; mSupplicantStaIfaceHal.setLogLevel ( logLevel ) ; } else { doStringCommand ( ( "LOG_LEVEL " + ( turnOnVerbose ? "DEBUG" : "INFO" ) ) ) ; } }
Source:
public void getPreferredVoicePrivacy ( android.os.Message result ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE , result ) ; send ( rr ) ; }

Target:
public void hangupWaitingOrBackground ( android.os.Message result ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND , result , mRILDefaultWorkSource ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; mMetrics.writeRilHangup ( mInstanceId , rr.mSerial , ( - 1 ) ) ; send ( rr ) ; }
Source:
public boolean isConnected ( android.bluetooth.BluetoothDevice device ) { if ( com.android.bluetooth.pbap.BluetoothPbapService.DEBUG ) { android.util.Log.d ( com.android.bluetooth.pbap.BluetoothPbapService.TAG , ( "isConnected " + device ) ) ; } com.android.bluetooth.pbap.BluetoothPbapService service = getService ( com.android.bluetooth.pbap.BluetoothPbapService.BLUETOOTH_PERM ) ; if ( service == null ) { return false ; } return ( ( service.getState ( ) ) == ( android.bluetooth.BluetoothProfile.STATE_CONNECTED ) ) && ( service.getRemoteDevice ( ) . equals ( device ) ) ; }

Target:
public int getConnectionState ( android.bluetooth.BluetoothDevice device ) { if ( com.android.bluetooth.pbap.BluetoothPbapService.DEBUG ) { android.util.Log.d ( com.android.bluetooth.pbap.BluetoothPbapService.TAG , ( "getConnectionState: " + device ) ) ; } com.android.bluetooth.pbap.BluetoothPbapService service = getService ( ) ; if ( service == null ) { return android.bluetooth.BluetoothAdapter.STATE_DISCONNECTED ; } return service.getConnectionState ( device ) ; }
Source:
public void notifyFailed ( ) { ( mRetryCounter ) ++ ; long temp = java.lang.Math.min ( mMaximumDelayMs , ( ( long ) ( ( mStartDelayMs ) * ( java.lang.Math.pow ( mMultiplier , mRetryCounter ) ) ) ) ) ; mCurrentDelayMs = ( ( long ) ( ( ( 1 + ( java.lang.Math.random ( ) ) ) / 2 ) * temp ) ) ; mHandler.removeCallbacks ( mRunnable ) ; mHandler.postDelayed ( mRunnable , mCurrentDelayMs ) ; }

Target:
public void start ( ) { mRetryCounter = 0 ; mCurrentDelayMs = mStartDelayMs ; mHandlerAdapter.removeCallbacks ( mRunnable ) ; mHandlerAdapter.postDelayed ( mRunnable , mCurrentDelayMs ) ; }
Source:
void setBound ( boolean flag ) { isBound = flag ; }

Target:
void onBind ( boolean updateSocketState ) { java.net.SocketAddress sa ; try { sa = Libcore.os.getsockname ( fd ) ; } catch ( libcore.io.ErrnoException errnoException ) { throw new java.lang.AssertionError ( errnoException ) ; } isBound = true ; java.net.InetSocketAddress localSocketAddress = ( ( java.net.InetSocketAddress ) ( sa ) ) ; localAddress = localSocketAddress.getAddress ( ) ; localPort = localSocketAddress.getPort ( ) ; if ( updateSocketState && ( ( socket ) != null ) ) { socket.onBind ( localAddress , localPort ) ; } }
Source:
public void testClearFormData ( ) throws java.lang.Throwable { if ( ! ( android.cts.util.NullWebViewUtils.isWebViewAvailable ( ) ) ) { return ; } startWebServer ( false ) ; android.webkit.WebSettings settings = mOnUiThread.getSettings ( ) ; settings.setDatabaseEnabled ( true ) ; settings.setJavaScriptEnabled ( true ) ; android.webkit.WebViewDatabase webViewDatabase = android.webkit.WebViewDatabase.getInstance ( getActivity ( ) ) ; webViewDatabase.clearFormData ( ) ; final java.lang.String url = mWebServer.getAssetUrl ( TestHtmlConstants.LOGIN_FORM_URL ) ; mOnUiThread.loadUrlAndWaitForCompletion ( url ) ; $missing$ = $missing$.run ( ) ; android.webkit.cts.d0e457 Merge ; }

Target:
public boolean check ( ) { return ! ( android.webkit.WebViewDatabase.getInstance ( getActivity ( ) ) . hasFormData ( ) ) ; }
Source:
public static void e ( java.lang.Object objectPrefix , java.lang.Throwable tr , java.lang.String format , java.lang.Object ... args ) { if ( android.telecom.Log.ERROR ) { android.util.Log.e ( android.telecom.Log.TAG , android.telecom.Log.buildMessage ( android.telecom.Log.getPrefixFromObject ( objectPrefix ) , format , args ) , tr ) ; } }

Target:
public static void e ( java.lang.Object objectPrefix , java.lang.Throwable tr , java.lang.String format , java.lang.Object ... args ) { if ( android.telecom.Log.ERROR ) { android.util.Slog.e ( android.telecom.Log.TAG , android.telecom.Log.buildMessage ( android.telecom.Log.getPrefixFromObject ( objectPrefix ) , format , args ) , tr ) ; } }
Source:
protected void onIccRefreshInit ( ) { mAdnCache.reset ( ) ; com.android.internal.telephony.uicc.UiccCardApplication parentApp = mParentApp ; if ( ( parentApp != null ) && ( ( parentApp.getState ( ) ) == ( com.android.internal.telephony.uicc.IccCardApplicationStatus.AppState.APPSTATE_READY ) ) ) { sendMessage ( obtainMessage ( com.android.internal.telephony.uicc.IccRecords.EVENT_APP_READY ) ) ; } }

Target:
public void dispose ( ) { mDestroyed.set ( true ) ; auth_rsp = null ; synchronized ( mLock ) { mLock.notifyAll ( ) ; } mCi.unregisterForIccRefresh ( this ) ; mParentApp = null ; mFh = null ; mCi = null ; mContext = null ; if ( ( mAdnCache ) != null ) { mAdnCache.reset ( ) ; } }
Source:
public boolean refresh ( boolean reload ) { if ( reload ) { try { mAvdManager.reloadAvds ( com.android.sdklib.NullSdkLog.getLogger ( ) ) ; } catch ( com.android.prefs.AndroidLocation.AndroidLocationException e ) { return false ; } } com.android.sdklib.internal.avd.AvdManager.AvdInfo selected = getSelected ( ) ; fillTable ( mTable ) ; setSelection ( selected ) ; return true ; }

Target:
public boolean refresh ( boolean reload ) { if ( reload ) { try { mAvdManager.reloadAvds ( com.android.sdklib.NullSdkLog.getLogger ( ) ) ; } catch ( com.android.prefs.AndroidLocation.AndroidLocationException e ) { return false ; } } com.android.sdklib.internal.avd.AvdInfo selected = getSelected ( ) ; fillTable ( mTable ) ; setSelection ( selected ) ; return true ; }
Source:
public void startsOutAvailable ( ) { mTestedSm = new com.android.server.connectivity.tethering.TetherInterfaceStateMachine ( com.android.server.connectivity.tethering.TetherInterfaceStateMachineTest.IFACE_NAME , mLooper.getLooper ( ) , android.net.ConnectivityManager.TETHERING_BLUETOOTH , mNMService , mStatsService , mTetherHelper , mIPv6TetheringInterfaceServices ) ; mTestedSm.start ( ) ; mLooper.dispatchAll ( ) ; org.mockito.Mockito.verify ( mTetherHelper ) . notifyInterfaceStateChange ( com.android.server.connectivity.tethering.TetherInterfaceStateMachineTest.IFACE_NAME , mTestedSm , com.android.server.connectivity.tethering.IControlsTethering.STATE_AVAILABLE , android.net.ConnectivityManager.TETHER_ERROR_NO_ERROR ) ; org.mockito.Mockito.verifyNoMoreInteractions ( mTetherHelper , mNMService , mStatsService ) ; }

Target:
public void startsOutAvailable ( ) { mTestedSm = new com.android.server.connectivity.tethering.TetherInterfaceStateMachine ( com.android.server.connectivity.tethering.TetherInterfaceStateMachineTest.IFACE_NAME , mLooper.getLooper ( ) , android.net.ConnectivityManager.TETHERING_BLUETOOTH , mSharedLog , mNMService , mStatsService , mTetherHelper , mIPv6TetheringInterfaceServices ) ; mTestedSm.start ( ) ; mLooper.dispatchAll ( ) ; org.mockito.Mockito.verify ( mTetherHelper ) . notifyInterfaceStateChange ( com.android.server.connectivity.tethering.TetherInterfaceStateMachineTest.IFACE_NAME , mTestedSm , com.android.server.connectivity.tethering.IControlsTethering.STATE_AVAILABLE , android.net.ConnectivityManager.TETHER_ERROR_NO_ERROR ) ; org.mockito.Mockito.verifyNoMoreInteractions ( mTetherHelper , mNMService , mStatsService ) ; }
Source:
public void onChange ( boolean selfChange ) { super . onChange ( selfChange ) ; synchronized ( mSettingsLock ) { if ( updateRingerModeAffectedStreams ( ) ) { setRingerModeInt ( getRingerModeInternal ( ) , false ) ; } readDockAudioSettings ( mContentResolver ) ; } }

Target:
public void onChange ( boolean selfChange ) { super . onChange ( selfChange ) ; synchronized ( mSettingsLock ) { if ( updateRingerModeAffectedStreams ( ) ) { setRingerModeInt ( getRingerModeInternal ( ) , false ) ; } readDockAudioSettings ( mContentResolver ) ; updateMasterMono ( mContentResolver ) ; updateEncodedSurroundOutput ( ) ; } }
Source:
protected void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; startTestActivity ( ) ; mContext = getInstrumentation ( ) . getTargetContext ( ) ; mReceiver = new android.voiceinteraction.cts.VoiceInteractionTest.TestResultsReceiver ( ) ; mContext.registerReceiver ( mReceiver , new android.content.IntentFilter ( android.voiceinteraction.common.Utils.BROADCAST_INTENT ) ) ; }

Target:
protected void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; startTestActivity ( ) ; mContext = getInstrumentation ( ) . getTargetContext ( ) ; mReceiver = new android.voiceinteraction.cts.VoiceInteractionTest.TestResultsReceiver ( ) ; mContext.registerReceiver ( mReceiver , new android.content.IntentFilter ( android.voiceinteraction.common.Utils.BROADCAST_INTENT ) ) ; mActivityManager = ( ( android.voiceinteraction.cts.ActivityManager ) ( getContext ( ) . getSystemService ( Context.ACTIVITY_SERVICE ) ) ) ; }
Source:
public static void install ( android.content.Context context ) { android.security.net.config.ApplicationConfig config = new android.security.net.config.ApplicationConfig ( new android.security.net.config.ManifestConfigSource ( context ) ) ; android.security.net.config.ApplicationConfig.setDefaultInstance ( config ) ; int pos = java.security.Security.insertProviderAt ( new android.security.net.config.NetworkSecurityConfigProvider ( ) , 1 ) ; if ( pos != 1 ) { throw new java.lang.RuntimeException ( ( ( "Failed to install provider as highest priority provider." + " Provider was installed at position " ) + pos ) ) ; } }

Target:
public static void install ( android.content.Context context ) { android.security.net.config.ApplicationConfig config = new android.security.net.config.ApplicationConfig ( new android.security.net.config.ManifestConfigSource ( context ) ) ; android.security.net.config.ApplicationConfig.setDefaultInstance ( config ) ; int pos = java.security.Security.insertProviderAt ( new android.security.net.config.NetworkSecurityConfigProvider ( ) , 1 ) ; if ( pos != 1 ) { throw new java.lang.RuntimeException ( ( ( "Failed to install provider as highest priority provider." + " Provider was installed at position " ) + pos ) ) ; } libcore.net.NetworkSecurityPolicy.setInstance ( new android.security.net.config.ConfigNetworkSecurityPolicy ( config ) ) ; }
Source:
public void setUp ( ) throws java.lang.Exception { org.mockito.MockitoAnnotations.initMocks ( this ) ; mStatusOk = new android.hardware.wifi.V1_0.WifiStatus ( ) ; mStatusOk.code = android.hardware.wifi.V1_0.WifiStatusCode.SUCCESS ; org.mockito.Mockito.when ( mWifiNanIfaceMock.registerEventCallback ( org.mockito.Matchers.any ( android.hardware.wifi.V1_0.IWifiNanIfaceEventCallback.class ) ) ) . thenReturn ( mStatusOk ) ; mDut = new com.android.server.wifi.aware.WifiAwareNativeManager ( mWifiAwareStateManagerMock , mHalDeviceManager , mWifiAwareNativeCallback ) ; mInOrder = org.mockito.Mockito.inOrder ( mWifiAwareStateManagerMock , mHalDeviceManager ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { org.mockito.MockitoAnnotations.initMocks ( this ) ; mStatusOk = new android.hardware.wifi.V1_0.WifiStatus ( ) ; mStatusOk.code = android.hardware.wifi.V1_0.WifiStatusCode.SUCCESS ; org.mockito.Mockito.when ( mWifiNanIfaceMock.registerEventCallback ( org.mockito.ArgumentMatchers.any ( ) ) ) . thenReturn ( mStatusOk ) ; mDut = new com.android.server.wifi.aware.WifiAwareNativeManager ( mWifiAwareStateManagerMock , mHalDeviceManager , mWifiAwareNativeCallback ) ; mInOrder = org.mockito.Mockito.inOrder ( mWifiAwareStateManagerMock , mHalDeviceManager ) ; }
Source:
void pauseIfSleepingLocked ( ) { if ( mSleeping ) { if ( ! ( mGoingToSleep.isHeld ( ) ) ) { mGoingToSleep.acquire ( ) ; if ( mLaunchingActivity.isHeld ( ) ) { mLaunchingActivity.release ( ) ; mHandler.removeMessages ( com.android.server.am.ActivityManagerService.LAUNCH_TIMEOUT_MSG ) ; } } if ( ( mPausingActivity ) == null ) { if ( com.android.server.am.ActivityManagerService.DEBUG_PAUSE ) android.util.Log.v ( com.android.server.am.ActivityManagerService.TAG , "Sleep needs to pause..." ) ; if ( com.android.server.am.ActivityManagerService.DEBUG_USER_LEAVING ) android.util.Log.v ( com.android.server.am.ActivityManagerService.TAG , "Sleep => pause with userLeaving=false" ) ; startPausingLocked ( false , true ) ; } } }

Target:
void pauseIfSleepingLocked ( ) { if ( ( mSleeping ) || ( mShuttingDown ) ) { if ( ! ( mGoingToSleep.isHeld ( ) ) ) { mGoingToSleep.acquire ( ) ; if ( mLaunchingActivity.isHeld ( ) ) { mLaunchingActivity.release ( ) ; mHandler.removeMessages ( com.android.server.am.ActivityManagerService.LAUNCH_TIMEOUT_MSG ) ; } } if ( ( mPausingActivity ) == null ) { if ( com.android.server.am.ActivityManagerService.DEBUG_PAUSE ) android.util.Log.v ( com.android.server.am.ActivityManagerService.TAG , "Sleep needs to pause..." ) ; if ( com.android.server.am.ActivityManagerService.DEBUG_USER_LEAVING ) android.util.Log.v ( com.android.server.am.ActivityManagerService.TAG , "Sleep => pause with userLeaving=false" ) ; startPausingLocked ( false , true ) ; } } }
Source:
public void TestTypes ( ) { java.lang.String [ ] locs = new java.lang.String [ ] { "en_US_VALLEYGIRL" , "en_US_VALLEYGIRL@collation=phonebook;calendar=japanese" , "en_US_VALLEYGIRL@collation=phonebook;calendar=gregorian" , "ja_JP@calendar=japanese" , "th_TH@calendar=buddhist" , "th-TH-u-ca-gregory" , "ja_JP_TRADITIONAL" , "th_TH_TRADITIONAL" , "th_TH_TRADITIONAL@calendar=gregorian" , "en_US" , "th_TH" , "th" , "en_TH" , "th_TH@calendar=iso8601" } ; java.lang.String [ ] types = new java.lang.String [ ] { "gregorian" , "japanese" , "gregorian" , "japanese" , "buddhist" , "gregorian" , "japanese" , "buddhist" , "gregorian" , "gregorian" , "gregorian" , "gregorian" , "gregorian" , "gregorian" } ; for ( int i = 0 ; i < ( locs.length ) ; i ++ ) { com.ibm.icu.util.Calendar cal = com.ibm.icu.util.Calendar.getInstance ( new com.ibm.icu.util.ULocale ( locs [ i ] ) ) ; if ( ! ( cal.getType ( ) . equals ( types [ i ] ) ) ) { errln ( ( ( ( ( ( locs [ i ] ) + " Calendar type " ) + ( cal.getType ( ) ) ) + " instead of " ) + ( types [ i ] ) ) ) ; } } }

Target:
public void TestTypes ( ) { java.lang.String [ ] locs = new java.lang.String [ ] { "en_US_VALLEYGIRL" , "en_US_VALLEYGIRL@collation=phonebook;calendar=japanese" , "en_US_VALLEYGIRL@collation=phonebook;calendar=gregorian" , "ja_JP@calendar=japanese" , "th_TH@calendar=buddhist" , "th-TH-u-ca-gregory" , "ja_JP_TRADITIONAL" , "th_TH_TRADITIONAL" , "th_TH_TRADITIONAL@calendar=gregorian" , "en_US" , "th_TH" , "th" , "en_TH" , "th_TH@calendar=iso8601" , "fr_CH" , "fr_SA" , "fr_CH@rg=sazzzz" , "fr_CH@calendar=japanese;rg=sazzzz" , "fr_TH@rg=SA" , "th@rg=SA" } ; java.lang.String [ ] types = new java.lang.String [ ] { "gregorian" , "japanese" , "gregorian" , "japanese" , "buddhist" , "gregorian" , "japanese" , "buddhist" , "gregorian" , "gregorian" , "buddhist" , "buddhist" , "buddhist" , "gregorian" , "gregorian" , "islamic-umalqura" , "islamic-umalqura" , "japanese" , "buddhist" , "buddhist" } ; for ( int i = 0 ; i < ( locs.length ) ; i ++ ) { com.ibm.icu.util.Calendar cal = com.ibm.icu.util.Calendar.getInstance ( new com.ibm.icu.util.ULocale ( locs [ i ] ) ) ; if ( ! ( cal.getType ( ) . equals ( types [ i ] ) ) ) { errln ( ( ( ( ( ( locs [ i ] ) + " Calendar type " ) + ( cal.getType ( ) ) ) + " instead of " ) + ( types [ i ] ) ) ) ; } } }
Source:
public android.os.Bundle addAccount ( android.accounts.AccountAuthenticatorResponse r , java.lang.String s , java.lang.String s2 , java.lang.String [ ] strings , android.os.Bundle bundle ) throws android.accounts.NetworkErrorException { android.util.Log.d ( com.android.bluetooth.pbapclient.Authenticator.TAG , "got call" , new java.lang.Exception ( ) ) ; throw new java.lang.UnsupportedOperationException ( ) ; }

Target:
public android.os.Bundle hasFeatures ( android.accounts.AccountAuthenticatorResponse r , android.accounts.Account account , java.lang.String [ ] strings ) throws android.accounts.NetworkErrorException { if ( com.android.bluetooth.pbapclient.Authenticator.DBG ) android.util.Log.d ( com.android.bluetooth.pbapclient.Authenticator.TAG , "got call" , new java.lang.Exception ( ) ) ; final android.os.Bundle result = new android.os.Bundle ( ) ; result.putBoolean ( AccountManager.KEY_BOOLEAN_RESULT , false ) ; return result ; }
Source:
public com.android.tools.lint.detector.api.Location getLocationForLine ( int line , java.lang.String patternStart , java.lang.String patternEnd ) { java.io.File sourceFile = getSourceFile ( ) ; if ( sourceFile != null ) { if ( line != ( - 1 ) ) { return com.android.tools.lint.detector.api.Location.create ( sourceFile , getSourceContents ( ) , ( line - 1 ) , patternStart , patternEnd ) ; } else { return com.android.tools.lint.detector.api.Location.create ( sourceFile ) ; } } return com.android.tools.lint.detector.api.Location.create ( file ) ; }

Target:
public com.android.tools.lint.detector.api.Location getLocationForLine ( int line , @ com.android.annotations.Nullable java.lang.String patternStart , @ com.android.annotations.Nullable java.lang.String patternEnd , @ com.android.annotations.Nullable com.android.tools.lint.detector.api.Location.SearchHints hints ) { java.io.File sourceFile = getSourceFile ( ) ; if ( sourceFile != null ) { if ( line != ( - 1 ) ) { return com.android.tools.lint.detector.api.Location.create ( sourceFile , getSourceContents ( ) , ( line - 1 ) , patternStart , patternEnd , hints ) ; } else { return com.android.tools.lint.detector.api.Location.create ( sourceFile ) ; } } return com.android.tools.lint.detector.api.Location.create ( file ) ; }
Source:
public void accept ( java.util.List < java.lang.String > result ) { if ( ( result == null ) || ( ( result.size ( ) ) == 0 ) ) { status = PASS ; } else { logFail ( ) ; status = FAIL ; } next ( ) ; }

Target:
void test ( ) { java.util.List < java.lang.String > result = new java.util.ArrayList ( com.android.cts.verifier.notifications.MockListener.MockListener.getInstance ( ) . mPosted ) ; if ( ( result.size ( ) ) == 0 ) { status = PASS ; } else { logFail ( ) ; status = FAIL ; } next ( ) ; }
Source:
public void tearDown ( ) { com.android.bluetooth.hfp.HeadsetObjectsFactory.getInstance ( ) . destroyStateMachine ( mHeadsetStateMachine ) ; mHandlerThread.quit ( ) ; reset ( com.android.bluetooth.hfp.HeadsetStateMachineTest.sAdapterService ) ; }

Target:
public void tearDown ( ) throws java.lang.Exception { if ( ! ( mTargetContext.getResources ( ) . getBoolean ( R.bool.profile_supported_hs_hfp ) ) ) { return ; } com.android.bluetooth.hfp.HeadsetObjectsFactory.getInstance ( ) . destroyStateMachine ( mHeadsetStateMachine ) ; mHandlerThread.quit ( ) ; com.android.bluetooth.TestUtils.clearAdapterService ( mAdapterService ) ; }
Source:
public void run ( ) { try { vogar.target.TestRunner testRunner = new vogar.target.TestRunner ( java.util.Collections.< java.lang.String > emptyList ( ) ) ; testRunner.useSocketMonitor ( ) ; testRunner.run ( ) ; } catch ( java.io.IOException e ) { throw new java.lang.RuntimeException ( e ) ; } }

Target:
public void run ( ) { try { vogar.target.TestRunner testRunner = new vogar.target.TestRunner ( vogar.target.TestRunner.loadProperties ( ) , java.util.Collections.< java.lang.String > emptyList ( ) ) ; testRunner.useSocketMonitor ( ) ; testRunner.run ( ) ; } catch ( java.io.IOException e ) { throw new java.lang.RuntimeException ( e ) ; } }
Source:
public void test_getParameters ( ) { java.security.cert.CertPathParameters parameters = new tests.api.javax.net.ssl.MyCertPathParameters ( ) ; javax.net.ssl.CertPathTrustManagerParameters p = new javax.net.ssl.CertPathTrustManagerParameters ( parameters ) ; if ( ! ( ( p.getParameters ( ) ) instanceof tests.api.javax.net.ssl.MyCertPathParameters ) ) { fail ( "incorrect parameters" ) ; } assertNotSame ( "Parameters were cloned incorrectly" , parameters , p.getParameters ( ) ) ; }

Target:
public void test_getParameters ( ) { java.security.cert.CertPathParameters parameters = new org.apache.harmony.tests.javax.net.ssl.MyCertPathParameters ( ) ; javax.net.ssl.CertPathTrustManagerParameters p = new javax.net.ssl.CertPathTrustManagerParameters ( parameters ) ; if ( ! ( ( p.getParameters ( ) ) instanceof org.apache.harmony.tests.javax.net.ssl.MyCertPathParameters ) ) { fail ( "incorrect parameters" ) ; } assertNotSame ( "Parameters were cloned incorrectly" , parameters , p.getParameters ( ) ) ; }
Source:
private void onHandshake ( byte [ ] address , int status ) { if ( com.android.bluetooth.hid.HidService.DBG ) android.util.Log.d ( com.android.bluetooth.hid.HidService.TAG , ( "onHandshake: status=" + status ) ) ; android.os.Message msg = mHandler.obtainMessage ( com.android.bluetooth.hid.HidService.MESSAGE_ON_HANDSHAKE ) ; msg.obj = address ; msg.arg1 = status ; mHandler.sendMessage ( msg ) ; }

Target:
private void onHandshake ( byte [ ] address , int status ) { if ( com.android.bluetooth.hid.HidHostService.DBG ) android.util.Log.d ( com.android.bluetooth.hid.HidHostService.TAG , ( "onHandshake: status=" + status ) ) ; android.os.Message msg = mHandler.obtainMessage ( com.android.bluetooth.hid.HidHostService.MESSAGE_ON_HANDSHAKE ) ; msg.obj = address ; msg.arg1 = status ; mHandler.sendMessage ( msg ) ; }
Source:
public void run ( ) { synchronized ( mLock ) { if ( ( ( mState ) != ( android.support.rastermill.FrameSequenceDrawable.STATE_WAITING_TO_SWAP ) ) || ( ( mNextFrameToDecode ) < 0 ) ) return ; mState = android.support.rastermill.FrameSequenceDrawable.STATE_READY_TO_SWAP ; } invalidateSelf ( ) ; }

Target:
public void run ( ) { boolean invalidate = false ; synchronized ( mLock ) { if ( ( ( mNextFrameToDecode ) >= 0 ) && ( ( mState ) == ( android.support.rastermill.FrameSequenceDrawable.STATE_WAITING_TO_SWAP ) ) ) { mState = android.support.rastermill.FrameSequenceDrawable.STATE_READY_TO_SWAP ; invalidate = true ; } } if ( invalidate ) { invalidateSelf ( ) ; } }
Source:
public void testSetRadioState ( ) { for ( int state = 0 ; state <= 9 ; state ++ ) { android.util.Log.v ( com.android.telephonymockriltests.functional.SimpleTestUsingMockRil.TAG , ( "set radio state to be " + state ) ) ; assertTrue ( ( ( "set radio state: " + state ) + " failed." ) , mMockRilCtrl.setRadioState ( state ) ) ; } assertFalse ( "use an invalid radio state" , mMockRilCtrl.setRadioState ( ( - 1 ) ) ) ; assertFalse ( "the radio state doesn't exist" , mMockRilCtrl.setRadioState ( 10 ) ) ; }

Target:
public void testSetRadioState ( ) { for ( int state = 0 ; state <= 9 ; state ++ ) { android.telephony.Rlog.v ( com.android.telephonymockriltests.functional.SimpleTestUsingMockRil.TAG , ( "set radio state to be " + state ) ) ; assertTrue ( ( ( "set radio state: " + state ) + " failed." ) , mMockRilCtrl.setRadioState ( state ) ) ; } assertFalse ( "use an invalid radio state" , mMockRilCtrl.setRadioState ( ( - 1 ) ) ) ; assertFalse ( "the radio state doesn't exist" , mMockRilCtrl.setRadioState ( 10 ) ) ; }
Source:
public void test_removeHandshakeCompletedListener ( ) throws java.io.IOException { javax.net.ssl.SSLSocket ssl = getSSLSocket ( ) ; javax.net.ssl.HandshakeCompletedListener ls = new tests.api.javax.net.ssl.SSLSocketTest.HandshakeCL ( ) ; try { ssl.removeHandshakeCompletedListener ( null ) ; fail ( ) ; } catch ( java.lang.IllegalArgumentException expected ) { } try { ssl.removeHandshakeCompletedListener ( ls ) ; } catch ( java.lang.IllegalArgumentException expected ) { } ssl.addHandshakeCompletedListener ( ls ) ; ssl.removeHandshakeCompletedListener ( ls ) ; ssl.close ( ) ; }

Target:
public void test_removeHandshakeCompletedListener ( ) throws java.io.IOException { javax.net.ssl.SSLSocket ssl = getSSLSocket ( ) ; javax.net.ssl.HandshakeCompletedListener ls = new org.apache.harmony.tests.javax.net.ssl.SSLSocketTest.HandshakeCL ( ) ; try { ssl.removeHandshakeCompletedListener ( null ) ; fail ( ) ; } catch ( java.lang.IllegalArgumentException expected ) { } try { ssl.removeHandshakeCompletedListener ( ls ) ; } catch ( java.lang.IllegalArgumentException expected ) { } ssl.addHandshakeCompletedListener ( ls ) ; ssl.removeHandshakeCompletedListener ( ls ) ; ssl.close ( ) ; }
Source:
public void updateSubscribe ( @ android.annotation.NonNull android.net.wifi.aware.SubscribeConfig subscribeConfig ) { if ( mTerminated ) { android.util.Log.w ( android.net.wifi.aware.WifiAwareSubscribeDiscoverySession.TAG , "updateSubscribe: called on terminated session" ) ; return ; } else { android.net.wifi.aware.WifiAwareManager mgr = mMgr.get ( ) ; if ( mgr == null ) { android.util.Log.w ( android.net.wifi.aware.WifiAwareSubscribeDiscoverySession.TAG , "updateSubscribe: called post GC on WifiAwareManager" ) ; return ; } mgr.updateSubscribe ( mClientId , mSessionId , subscribeConfig ) ; } }

Target:
public void updateSubscribe ( @ android.annotation.NonNull android.net.wifi.aware.SubscribeConfig subscribeConfig ) { if ( mTerminated ) { android.util.Log.w ( android.net.wifi.aware.SubscribeDiscoverySession.TAG , "updateSubscribe: called on terminated session" ) ; return ; } else { android.net.wifi.aware.WifiAwareManager mgr = mMgr.get ( ) ; if ( mgr == null ) { android.util.Log.w ( android.net.wifi.aware.SubscribeDiscoverySession.TAG , "updateSubscribe: called post GC on WifiAwareManager" ) ; return ; } mgr.updateSubscribe ( mClientId , mSessionId , subscribeConfig ) ; } }