auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public boolean checkAndSet ( java.lang.String value , com.android.ide.eclipse.adt.internal.resources.configurations.FolderConfiguration config ) { com.android.ide.eclipse.adt.internal.resources.configurations.TextInputMethodQualifier.TextInputMethod method = com.android.ide.eclipse.adt.internal.resources.configurations.TextInputMethodQualifier.TextInputMethod.getEnum ( value ) ; if ( method != null ) { com.android.ide.eclipse.adt.internal.resources.configurations.TextInputMethodQualifier qualifier = new com.android.ide.eclipse.adt.internal.resources.configurations.TextInputMethodQualifier ( ) ; qualifier.mValue = method ; config.setTextInputMethodQualifier ( qualifier ) ; return true ; } return false ; }

Target:
public boolean checkAndSet ( java.lang.String value , com.android.ide.eclipse.adt.internal.resources.configurations.FolderConfiguration config ) { com.android.sdklib.resources.Keyboard method = com.android.sdklib.resources.Keyboard.getEnum ( value ) ; if ( method != null ) { com.android.ide.eclipse.adt.internal.resources.configurations.TextInputMethodQualifier qualifier = new com.android.ide.eclipse.adt.internal.resources.configurations.TextInputMethodQualifier ( ) ; qualifier.mValue = method ; config.setTextInputMethodQualifier ( qualifier ) ; return true ; } return false ; }
Source:
private int getEventType ( int infoType ) { int eventType = - 1 ; switch ( infoType ) { case DrmInfoRequest.TYPE_REGISTRATION_INFO : eventType = DrmEvent.TYPE_REGISTERED ; break ; case DrmInfoRequest.TYPE_UNREGISTRATION_INFO : eventType = DrmEvent.TYPE_UNREGISTERED ; break ; case DrmInfoRequest.TYPE_RIGHTS_ACQUISITION_INFO : eventType = DrmEvent.TYPE_RIGHTS_ACQUIRED ; break ; } return eventType ; }

Target:
private int getEventType ( int infoType ) { int eventType = - 1 ; switch ( infoType ) { case DrmInfoRequest.TYPE_REGISTRATION_INFO : case DrmInfoRequest.TYPE_UNREGISTRATION_INFO : case DrmInfoRequest.TYPE_RIGHTS_ACQUISITION_INFO : eventType = DrmEvent.TYPE_DRM_INFO_PROCESSED ; break ; } return eventType ; }
Source:
public static long SubNeg3 ( long arg1 , long arg2 ) { if ( Main.doThrow ) { throw new java.lang.Error ( ) ; } long res = 0 ; long temp = - arg1 ; for ( long i = 0 ; i < 1 ; i ++ ) { res += ( temp - arg2 ) - i ; } return res ; }

Target:
public static long $noinline$SubNeg3 ( long arg1 , long arg2 ) { if ( Main.doThrow ) { throw new java.lang.Error ( ) ; } long res = 0 ; long temp = - arg1 ; for ( long i = 0 ; i < 1 ; i ++ ) { res += ( temp - arg2 ) - i ; } return res ; }
Source:
private void reliableWrite ( ) { mBluetoothGatt.beginReliableWrite ( ) ; sleep ( 1000 ) ; writeCharacteristic ( com.android.cts.verifier.bluetooth.BleClientService.WRITE_VALUE ) ; sleep ( 1000 ) ; if ( ! ( mBluetoothGatt.executeReliableWrite ( ) ) ) { android.util.Log.w ( com.android.cts.verifier.bluetooth.BleClientService.TAG , "reliable write failed" ) ; } sleep ( 1000 ) ; mBluetoothGatt.abortReliableWrite ( ) ; }

Target:
public void run ( ) { mExecReliableWrite = com.android.cts.verifier.bluetooth.BleClientService.ReliableWriteState.RELIABLE_WRITE_EXECUTE ; if ( ! ( mBluetoothGatt.executeReliableWrite ( ) ) ) { notifyError ( "reliable write failed" ) ; } }
Source:
public void java7Switches004 ( ) throws java.lang.Exception { com.android.jack.test.toolchain.IToolchain toolchain = com.android.jack.test.toolchain.AbstractTestTools.getCandidateToolchain ( ) ; java.io.File jackZipFile = com.android.jack.test.toolchain.AbstractTestTools.createTempFile ( "tmp" , toolchain.getLibraryExtension ( ) ) ; toolchain.setSourceLevel ( SourceLevel.JAVA_7 ) . addToClasspath ( toolchain.getDefaultBootClasspath ( ) ) . srcToLib ( jackZipFile , true , com.android.jack.test.toolchain.AbstractTestTools.getTestRootDir ( "com.android.jack.java7.switches.test001.jack" ) ) ; toolchain = com.android.jack.test.toolchain.AbstractTestTools.getCandidateToolchain ( ) ; toolchain.setSourceLevel ( SourceLevel.JAVA_7 ) . libToExe ( jackZipFile , com.android.jack.test.toolchain.AbstractTestTools.createTempDir ( ) , false ) ; }

Target:
public void java7Switches001_bis ( ) throws java.lang.Exception { com.android.jack.test.toolchain.IToolchain toolchain = com.android.jack.test.toolchain.AbstractTestTools.getCandidateToolchain ( ) ; java.io.File jackZipFile = com.android.jack.test.toolchain.AbstractTestTools.createTempFile ( "tmp" , toolchain.getLibraryExtension ( ) ) ; toolchain.setSourceLevel ( SourceLevel.JAVA_7 ) . addToClasspath ( toolchain.getDefaultBootClasspath ( ) ) . srcToLib ( jackZipFile , true , com.android.jack.test.toolchain.AbstractTestTools.getTestRootDir ( "com.android.jack.java7.switches.test001.jack" ) ) ; toolchain = com.android.jack.test.toolchain.AbstractTestTools.getCandidateToolchain ( ) ; toolchain.setSourceLevel ( SourceLevel.JAVA_7 ) . libToExe ( jackZipFile , com.android.jack.test.toolchain.AbstractTestTools.createTempDir ( ) , false ) ; }
Source:
public boolean equals ( java.lang.Object o ) { if ( o instanceof android.bluetooth.BluetoothCodecStatus ) { android.bluetooth.BluetoothCodecStatus other = ( ( android.bluetooth.BluetoothCodecStatus ) ( o ) ) ; return ( ( java.util.Objects.equals ( other.mCodecConfig , mCodecConfig ) ) && ( java.util.Objects.equals ( other.mCodecsLocalCapabilities , mCodecsLocalCapabilities ) ) ) && ( java.util.Objects.equals ( other.mCodecsSelectableCapabilities , mCodecsSelectableCapabilities ) ) ; } return false ; }

Target:
public boolean equals ( java.lang.Object o ) { if ( o instanceof android.bluetooth.BluetoothCodecStatus ) { android.bluetooth.BluetoothCodecStatus other = ( ( android.bluetooth.BluetoothCodecStatus ) ( o ) ) ; return ( ( java.util.Objects.equals ( other.mCodecConfig , mCodecConfig ) ) && ( android.bluetooth.BluetoothCodecStatus.sameCapabilities ( other.mCodecsLocalCapabilities , mCodecsLocalCapabilities ) ) ) && ( android.bluetooth.BluetoothCodecStatus.sameCapabilities ( other.mCodecsSelectableCapabilities , mCodecsSelectableCapabilities ) ) ; } return false ; }
Source:
public void testCorruptOverrideFile ( ) throws java.lang.Exception { libcore.util.ZoneInfoDB.TzData data = new libcore.util.ZoneInfoDB.TzData ( libcore.util.ZoneInfoDBTest.makeCorruptFile ( ) , libcore.util.ZoneInfoDBTest.DEFAULT_FILE ) ; assertEquals ( libcore.util.ZoneInfoDBTest.CURRENT_VERSION , data.getVersion ( ) ) ; assertEquals ( java.util.TimeZone.getAvailableIDs ( ) . length , data.getAvailableIDs ( ) . length ) ; }

Target:
public void testCorruptOverrideFile ( ) throws java.lang.Exception { libcore.util.ZoneInfoDB.TzData data = new libcore.util.ZoneInfoDB.TzData ( libcore.util.ZoneInfoDBTest.makeCorruptFile ( ) , libcore.util.ZoneInfoDBTest.DEFAULT_FILE_1 , libcore.util.ZoneInfoDBTest.DEFAULT_FILE_2 ) ; assertEquals ( libcore.util.ZoneInfoDBTest.CURRENT_VERSION , data.getVersion ( ) ) ; assertEquals ( java.util.TimeZone.getAvailableIDs ( ) . length , data.getAvailableIDs ( ) . length ) ; }
Source:
public final int getInt ( ) { checkNotFreed ( ) ; int newPosition = ( position ) + ( libcore.io.SizeOf.INT ) ; if ( newPosition > ( limit ) ) { throw new java.nio.BufferUnderflowException ( ) ; } int result = this . block.peekInt ( ( ( offset ) + ( position ) ) , order ) ; position = newPosition ; return result ; }

Target:
public final int getInt ( ) { checkIsAccessible ( ) ; int newPosition = ( position ) + ( libcore.io.SizeOf.INT ) ; if ( newPosition > ( limit ) ) { throw new java.nio.BufferUnderflowException ( ) ; } int result = this . block.peekInt ( ( ( offset ) + ( position ) ) , order ) ; position = newPosition ; return result ; }
Source:
public void enableAdvertising ( boolean enable , int timeout ) { try { gatt.enableAdvertisingSet ( this . advertiserId , enable , timeout ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.le.AdvertisingSet.TAG , "remote exception - " , e ) ; } }

Target:
public void enableAdvertising ( boolean enable , int duration , int maxExtendedAdvertisingEvents ) { try { gatt.enableAdvertisingSet ( this . advertiserId , enable , duration , maxExtendedAdvertisingEvents ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.le.AdvertisingSet.TAG , "remote exception - " , e ) ; } }
Source:
public static com.android.sdklib.repository.MajorRevision getPropertyMajorRevision ( @ com.android.annotations.Nullable java.util.Properties props ) { java.lang.String revStr = com.android.sdklib.internal.repository.packages.PackageParserUtils.getProperty ( props , PkgProps.PKG_REVISION , null ) ; com.android.sdklib.repository.MajorRevision rev = null ; if ( revStr != null ) { try { rev = com.android.sdklib.repository.MajorRevision.parseRevision ( revStr ) ; } catch ( java.lang.NumberFormatException ignore ) { } } return rev ; }

Target:
public static com.android.sdklib.repository.MajorRevision getPropertyMajor ( @ com.android.annotations.Nullable java.util.Properties props , @ com.android.annotations.NonNull java.lang.String propKey ) { java.lang.String revStr = com.android.sdklib.internal.repository.packages.PackageParserUtils.getProperty ( props , propKey , null ) ; com.android.sdklib.repository.MajorRevision rev = null ; if ( revStr != null ) { try { rev = com.android.sdklib.repository.MajorRevision.parseRevision ( revStr ) ; } catch ( java.lang.NumberFormatException ignore ) { } } return rev ; }
Source:
public void scheduleAtFixedRate ( java.util.TimerTask task , java.util.Date when , long period ) { if ( ( period <= 0 ) || ( ( when.getTime ( ) ) < 0 ) ) { throw new java.lang.IllegalArgumentException ( ) ; } long delay = ( when.getTime ( ) ) - ( java.lang.System.currentTimeMillis ( ) ) ; scheduleImpl ( task , delay , period , true ) ; }

Target:
private void runTask ( java.util.Timer.ScheduledTask sc ) { try { sc.timerTask.updateScheduledExecutionTimeAndRun ( sc.nextExecution , ( ( sc.period ) != null ) ) ; } catch ( java.lang.Error | java.lang.RuntimeException e ) { timer.cancel ( ) ; throw e ; } }
Source:
public java.lang.String getVoiceMailNumberForSubscriber ( int subId , java.lang.String callingPackage ) { com.android.internal.telephony.Phone phone = getPhone ( subId ) ; if ( phone != null ) { if ( ! ( com.android.internal.telephony.TelephonyPermissions.checkCallingOrSelfReadPhoneState ( mContext , callingPackage , "getVoiceMailNumber" ) ) ) { return null ; } java.lang.String number = android.telephony.PhoneNumberUtils.extractNetworkPortion ( phone.getVoiceMailNumber ( ) ) ; if ( com.android.internal.telephony.PhoneSubInfoController.VDBG ) log ( ( "VM: getVoiceMailNUmber: " + number ) ) ; return number ; } else { loge ( ( "getVoiceMailNumber phone is null for Subscription:" + subId ) ) ; return null ; } }

Target:
public java.lang.String getMsisdnForSubscriber ( int subId , java.lang.String callingPackage ) { com.android.internal.telephony.Phone phone = getPhone ( subId ) ; if ( phone != null ) { if ( ! ( com.android.internal.telephony.TelephonyPermissions.checkCallingOrSelfReadPhoneState ( mContext , subId , callingPackage , "getMsisdn" ) ) ) { return null ; } return phone.getMsisdn ( ) ; } else { loge ( ( "getMsisdn phone is null for Subscription:" + subId ) ) ; return null ; } }
Source:
private static void cancelTimer ( ) { synchronized ( com.android.jack.server.Server.lockTimer ) { if ( ( com.android.jack.server.Server.timer ) != null ) { com.android.jack.server.Server.logger.log ( java.util.logging.Level.INFO , "Cancel timer" ) ; com.android.jack.server.Server.timer.cancel ( ) ; com.android.jack.server.Server.timer.purge ( ) ; com.android.jack.server.Server.timer = null ; } } }

Target:
private static void startTimer ( ) { synchronized ( com.android.jack.server.Server.lockTimer ) { if ( ( com.android.jack.server.Server.timer ) != null ) { com.android.jack.server.Server.cancelTimer ( ) ; } com.android.jack.server.Server.logger.log ( java.util.logging.Level.FINE , "Start timer" ) ; com.android.jack.server.Server.timer = new java.util.Timer ( "jack-server-timeout" ) ; assert ( com.android.jack.server.Server.timer ) != null ; com.android.jack.server.Server.timer.schedule ( new java.util.TimerTask ( ) { @ java.lang.Override public void run ( ) { com.android.jack.server.Server.shutdownFifo ( ) ; com.android.jack.server.Server.cancelTimer ( ) ; } } , com.android.jack.server.Server.timeout ) ; } }
Source:
public void onClientPlaybackStateUpdate ( int state ) { android.os.Handler handler = mLocalHandler.get ( ) ; if ( handler != null ) { handler.obtainMessage ( com.android.bluetooth.avrcp.Avrcp.MSG_UPDATE_STATE , 0 , state , new java.lang.Long ( android.media.RemoteControlClient.PLAYBACK_POSITION_INVALID ) ) . sendToTarget ( ) ; } }

Target:
public void onClientPlaybackStateUpdate ( int state ) { if ( com.android.bluetooth.avrcp.Avrcp.DEBUG ) android.util.Log.v ( com.android.bluetooth.avrcp.Avrcp.TAG , ( ( "RemoteControlDisplayer: Update playbackState state=" + state ) + " position=null" ) ) ; android.os.Handler handler = mLocalHandler.get ( ) ; if ( handler != null ) { handler.obtainMessage ( com.android.bluetooth.avrcp.Avrcp.MSG_UPDATE_STATE , 0 , state , new java.lang.Long ( android.media.RemoteControlClient.PLAYBACK_POSITION_INVALID ) ) . sendToTarget ( ) ; } }
Source:
private com.android.jack.ir.ast.JAnnotationLiteral getAnnotation ( @ javax.annotation.Nonnull com.android.jack.ir.ast.Annotable annotable , @ javax.annotation.Nonnull com.android.jack.ir.ast.JAnnotation annotationType , @ javax.annotation.Nonnull com.android.jack.ir.sourceinfo.SourceInfo info ) { assert isSystemAnnotation ( annotationType ) ; com.android.jack.ir.ast.JAnnotationLiteral annotation = null ; java.util.Collection < com.android.jack.ir.ast.JAnnotationLiteral > annotations = annotable.getAnnotations ( annotationType ) ; if ( annotations.isEmpty ( ) ) { annotation = createAnnotation ( annotable , annotationType , info ) ; } else { assert ( annotations.size ( ) ) == 1 ; annotation = annotations.iterator ( ) . next ( ) ; } return annotation ; }

Target:
private com.android.jack.ir.ast.JAnnotationLiteral getAnnotation ( @ javax.annotation.Nonnull com.android.jack.ir.ast.Annotable annotable , @ javax.annotation.Nonnull com.android.jack.ir.ast.JAnnotationType annotationType , @ javax.annotation.Nonnull com.android.jack.ir.sourceinfo.SourceInfo info ) { assert isSystemAnnotation ( annotationType ) ; com.android.jack.ir.ast.JAnnotationLiteral annotation = null ; java.util.Collection < com.android.jack.ir.ast.JAnnotationLiteral > annotations = annotable.getAnnotations ( annotationType ) ; if ( annotations.isEmpty ( ) ) { annotation = createAnnotation ( annotable , annotationType , info ) ; } else { assert ( annotations.size ( ) ) == 1 ; annotation = annotations.iterator ( ) . next ( ) ; } return annotation ; }
Source:
private java.lang.String readErrorMessage ( byte [ ] result , final int timeOut ) throws com.android.ddmlib.TimeoutException , java.io.IOException { if ( com.android.ddmlib.SyncService.checkResult ( result , com.android.ddmlib.SyncService.ID_FAIL ) ) { int len = com.android.ddmlib.utils.ArrayHelper.swap32bitFromArray ( result , 4 ) ; if ( len > 0 ) { com.android.ddmlib.AdbHelper.read ( mChannel , mBuffer , len , timeOut ) ; java.lang.String message = new java.lang.String ( mBuffer , 0 , len ) ; com.android.ddmlib.Log.e ( "ddms" , ( "transfer error: " + message ) ) ; return message ; } } return null ; }

Target:
private byte [ ] getBuffer ( ) { if ( ( mBuffer ) == null ) { mBuffer = new byte [ ( com.android.ddmlib.SyncService.SYNC_DATA_MAX ) + 8 ] ; } return mBuffer ; }
Source:
public java.lang.String p2pServDiscReq ( java.lang.String addr , java.lang.String query ) { if ( ( com.android.server.wifi.WifiNative.HIDL_ENABLE ) && ( ( mSupplicantP2pIfaceHal ) != null ) ) { return mSupplicantP2pIfaceHal.requestServiceDiscovery ( addr , query ) ; } else { java.lang.String command = "P2P_SERV_DISC_REQ" ; command += " " + addr ; command += " " + query ; return doStringCommand ( command ) ; } }

Target:
public java.lang.String p2pServDiscReq ( java.lang.String addr , java.lang.String query ) { if ( ( com.android.server.wifi.WifiNative.HIDL_P2P_ENABLE ) && ( ( mSupplicantP2pIfaceHal ) != null ) ) { return mSupplicantP2pIfaceHal.requestServiceDiscovery ( addr , query ) ; } else { java.lang.String command = "P2P_SERV_DISC_REQ" ; command += " " + addr ; command += " " + query ; return doStringCommand ( command ) ; } }
Source:
final void get ( int [ ] dst , int dstOffset , int intCount ) { int byteCount = checkGetBounds ( SizeOf.INT , dst.length , dstOffset , intCount ) ; this . block.peekIntArray ( ( ( offset ) + ( position ) ) , dst , dstOffset , intCount , order.needsSwap ) ; position += byteCount ; }

Target:
public final byte get ( ) { if ( ( position ) == ( limit ) ) { throw new java.nio.BufferUnderflowException ( ) ; } return this . block.peekByte ( ( ( offset ) + ( ( position ) ++ ) ) ) ; }
Source:
private synchronized void expectVoiceRecognition ( android.bluetooth.BluetoothDevice device ) { mWaitingForVoiceRecognition = true ; android.os.Message m = obtainMessage ( com.android.bluetooth.hfp.HeadsetStateMachine.START_VR_TIMEOUT ) ; m.obj = getMatchingDevice ( device ) ; sendMessageDelayed ( m , com.android.bluetooth.hfp.HeadsetStateMachine.START_VR_TIMEOUT_VALUE ) ; if ( ! ( mSystemInterface.getVoiceRecognitionWakeLock ( ) . isHeld ( ) ) ) { mSystemInterface.getVoiceRecognitionWakeLock ( ) . acquire ( com.android.bluetooth.hfp.HeadsetStateMachine.START_VR_TIMEOUT_VALUE ) ; } }

Target:
private synchronized void expectVoiceRecognition ( android.bluetooth.BluetoothDevice device ) { mWaitingForVoiceRecognition = true ; mService.setActiveDevice ( device ) ; sendMessageDelayed ( com.android.bluetooth.hfp.HeadsetStateMachine.START_VR_TIMEOUT , device , com.android.bluetooth.hfp.HeadsetStateMachine.START_VR_TIMEOUT_MS ) ; if ( ! ( mSystemInterface.getVoiceRecognitionWakeLock ( ) . isHeld ( ) ) ) { mSystemInterface.getVoiceRecognitionWakeLock ( ) . acquire ( com.android.bluetooth.hfp.HeadsetStateMachine.START_VR_TIMEOUT_MS ) ; } }
Source:
public void disconnect ( int clientId , android.os.Binder binder ) { if ( android.net.wifi.nan.WifiNanManager.VDBG ) android.util.Log.v ( android.net.wifi.nan.WifiNanManager.TAG , "disconnect()" ) ; try { mService.disconnect ( clientId , binder ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } }

Target:
public void disconnect ( int clientId , android.os.Binder binder ) { if ( android.net.wifi.aware.WifiAwareManager.VDBG ) android.util.Log.v ( android.net.wifi.aware.WifiAwareManager.TAG , "disconnect()" ) ; try { mService.disconnect ( clientId , binder ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } }
Source:
public final void testCreateDup ( ) { com.android.ide.eclipse.adt.internal.editors.layout.descriptors.ViewElementDescriptor ved = new com.android.ide.eclipse.adt.internal.editors.layout.descriptors.ViewElementDescriptor ( "xml" , "com.example.MyJavaClass" ) ; com.android.ide.eclipse.adt.internal.editors.layout.uimodel.UiViewElementNode uiv = new com.android.ide.eclipse.adt.internal.editors.layout.uimodel.UiViewElementNode ( ved ) ; com.android.ide.eclipse.adt.internal.editors.layout.gre.NodeFactoryTest.MockLayoutViewInfo lvi = new com.android.ide.eclipse.adt.internal.editors.layout.gre.NodeFactoryTest.MockLayoutViewInfo ( uiv , "name" , 10 , 12 , 110 , 120 ) ; com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasViewInfo cvi = new com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasViewInfo ( lvi ) ; com.android.ide.eclipse.adt.internal.editors.layout.gre.NodeProxy proxy1 = m.create ( cvi ) ; com.android.ide.eclipse.adt.internal.editors.layout.gre.NodeProxy proxy2 = m.create ( cvi ) ; assertSame ( proxy2 , proxy1 ) ; }

Target:
public final void testCreateDup ( ) { com.android.ide.eclipse.adt.internal.editors.layout.descriptors.ViewElementDescriptor ved = new com.android.ide.eclipse.adt.internal.editors.layout.descriptors.ViewElementDescriptor ( "xml" , "com.example.MyJavaClass" ) ; com.android.ide.eclipse.adt.internal.editors.layout.uimodel.UiViewElementNode uiv = new com.android.ide.eclipse.adt.internal.editors.layout.uimodel.UiViewElementNode ( ved ) ; com.android.layoutlib.api.ViewInfo lvi = new com.android.layoutlib.api.ViewInfo ( "name" , uiv , 10 , 12 , 110 , 120 ) ; com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasViewInfo cvi = new com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasViewInfo ( lvi ) ; com.android.ide.eclipse.adt.internal.editors.layout.gre.NodeProxy proxy1 = m.create ( cvi ) ; com.android.ide.eclipse.adt.internal.editors.layout.gre.NodeProxy proxy2 = m.create ( cvi ) ; assertSame ( proxy2 , proxy1 ) ; }
Source:
private void responseSetupDataCall ( android.hardware.radio.V1_0.RadioResponseInfo responseInfo , android.hardware.radio.V1_0.SetupDataCallResult dcResponse ) { com.android.internal.telephony.RILRequest rr = mRil.processResponse ( responseInfo ) ; if ( rr != null ) { com.android.internal.telephony.dataconnection.DataCallResponse ret = null ; if ( ( responseInfo.error ) == ( android.hardware.radio.V1_0.RadioError.NONE ) ) { ret = com.android.internal.telephony.RIL.convertHalDc ( dcResponse ) ; sendMessageResponse ( rr.mResult , ret ) ; } mRil.processResponseDone ( rr , responseInfo , ret ) ; } }

Target:
private void responseSetupDataCall ( android.hardware.radio.V1_0.RadioResponseInfo responseInfo , android.hardware.radio.V1_0.SetupDataCallResult setupDataCallResult ) { com.android.internal.telephony.RILRequest rr = mRil.processResponse ( responseInfo ) ; if ( rr != null ) { com.android.internal.telephony.dataconnection.DataCallResponse ret = com.android.internal.telephony.RIL.convertDataCallResult ( setupDataCallResult ) ; if ( ( responseInfo.error ) == ( android.hardware.radio.V1_0.RadioError.NONE ) ) { com.android.internal.telephony.RadioResponse.sendMessageResponse ( rr.mResult , ret ) ; } mRil.processResponseDone ( rr , responseInfo , ret ) ; } }
Source:
boolean sendData ( android.bluetooth.BluetoothDevice device , java.lang.String report ) { enforceCallingOrSelfPermission ( com.android.bluetooth.hid.BLUETOOTH_ADMIN_PERM , "Need BLUETOOTH_ADMIN permission" ) ; int state = this . getConnectionState ( device ) ; if ( state != ( android.bluetooth.BluetoothInputDevice.STATE_CONNECTED ) ) { return false ; } return sendDataNative ( com.android.bluetooth.Utils.getByteAddress ( device ) , report ) ; }

Target:
boolean sendData ( android.bluetooth.BluetoothDevice device , java.lang.String report ) { enforceCallingOrSelfPermission ( com.android.bluetooth.hid.BLUETOOTH_ADMIN_PERM , "Need BLUETOOTH_ADMIN permission" ) ; if ( com.android.bluetooth.hid.HidService.DBG ) { android.util.Log.d ( com.android.bluetooth.hid.HidService.TAG , ( "sendData: " + ( device.getAddress ( ) ) ) ) ; } int state = this . getConnectionState ( device ) ; if ( state != ( android.bluetooth.BluetoothInputDevice.STATE_CONNECTED ) ) { return false ; } return sendDataNative ( com.android.bluetooth.Utils.getByteAddress ( device ) , report ) ; }
Source:
public void sendCDMAFeatureCode ( java.lang.String FeatureCode , android.os.Message response ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_CDMA_FLASH , response ) ; rr.mParcel.writeString ( FeatureCode ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) + " : " ) + FeatureCode ) ) ; send ( rr ) ; }

Target:
public void sendCDMAFeatureCode ( java.lang.String FeatureCode , android.os.Message response ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_CDMA_FLASH , response , mRILDefaultWorkSource ) ; rr.mParcel.writeString ( FeatureCode ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) + " : " ) + FeatureCode ) ) ; send ( rr ) ; }
Source:
public void testGetProperty_unknown ( ) throws java.lang.Exception { com.android.ddmlib.IDevice mockDevice = org.easymock.EasyMock.createMock ( com.android.ddmlib.IDevice.class ) ; com.android.ddmlib.DeviceTest.injectShellResponse ( mockDevice , com.android.ddmlib.PropertyFetcherTest.GETPROP_RESPONSE ) ; org.easymock.EasyMock.replay ( mockDevice ) ; com.android.ddmlib.PropertyFetcher fetcher = new com.android.ddmlib.PropertyFetcher ( mockDevice ) ; assertNull ( fetcher.getProperty ( "unknown" ) . get ( ) ) ; }

Target:
public void testGetProperty_unknown ( ) throws java.lang.Exception { com.android.ddmlib.IDevice mockDevice = com.android.ddmlib.DeviceTest.createMockDevice ( ) ; com.android.ddmlib.DeviceTest.injectShellResponse ( mockDevice , com.android.ddmlib.PropertyFetcherTest.GETPROP_RESPONSE ) ; org.easymock.EasyMock.replay ( mockDevice ) ; com.android.ddmlib.PropertyFetcher fetcher = new com.android.ddmlib.PropertyFetcher ( mockDevice ) ; assertNull ( fetcher.getProperty ( "unknown" ) . get ( ) ) ; }
Source:
public void testUngrant_DoubleUngrant_Failure ( ) throws java.lang.Exception { assertTrue ( "Password should work for keystore" , mKeyStore.password ( android.security.KeyStoreTest.TEST_PASSWD ) ) ; assertTrue ( "Should be able to generate key for testcase" , mKeyStore.generate ( android.security.KeyStoreTest.TEST_KEYNAME , KeyStore.UID_SELF , NativeCrypto.EVP_PKEY_RSA , android.security.KeyStoreTest.RSA_KEY_SIZE , KeyStore.FLAG_ENCRYPTED , null ) ) ; assertTrue ( "Should be able to grant key to other user" , mKeyStore.grant ( android.security.KeyStoreTest.TEST_KEYNAME , 0 ) ) ; assertTrue ( "Should be able to ungrant key to other user" , mKeyStore.ungrant ( android.security.KeyStoreTest.TEST_KEYNAME , 0 ) ) ; assertFalse ( "Should fail to ungrant key to other user second time" , mKeyStore.ungrant ( android.security.KeyStoreTest.TEST_KEYNAME , 0 ) ) ; }

Target:
public void testUngrant_DoubleUngrant_Failure ( ) throws java.lang.Exception { assertTrue ( "Password should work for keystore" , mKeyStore.password ( android.security.KeyStoreTest.TEST_PASSWD ) ) ; assertTrue ( "Should be able to generate key for testcase" , mKeyStore.generate ( android.security.KeyStoreTest.TEST_KEYNAME , KeyStore.UID_SELF , NativeConstants.EVP_PKEY_RSA , android.security.KeyStoreTest.RSA_KEY_SIZE , KeyStore.FLAG_ENCRYPTED , null ) ) ; assertTrue ( "Should be able to grant key to other user" , mKeyStore.grant ( android.security.KeyStoreTest.TEST_KEYNAME , 0 ) ) ; assertTrue ( "Should be able to ungrant key to other user" , mKeyStore.ungrant ( android.security.KeyStoreTest.TEST_KEYNAME , 0 ) ) ; assertFalse ( "Should fail to ungrant key to other user second time" , mKeyStore.ungrant ( android.security.KeyStoreTest.TEST_KEYNAME , 0 ) ) ; }
Source:
public void test_ID ( ) { android.renderscript.cts.ScriptIntrinsicConvolve5x5 s = android.renderscript.cts.ScriptIntrinsicConvolve5x5.create ( mRS , android.renderscript.cts.Element.U8_4 ( mRS ) ) ; android.renderscript.cts.Script.KernelID kid = s.getKernelID ( ) ; if ( kid == null ) { throw new java.lang.IllegalStateException ( "kid must be valid" ) ; } android.renderscript.cts.Script.FieldID fid = s.getFieldID_Input ( ) ; if ( fid == null ) { throw new java.lang.IllegalStateException ( "fid must be valid" ) ; } }

Target:
public void test_ID ( ) { android.renderscript.cts.ScriptIntrinsicConvolve5x5 s = android.renderscript.cts.ScriptIntrinsicConvolve5x5.create ( mRS , android.renderscript.cts.Element.U8_4 ( mRS ) ) ; android.renderscript.cts.Script.KernelID kid = s.getKernelID ( ) ; if ( kid == null ) { throw new java.lang.IllegalStateException ( "kid must be valid" ) ; } android.renderscript.cts.Script.FieldID fid = s.getFieldID_Input ( ) ; if ( fid == null ) { throw new java.lang.IllegalStateException ( "fid must be valid" ) ; } s.destroy ( ) ; }
Source:
public java.lang.Object getTag ( int key ) { android.util.SparseArray < java.lang.Object > tags = null ; synchronized ( android.view.View.sTagsLock ) { if ( ( android.view.View.sTags ) != null ) { tags = android.view.View.sTags.get ( this ) ; } } if ( tags != null ) return tags.get ( key ) ; return null ; }

Target:
public static int resolveSize ( int size , int measureSpec ) { return ( android.view.View.resolveSizeAndState ( size , measureSpec , 0 ) ) & ( android.view.View.MEASURED_SIZE_MASK ) ; }
Source:
private void responseIccSlotStatus ( android.hardware.radio.V1_0.RadioResponseInfo responseInfo , java.util.ArrayList < android.hardware.radio.V1_2.SimSlotStatus > slotsStatus ) { com.android.internal.telephony.RILRequest rr = mRil.processResponse ( responseInfo ) ; if ( rr != null ) { java.util.ArrayList < com.android.internal.telephony.uicc.IccSlotStatus > iccSlotStatus = com.android.internal.telephony.RIL.convertHalSlotsStatus ( slotsStatus ) ; mRil.riljLog ( ( "responseIccSlotStatus: from HIDL: " + iccSlotStatus ) ) ; if ( ( responseInfo.error ) == ( android.hardware.radio.V1_0.RadioError.NONE ) ) { com.android.internal.telephony.RadioResponse.sendMessageResponse ( rr.mResult , iccSlotStatus ) ; } mRil.processResponseDone ( rr , responseInfo , iccSlotStatus ) ; } }

Target:
public void setLinkCapacityReportingCriteriaResponse ( android.hardware.radio.V1_0.RadioResponseInfo responseInfo ) { responseVoid ( responseInfo ) ; }
Source:
public boolean shouldApply ( java.io.File toDir , java.util.Map < java.lang.String , com.intellij.updater.ValidationResult.Option > options ) { java.io.File file = getFile ( toDir ) ; com.intellij.updater.ValidationResult.Option option = options.get ( myPath ) ; if ( ( option == ( ValidationResult.Option.KEEP ) ) || ( option == ( ValidationResult.Option.IGNORE ) ) ) return false ; if ( option == ( ValidationResult.Option.KILL_PROCESS ) ) { for ( com.intellij.updater.NativeFileManager.Process process : com.intellij.updater.NativeFileManager.getProcessesUsing ( file ) ) { process.terminate ( ) ; } } return shouldApplyOn ( file ) ; }

Target:
public boolean shouldApply ( java.io.File toDir , java.util.Map < java.lang.String , com.intellij.updater.ValidationResult.Option > options ) { java.io.File file = getFile ( toDir ) ; com.intellij.updater.ValidationResult.Option option = options.get ( myPath ) ; if ( ( option == ( ValidationResult.Option.KEEP ) ) || ( option == ( ValidationResult.Option.IGNORE ) ) ) return false ; if ( option == ( ValidationResult.Option.KILL_PROCESS ) ) { for ( com.intellij.updater.NativeFileManager.Process process : com.intellij.updater.NativeFileManager.getProcessesUsing ( file ) ) { process.terminate ( ) ; } } return doShouldApply ( toDir ) ; }
Source:
public void testDefaultMethod018 ( ) throws java.lang.Exception { run ( DEFAULTMETHOD018 ) ; }

Target:
public void testDefaultMethod018 ( ) throws java.lang.Exception { new com.android.jack.test.helper.RuntimeTestHelper ( DEFAULTMETHOD018 ) . addProperty ( Options.ANDROID_MIN_API_LEVEL.getName ( ) , java.lang.String.valueOf ( AndroidCompatibilityChecker.N_API_LEVEL ) ) . setSourceLevel ( SourceLevel.JAVA_8 ) . addIgnoredCandidateToolchain ( com.android.jack.test.toolchain.JackApiV01.class ) . addIgnoredCandidateToolchain ( com.android.jack.test.toolchain.JillBasedToolchain.class ) . compileAndRunTest ( ) ; }
Source:
private java.io.File getToolchainPath ( com.android.build.gradle.internal.core.Abi abi ) { return getToolchainPath ( toolchain , toolchainVersion , abi ) ; }

Target:
public java.io.File getCCompiler ( com.android.build.gradle.internal.core.Abi abi ) { java.lang.String compiler = ( ( toolchain ) == ( com.android.build.gradle.internal.core.Toolchain.CLANG ) ) ? "clang" : ( abi.getGccExecutablePrefix ( ) ) + "-gcc" ; return new java.io.File ( getToolchainPath ( toolchain , toolchainVersion , abi ) , ( "bin/" + compiler ) ) ; }
Source:
public static java.util.List < java.lang.String > canonicalize ( java.util.Collection < java.lang.Class < ? extends com.google.devtools.common.options.OptionsBase > > optionsClasses , java.util.List < java.lang.String > args ) throws com.google.devtools.common.options.OptionsParsingException { com.google.devtools.common.options.OptionsParser parser = new com.google.devtools.common.options.OptionsParser ( optionsClasses ) ; parser.setAllowResidue ( false ) ; parser.parse ( args ) ; return parser.impl.asCanonicalizedList ( ) ; }

Target:
public java.util.List < java.lang.String > canonicalize ( ) { return impl.asCanonicalizedList ( ) ; }
Source:
private static void handleFEAT ( com.android.ddmlib.Client client , java.nio.ByteBuffer data ) { int featureCount ; int i ; featureCount = data.getInt ( ) ; for ( i = 0 ; i < featureCount ; i ++ ) { int len = data.getInt ( ) ; java.lang.String feature = getString ( data , len ) ; client.getClientData ( ) . addFeature ( feature ) ; com.android.ddmlib.Log.d ( "ddm-hello" , ( "Feature: " + feature ) ) ; } }

Target:
private static void handleFEAT ( com.android.ddmlib.Client client , java.nio.ByteBuffer data ) { int featureCount ; int i ; featureCount = data.getInt ( ) ; for ( i = 0 ; i < featureCount ; i ++ ) { int len = data.getInt ( ) ; java.lang.String feature = com.android.ddmlib.ByteBufferUtil.getString ( data , len ) ; client.getClientData ( ) . addFeature ( feature ) ; com.android.ddmlib.Log.d ( "ddm-hello" , ( "Feature: " + feature ) ) ; } }
Source:
public void testAesGcm128Udp4UdpEncap ( ) 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 , true , 1 , false ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , null , null , authCrypt , true , 1 , true ) ; }

Target:
public void testAesCbcHmacSha384Tcp6 ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , android.net.cts.IpSecManagerTest.CRYPT_KEY ) ; android.net.IpSecAlgorithm auth = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_HMAC_SHA384 , getAuthKey ( 384 ) , 192 ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IpSecManagerTest.IPV6_LOOPBACK , crypt , auth , false , 1 , false ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IpSecManagerTest.IPV6_LOOPBACK , crypt , auth , false , 1 , true ) ; }
Source:
public void testImsServiceDownSentCompatInitializing ( ) throws android.os.RemoteException { mTestImsServiceBinder.createImsFeature ( android.telephony.ims.ImsServiceTest.TEST_SLOT_0 , ImsFeature.MMTEL , mTestCallback ) ; mTestImsService.mSpyMMTelFeature.sendSetFeatureState ( ImsFeature.STATE_INITIALIZING ) ; org.mockito.ArgumentCaptor < android.content.Intent > intentCaptor = org.mockito.ArgumentCaptor.forClass ( android.content.Intent.class ) ; org.mockito.Mockito.verify ( mMockContext ) . sendBroadcast ( intentCaptor.capture ( ) ) ; try { junit.framework.Assert.assertNotNull ( intentCaptor.getValue ( ) ) ; verifyServiceDownSent ( intentCaptor.getValue ( ) ) ; } catch ( java.lang.IndexOutOfBoundsException e ) { junit.framework.Assert.fail ( "Did not receive all intents" ) ; } }

Target:
public void testImsServiceDownSentCompatInitializing ( ) throws android.os.RemoteException { mTestImsServiceBinder.createMMTelFeature ( android.telephony.ims.ImsServiceTest.TEST_SLOT_0 , mTestCallback ) ; mTestImsService.mSpyMMTelFeature.sendSetFeatureState ( ImsFeature.STATE_INITIALIZING ) ; org.mockito.ArgumentCaptor < android.content.Intent > intentCaptor = org.mockito.ArgumentCaptor.forClass ( android.content.Intent.class ) ; org.mockito.Mockito.verify ( mMockContext ) . sendBroadcast ( intentCaptor.capture ( ) ) ; try { junit.framework.Assert.assertNotNull ( intentCaptor.getValue ( ) ) ; verifyServiceDownSent ( intentCaptor.getValue ( ) ) ; } catch ( java.lang.IndexOutOfBoundsException e ) { junit.framework.Assert.fail ( "Did not receive all intents" ) ; } }
Source:
private static < R extends java.lang.Readable & java.io.Closeable > java.lang.StringBuilder toStringBuilder ( com.google.common.io.InputSupplier < R > supplier ) throws java.io.IOException { boolean threw = true ; R r = supplier.getInput ( ) ; try { java.lang.StringBuilder result = com.google.common.io.CharStreams.toStringBuilder ( r ) ; threw = false ; return result ; } finally { com.google.common.io.Closeables.close ( r , threw ) ; } }

Target:
public void flush ( ) { }
Source:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; mSpyContext = mComponentContextFixture.getTestDouble ( ) . getApplicationContext ( ) ; org.mockito.Mockito.doReturn ( mSpyContext ) . when ( mSpyContext ) . getApplicationContext ( ) ; mNumOutgoingCallsMade = 0 ; mIsEmergencyCall = false ; setupInCallServices ( ) ; setupTelecomSystem ( ) ; setupConnectionServices ( ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; mSpyContext = mComponentContextFixture.getTestDouble ( ) . getApplicationContext ( ) ; org.mockito.Mockito.doReturn ( mSpyContext ) . when ( mSpyContext ) . getApplicationContext ( ) ; org.mockito.Mockito.doNothing ( ) . when ( mSpyContext ) . sendBroadcastAsUser ( org.mockito.Matchers.any ( ) , org.mockito.Matchers.any ( ) , org.mockito.Matchers.any ( ) ) ; mNumOutgoingCallsMade = 0 ; mIsEmergencyCall = false ; setupInCallServices ( ) ; setupTelecomSystem ( ) ; setupConnectionServices ( ) ; }
Source:
public void usbShouldBeTornDownOnTetherError ( ) throws java.lang.Exception { initStateMachine ( ConnectivityManager.TETHERING_USB ) ; org.mockito.Mockito.doThrow ( android.os.RemoteException.class ) . when ( mNMService ) . tetherInterface ( com.android.server.connectivity.tethering.TetherInterfaceStateMachineTest.IFACE_NAME ) ; dispatchCommand ( TetherInterfaceStateMachine.CMD_TETHER_REQUESTED ) ; org.mockito.InOrder usbTeardownOrder = org.mockito.Mockito.inOrder ( mNMService , mInterfaceConfiguration , mTetherHelper ) ; usbTeardownOrder.verify ( mInterfaceConfiguration ) . setInterfaceDown ( ) ; usbTeardownOrder.verify ( mNMService ) . setInterfaceConfig ( com.android.server.connectivity.tethering.TetherInterfaceStateMachineTest.IFACE_NAME , mInterfaceConfiguration ) ; usbTeardownOrder.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_TETHER_IFACE_ERROR ) ; }

Target:
public void usbShouldBeTornDownOnTetherError ( ) throws java.lang.Exception { initStateMachine ( android.net.ConnectivityManager.TETHERING_USB ) ; org.mockito.Mockito.doThrow ( android.os.RemoteException.class ) . when ( mNMService ) . tetherInterface ( com.android.server.connectivity.tethering.TetherInterfaceStateMachineTest.IFACE_NAME ) ; dispatchCommand ( TetherInterfaceStateMachine.CMD_TETHER_REQUESTED ) ; org.mockito.InOrder usbTeardownOrder = org.mockito.Mockito.inOrder ( mNMService , mInterfaceConfiguration , mTetherHelper ) ; usbTeardownOrder.verify ( mInterfaceConfiguration ) . setInterfaceDown ( ) ; usbTeardownOrder.verify ( mNMService ) . setInterfaceConfig ( com.android.server.connectivity.tethering.TetherInterfaceStateMachineTest.IFACE_NAME , mInterfaceConfiguration ) ; usbTeardownOrder.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_TETHER_IFACE_ERROR ) ; }
Source:
private java.lang.String getDefaultHttpMethod ( com.google.gct.intellij.endpoints.validation.PsiMethod psiMethod ) { java.lang.String methodName = psiMethod.getName ( ) ; for ( com.google.gct.intellij.endpoints.validation.RestSignatureInspection.RestMethod entry : com.google.gct.intellij.endpoints.validation.RestSignatureInspection.RestMethod.values ( ) ) { if ( methodName.startsWith ( entry.getMethodNamePrefix ( ) ) ) { return entry.getHttpMethod ( ) ; } } throw new java.lang.AssertionError ( ( ( "It's impossible for method" + ( psiMethod.getName ( ) ) ) + " to map to no REST path." ) ) ; }

Target:
private java.lang.String getDefaultHttpMethod ( com.google.gct.idea.appengine.validation.PsiMethod psiMethod ) { java.lang.String methodName = psiMethod.getName ( ) ; for ( com.google.gct.idea.appengine.validation.RestSignatureInspection.RestMethod entry : com.google.gct.idea.appengine.validation.RestSignatureInspection.RestMethod.values ( ) ) { if ( methodName.startsWith ( entry.getMethodNamePrefix ( ) ) ) { return entry.getHttpMethod ( ) ; } } throw new java.lang.AssertionError ( ( ( "It's impossible for method" + ( psiMethod.getName ( ) ) ) + " to map to no REST path." ) ) ; }
Source:
native void rsnScriptForEachClipped ( long con , long id , int slot , long ain , long aout , int xstart , int xend , int ystart , int yend , int zstart , int zend ) ;

Target:
synchronized long nScriptKernelIDCreate ( long sid , int slot , int sig , boolean mUseInc ) { validate ( ) ; long curCon = mContext ; if ( mUseInc ) { curCon = mIncCon ; } return rsnScriptKernelIDCreate ( curCon , sid , slot , sig , mUseInc ) ; }
Source:
private void enable ( ) { com.android.cts.deviceowner.BluetoothRestrictionTest.sleep ( com.android.cts.deviceowner.BluetoothRestrictionTest.CHECK_WAIT_TIME ) ; if ( ( mBluetoothAdapter.getState ( ) ) == ( android.bluetooth.BluetoothAdapter.STATE_ON ) ) { assertTrue ( mBluetoothAdapter.isEnabled ( ) ) ; return ; } assertEquals ( BluetoothAdapter.STATE_OFF , mBluetoothAdapter.getState ( ) ) ; assertFalse ( mBluetoothAdapter.isEnabled ( ) ) ; mBluetoothAdapter.enable ( ) ; assertEnabledfterTimeout ( ) ; }

Target:
private void enable ( ) { com.android.cts.deviceowner.BluetoothRestrictionTest.sleep ( com.android.cts.deviceowner.BluetoothRestrictionTest.CHECK_WAIT_TIME_MS ) ; if ( ( mBluetoothAdapter.getState ( ) ) == ( android.bluetooth.BluetoothAdapter.STATE_ON ) ) { assertTrue ( mBluetoothAdapter.isEnabled ( ) ) ; return ; } assertEquals ( BluetoothAdapter.STATE_OFF , mBluetoothAdapter.getState ( ) ) ; assertFalse ( mBluetoothAdapter.isEnabled ( ) ) ; mBluetoothAdapter.enable ( ) ; assertEnabledAfterTimeout ( ) ; }
Source:
public void registerMultiFlavorSourceProvider ( @ com.android.annotations.NonNull java.lang.String name , @ com.android.annotations.NonNull java.lang.String flavorName , @ com.android.annotations.NonNull com.android.builder.model.SourceProvider sourceProvider ) { if ( ( extraArtifactMap.get ( name ) ) == null ) { throw new java.lang.IllegalArgumentException ( "Artifact with name $name is not yet registered. Use registerArtifactType()" ) ; } extraMultiFlavorSourceProviders.put ( flavorName , new com.android.build.gradle.internal.variant.DefaultSourceProviderContainer ( name , sourceProvider ) ) ; }

Target:
public void registerBuildTypeSourceProvider ( @ com.android.annotations.NonNull java.lang.String name , @ com.android.annotations.NonNull com.android.build.gradle.internal.dsl.CoreBuildType buildType , @ com.android.annotations.NonNull com.android.builder.model.SourceProvider sourceProvider ) { if ( ( extraArtifactMap.get ( name ) ) == null ) { throw new java.lang.IllegalArgumentException ( java.lang.String.format ( "Artifact with name %1$s is not yet registered. Use registerArtifactType()" , name ) ) ; } extraBuildTypeSourceProviders.put ( buildType.getName ( ) , new com.android.build.gradle.internal.variant.DefaultSourceProviderContainer ( name , sourceProvider ) ) ; }
Source:
public void updateAvd ( java.lang.String name , com.android.sdklib.ISdkLog log ) throws java.io.IOException { com.android.sdklib.internal.avd.AvdManager.AvdInfo avd = null ; synchronized ( mAllAvdList ) { for ( com.android.sdklib.internal.avd.AvdManager.AvdInfo info : mAllAvdList ) { if ( info.getName ( ) . equals ( name ) ) { avd = info ; break ; } } } if ( avd == null ) { log.error ( null , "There is no Android Virtual Device named '%s'." , name ) ; return ; } updateAvd ( avd , log ) ; }

Target:
public void updateAvd ( java.lang.String name , com.android.sdklib.ISdkLog log ) throws java.io.IOException { com.android.sdklib.internal.avd.AvdInfo avd = null ; synchronized ( mAllAvdList ) { for ( com.android.sdklib.internal.avd.AvdInfo info : mAllAvdList ) { if ( info.getName ( ) . equals ( name ) ) { avd = info ; break ; } } } if ( avd == null ) { log.error ( null , "There is no Android Virtual Device named '%s'." , name ) ; return ; } updateAvd ( avd , log ) ; }
Source:
public final float getFloat ( ) { int newPosition = ( position ) + ( libcore.io.SizeOf.FLOAT ) ; if ( newPosition > ( limit ) ) { throw new java.nio.BufferUnderflowException ( ) ; } float result = java.lang.Float.intBitsToFloat ( this . block.peekInt ( ( ( offset ) + ( position ) ) , order ) ) ; position = newPosition ; return result ; }

Target:
public final int getInt ( ) { int newPosition = ( position ) + ( libcore.io.SizeOf.INT ) ; if ( newPosition > ( limit ) ) { throw new java.nio.BufferUnderflowException ( ) ; } int result = this . block.peekInt ( ( ( offset ) + ( position ) ) , order ) ; position = newPosition ; return result ; }
Source:
public java.nio.ByteBuffer putFloat ( int index , float value ) { if ( isReadOnly ) { throw new java.nio.ReadOnlyBufferException ( ) ; } checkIndex ( index , SizeOf.FLOAT ) ; this . block.pokeInt ( ( ( offset ) + index ) , java.lang.Float.floatToRawIntBits ( value ) , order ) ; return this ; }

Target:
public java.nio.ByteBuffer putFloat ( int index , float value ) { checkNotFreed ( ) ; if ( isReadOnly ) { throw new java.nio.ReadOnlyBufferException ( ) ; } checkIndex ( index , SizeOf.FLOAT ) ; this . block.pokeInt ( ( ( offset ) + index ) , java.lang.Float.floatToRawIntBits ( value ) , order ) ; return this ; }
Source:
private final boolean canGcNow ( ) { return ( ( ( mParallelBroadcasts.size ( ) ) == 0 ) && ( ( mOrderedBroadcasts.size ( ) ) == 0 ) ) && ( ( mSleeping ) || ( ( ( mResumedActivity ) != null ) && ( mResumedActivity.idle ) ) ) ; }

Target:
private final boolean canGcNowLocked ( ) { return ( ( ( mParallelBroadcasts.size ( ) ) == 0 ) && ( ( mOrderedBroadcasts.size ( ) ) == 0 ) ) && ( ( mSleeping ) || ( ( ( mResumedActivity ) != null ) && ( mResumedActivity.idle ) ) ) ; }
Source:
protected void sortAndPrepareInternal ( @ javax.annotation.Nonnull java.util.ArrayList < com.android.jack.ir.ast.JDefinedClassOrInterface > defaultList , @ javax.annotation.Nonnull java.util.ArrayList < com.android.jack.ir.ast.JDefinedClassOrInterface > mainList ) { java.util.Collections.sort ( defaultList , nameComp ) ; int number = com.android.jack.tools.merger.ConstantManager.FIRST_DETERMINISTIC_MODE_INDEX ; for ( com.android.jack.ir.ast.JDefinedClassOrInterface type : mainList ) { type.addMarker ( new com.android.jack.backend.dex.NumberMarker ( ( number ++ ) ) ) ; } for ( com.android.jack.ir.ast.JDefinedClassOrInterface type : defaultList ) { type.addMarker ( new com.android.jack.backend.dex.NumberMarker ( ( number ++ ) ) ) ; } }

Target:
protected void sortAndNumberInternal ( @ javax.annotation.Nonnull java.util.ArrayList < com.android.jack.ir.ast.JDefinedClassOrInterface > defaultList , @ javax.annotation.Nonnull java.util.ArrayList < com.android.jack.ir.ast.JDefinedClassOrInterface > mainList ) { java.util.Collections.sort ( defaultList , nameComp ) ; int number = 0 ; for ( com.android.jack.ir.ast.JDefinedClassOrInterface type : mainList ) { type.addMarker ( new com.android.jack.backend.dex.NumberMarker ( ( number ++ ) ) ) ; } for ( com.android.jack.ir.ast.JDefinedClassOrInterface type : defaultList ) { type.addMarker ( new com.android.jack.backend.dex.NumberMarker ( ( number ++ ) ) ) ; } }