auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void testGetTvInputList ( ) throws java.lang.Exception { if ( ! ( android.media.tv.cts.Utils.hasTvInputFramework ( getContext ( ) ) ) ) { return ; } java.util.List < android.media.tv.TvInputInfo > list = mManager.getTvInputList ( ) ; for ( java.lang.String name : android.media.tv.cts.TvInputManagerTest.VALID_TV_INPUT_SERVICES ) { assertNotNull ( ( "getTvInputList() doesn't contain valid input: " + name ) , android.media.tv.cts.TvInputManagerTest.getInfoForClassName ( list , name ) ) ; } for ( java.lang.String name : android.media.tv.cts.TvInputManagerTest.INVALID_TV_INPUT_SERVICES ) { assertNull ( ( "getTvInputList() contains invalind input: " + name ) , android.media.tv.cts.TvInputManagerTest.getInfoForClassName ( list , name ) ) ; } }

Target:
public void testGetTvInputList ( ) throws java.lang.Exception { if ( ! ( android.media.tv.cts.Utils.hasTvInputFramework ( getActivity ( ) ) ) ) { return ; } java.util.List < android.media.tv.TvInputInfo > list = mManager.getTvInputList ( ) ; for ( java.lang.String name : android.media.tv.cts.TvInputManagerTest.VALID_TV_INPUT_SERVICES ) { assertNotNull ( ( "getTvInputList() doesn't contain valid input: " + name ) , android.media.tv.cts.TvInputManagerTest.getInfoForClassName ( list , name ) ) ; } for ( java.lang.String name : android.media.tv.cts.TvInputManagerTest.INVALID_TV_INPUT_SERVICES ) { assertNull ( ( "getTvInputList() contains invalind input: " + name ) , android.media.tv.cts.TvInputManagerTest.getInfoForClassName ( list , name ) ) ; } }
Source:
private static com.android.internal.telephony.cdma.SmsMessage createBroadcastSmsMessage ( int serviceCategory , int messageId , int priority , int language , int encoding , java.lang.String body ) throws java.lang.Exception { android.os.Parcel p = com.android.internal.telephony.cdma.CdmaSmsCbTest.createBroadcastParcel ( serviceCategory ) ; com.android.internal.util.BitwiseOutputStream bos = com.android.internal.telephony.cdma.CdmaSmsCbTest.createBearerDataStream ( messageId , priority , language ) ; bos.write ( 8 , com.android.internal.telephony.cdma.CdmaSmsCbTest.SUBPARAM_USER_DATA ) ; com.android.internal.telephony.cdma.CdmaSmsCbTest.encodeBody ( encoding , body , false , bos ) ; return com.android.internal.telephony.cdma.CdmaSmsCbTest.createMessageFromParcel ( p , bos.toByteArray ( ) ) ; }

Target:
private static com.android.internal.telephony.cdma.SmsMessage createBroadcastSmsMessage ( int serviceCategory , int messageId , int priority , int language , int encoding , java.lang.String body ) throws java.lang.Exception { android.hardware.radio.V1_0.CdmaSmsMessage msg = com.android.internal.telephony.cdma.CdmaSmsCbTest.createBroadcastParcel ( serviceCategory ) ; com.android.internal.util.BitwiseOutputStream bos = com.android.internal.telephony.cdma.CdmaSmsCbTest.createBearerDataStream ( messageId , priority , language ) ; bos.write ( 8 , com.android.internal.telephony.cdma.CdmaSmsCbTest.SUBPARAM_USER_DATA ) ; com.android.internal.telephony.cdma.CdmaSmsCbTest.encodeBody ( encoding , body , false , bos ) ; return com.android.internal.telephony.cdma.CdmaSmsCbTest.createMessageFromParcel ( msg , bos.toByteArray ( ) ) ; }
Source:
public void setFrequencyBand ( int band , boolean persist ) { if ( persist ) { Settings.Global.putInt ( mContext.getContentResolver ( ) , Settings.Global.WIFI_FREQUENCY_BAND , band ) ; } sendMessage ( com.android.server.wifi.WifiStateMachine.CMD_SET_FREQUENCY_BAND , band , 0 ) ; }

Target:
public int syncGetSupportedFeatures ( com.android.internal.util.AsyncChannel channel ) { android.os.Message resultMsg = channel.sendMessageSynchronously ( com.android.server.wifi.WifiStateMachine.CMD_GET_SUPPORTED_FEATURES ) ; int supportedFeatureSet = resultMsg.arg1 ; resultMsg.recycle ( ) ; boolean disableRtt = mPropertyService.getBoolean ( "config.disable_rtt" , false ) ; if ( disableRtt ) { supportedFeatureSet &= ~ ( ( android.net.wifi.WifiManager.WIFI_FEATURE_D2D_RTT ) | ( android.net.wifi.WifiManager.WIFI_FEATURE_D2AP_RTT ) ) ; } return supportedFeatureSet ; }
Source:
public void widgetSelected ( org.eclipse.swt.events.SelectionEvent e ) { super . widgetSelected ( e ) ; if ( ( mResourceType ) == ( com.android.resources.ResourceType.STRING ) ) { createNewString ( ) ; } else { assert com.android.ide.eclipse.adt.internal.resources.ResourceNameValidator.isValueBasedResourceType ( mResourceType ) ; java.lang.String newName = createNewValue ( mResourceType ) ; if ( newName != null ) { com.android.ide.eclipse.adt.internal.resources.manager.ResourceItem [ ] items = setupResourceList ( ) ; selectItemName ( newName , items ) ; } } }

Target:
public void widgetSelected ( org.eclipse.swt.events.SelectionEvent e ) { super . widgetSelected ( e ) ; if ( ( mResourceType ) == ( com.android.resources.ResourceType.STRING ) ) { createNewString ( ) ; } else { assert com.android.ide.eclipse.adt.internal.resources.ResourceNameValidator.isValueBasedResourceType ( mResourceType ) ; java.lang.String newName = createNewValue ( mResourceType ) ; if ( newName != null ) { com.android.ide.common.resources.ResourceItem [ ] items = setupResourceList ( ) ; selectItemName ( newName , items ) ; } } }
Source:
protected boolean generateSourceProperties ( com.android.sdklib.internal.repository.archives.Archive archive , java.io.File unzipDestFolder ) { java.util.Properties props = new java.util.Properties ( ) ; archive.saveProperties ( props ) ; java.lang.Package pkg = archive.getParentPackage ( ) ; if ( pkg != null ) { pkg.saveProperties ( props ) ; } return mFileOp.saveProperties ( new java.io.File ( unzipDestFolder , com.android.SdkConstants.FN_SOURCE_PROP ) , props , "## Android Tool: Source of this archive." ) ; }

Target:
protected boolean generateSourceProperties ( com.android.sdklib.internal.repository.archives.Archive archive , java.io.File unzipDestFolder ) { java.util.Properties props = new java.util.Properties ( ) ; archive.saveProperties ( props ) ; java.lang.Package pkg = archive.getParentPackage ( ) ; if ( pkg != null ) { pkg.saveProperties ( props ) ; } try { mFileOp.saveProperties ( new java.io.File ( unzipDestFolder , com.android.SdkConstants.FN_SOURCE_PROP ) , props , "## Android Tool: Source of this archive." ) ; return true ; } catch ( java.io.IOException ignore ) { return false ; } }
Source:
public void testUpdateRequirePMFDoesNotClearHasEverConnected ( ) { android.net.wifi.WifiConfiguration pskNetwork = com.android.server.wifi.WifiConfigurationTestUtil.createPskNetwork ( ) ; verifyAddNetworkHasEverConnectedFalse ( pskNetwork ) ; verifyUpdateNetworkAfterConnectHasEverConnectedTrue ( pskNetwork.networkId ) ; assertFalse ( pskNetwork.requirePMF ) ; pskNetwork.requirePMF = true ; com.android.server.wifi.NetworkUpdateResult result = verifyUpdateNetworkToWifiConfigManagerWithoutIpChange ( pskNetwork ) ; android.net.wifi.WifiConfiguration retrievedNetwork = mWifiConfigManager.getConfiguredNetwork ( result.getNetworkId ( ) ) ; assertTrue ( "Updating network non-credentials config should not clear hasEverConnected." , retrievedNetwork.getNetworkSelectionStatus ( ) . getHasEverConnected ( ) ) ; }

Target:
public void testUpdateRequirePMFDoesNotClearHasEverConnected ( ) { android.net.wifi.WifiConfiguration pskNetwork = com.android.server.wifi.WifiConfigurationTestUtil.createPskNetwork ( ) ; verifyAddNetworkHasEverConnectedFalse ( pskNetwork ) ; verifyUpdateNetworkAfterConnectHasEverConnectedTrue ( pskNetwork.networkId ) ; assertFalse ( pskNetwork.requirePMF ) ; pskNetwork.requirePMF = true ; com.android.server.wifi.NetworkUpdateResult result = verifyUpdateNetworkToWifiConfigManagerWithoutIpChange ( pskNetwork ) ; android.net.wifi.WifiConfiguration retrievedNetwork = mWifiConfigManager.getConfiguredNetwork ( result.getNetworkId ( ) ) ; assertTrue ( "Updating network non-credentials config should not clear hasEverConnected." , retrievedNetwork.getNetworkSelectionStatus ( ) . getHasEverConnected ( ) ) ; assertFalse ( result.hasCredentialChanged ( ) ) ; }
Source:
public void testAesCbcHmacSha1Udp4UdpEncap ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , android.net.cts.IpSecManagerTest.getKey ( 256 ) ) ; android.net.IpSecAlgorithm auth = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_HMAC_SHA1 , android.net.cts.IpSecManagerTest.getKey ( 160 ) , 96 ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , null , true , 1 , false ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , null , true , 1 , true ) ; }

Target:
public void testAuthUdp4UdpEncap ( ) throws java.lang.Exception { android.net.IpSecAlgorithm auth = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_HMAC_SHA256 , getAuthKey ( 256 ) , 128 ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , null , auth , true , 1 , false ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , null , auth , true , 1 , true ) ; }
Source:
public java.util.List < android.telephony.mbms.DownloadRequest > listPendingDownloads ( ) { android.telephony.mbms.vendor.IMbmsDownloadService downloadService = mService.get ( ) ; if ( downloadService == null ) { throw new java.lang.IllegalStateException ( "Middleware not yet bound" ) ; } try { return downloadService.listPendingDownloads ( mSubscriptionId ) ; } catch ( android.os.RemoteException e ) { mService.set ( null ) ; sendErrorToApp ( MbmsErrors.ERROR_MIDDLEWARE_LOST , null ) ; return java.util.Collections.emptyList ( ) ; } }

Target:
public java.util.List < android.telephony.mbms.DownloadRequest > listPendingDownloads ( ) { android.telephony.mbms.vendor.IMbmsDownloadService downloadService = mService.get ( ) ; if ( downloadService == null ) { throw new java.lang.IllegalStateException ( "Middleware not yet bound" ) ; } try { return downloadService.listPendingDownloads ( mSubscriptionId ) ; } catch ( android.os.RemoteException e ) { mService.set ( null ) ; android.telephony.MbmsDownloadSession.sIsInitialized.set ( false ) ; sendErrorToApp ( MbmsErrors.ERROR_MIDDLEWARE_LOST , null ) ; return java.util.Collections.emptyList ( ) ; } }
Source:
public void onRawContactInsert ( android.database.sqlite.SQLiteDatabase db , long rawContactId ) { mSelectionArgs1 [ 0 ] = java.lang.String.valueOf ( rawContactId ) ; computeAggregateData ( db , mRawContactsQueryByRawContactId , mSelectionArgs1 , mContactInsert ) ; long contactId = mContactInsert.executeInsert ( ) ; setContactId ( rawContactId , contactId ) ; mDbHelper.updateContactVisible ( contactId ) ; }

Target:
public long onRawContactInsert ( com.android.providers.contacts.TransactionContext txContext , android.database.sqlite.SQLiteDatabase db , long rawContactId ) { long contactId = insertContact ( db , rawContactId ) ; setContactId ( rawContactId , contactId ) ; mDbHelper.updateContactVisible ( txContext , contactId ) ; return contactId ; }
Source:
java.util.List < android.bluetooth.BluetoothDevice > getDevicesMatchingConnectionStates ( int [ ] states ) { if ( com.android.bluetooth.hid.HidService.DBG ) android.util.Log.d ( com.android.bluetooth.hid.HidService.TAG , "getDevicesMatchingConnectionStates()" ) ; enforceCallingOrSelfPermission ( com.android.bluetooth.hid.BLUETOOTH_PERM , "Need BLUETOOTH permission" ) ; java.util.List < android.bluetooth.BluetoothDevice > inputDevices = new java.util.ArrayList < android.bluetooth.BluetoothDevice > ( ) ; for ( android.bluetooth.BluetoothDevice device : mInputDevices.keySet ( ) ) { int inputDeviceState = getConnectionState ( device ) ; for ( int state : states ) { if ( state == inputDeviceState ) { inputDevices.add ( device ) ; break ; } } } return inputDevices ; }

Target:
java.util.List < android.bluetooth.BluetoothDevice > getDevicesMatchingConnectionStates ( int [ ] states ) { if ( com.android.bluetooth.hid.HidHostService.DBG ) android.util.Log.d ( com.android.bluetooth.hid.HidHostService.TAG , "getDevicesMatchingConnectionStates()" ) ; enforceCallingOrSelfPermission ( com.android.bluetooth.hid.BLUETOOTH_PERM , "Need BLUETOOTH permission" ) ; java.util.List < android.bluetooth.BluetoothDevice > inputDevices = new java.util.ArrayList < android.bluetooth.BluetoothDevice > ( ) ; for ( android.bluetooth.BluetoothDevice device : mInputDevices.keySet ( ) ) { int inputDeviceState = getConnectionState ( device ) ; for ( int state : states ) { if ( state == inputDeviceState ) { inputDevices.add ( device ) ; break ; } } } return inputDevices ; }
Source:
public static com.android.dialer.oem.CequintCallerIdManager createInstanceForCallLog ( ) { return new com.android.dialer.oem.CequintCallerIdManager ( ) ; }

Target:
public static com.android.dialer.oem.CequintCallerIdManager.CequintCallerIdContact getCequintCallerIdContactForNumber ( android.content.Context context , java.lang.String number ) { com.android.dialer.common.Assert.isWorkerThread ( ) ; com.android.dialer.common.LogUtil.d ( "CequintCallerIdManager.getCequintCallerIdContactForNumber" , "number: %s" , com.android.dialer.common.LogUtil.sanitizePhoneNumber ( number ) ) ; return com.android.dialer.oem.CequintCallerIdManager.lookup ( context , com.android.dialer.oem.CequintCallerIdManager.getLookupUri ( ) , android.telephony.PhoneNumberUtils.stripSeparators ( number ) , new java.lang.String [ ] { "system" } ) ; }
Source:
private static boolean isDuoCall ( java.lang.String phoneAccountComponentName , android.content.Context context ) { com.android.dialer.duo.Duo lightBringer = com.android.dialer.duo.DuoComponent.get ( context ) . getDuo ( ) ; return ( ( lightBringer.getPhoneAccountComponentName ( ) ) != null ) && ( lightBringer.getPhoneAccountComponentName ( ) . flattenToString ( ) . equals ( phoneAccountComponentName ) ) ; }

Target:
private static boolean isDuoCall ( java.lang.String phoneAccountComponentName ) { return DuoConstants.PHONE_ACCOUNT_COMPONENT_NAME.flattenToString ( ) . equals ( phoneAccountComponentName ) ; }
Source:
public boolean onOptionsItemSelected ( android.view.MenuItem item ) { if ( ! ( mAcceptUsersInput ) ) { com.android.internal.telephony.cat.CatLog.d ( com.android.stk.StkInputActivity.LOG_TAG , "mAcceptUsersInput:false" ) ; return true ; } switch ( item.getItemId ( ) ) { case StkApp.MENU_ID_END_SESSION : mAcceptUsersInput = false ; cancelTimeOut ( ) ; sendResponse ( StkAppService.RES_ID_END_SESSION ) ; finish ( ) ; return true ; case StkApp.MENU_ID_HELP : mAcceptUsersInput = false ; cancelTimeOut ( ) ; sendResponse ( StkAppService.RES_ID_INPUT , "" , true ) ; finish ( ) ; return true ; } return super . onOptionsItemSelected ( item ) ; }

Target:
private boolean optionsItemSelectedInternal ( android.view.MenuItem item ) { if ( ! ( mAcceptUsersInput ) ) { com.android.internal.telephony.cat.CatLog.d ( com.android.stk.StkInputActivity.LOG_TAG , "mAcceptUsersInput:false" ) ; return true ; } switch ( item.getItemId ( ) ) { case StkApp.MENU_ID_END_SESSION : mAcceptUsersInput = false ; cancelTimeOut ( ) ; sendResponse ( StkAppService.RES_ID_END_SESSION ) ; finish ( ) ; return true ; case StkApp.MENU_ID_HELP : mAcceptUsersInput = false ; cancelTimeOut ( ) ; sendResponse ( StkAppService.RES_ID_INPUT , "" , true ) ; finish ( ) ; return true ; } return false ; }
Source:
public char [ ] formatDouble ( double value , java.text.FieldPosition field ) { libcore.icu.NativeDecimalFormat.FieldPositionIterator fpi = libcore.icu.NativeDecimalFormat.FieldPositionIterator.forFieldPosition ( field ) ; char [ ] result = libcore.icu.NativeDecimalFormat.formatDouble ( this . address , value , fpi ) ; if ( fpi != null ) { libcore.icu.NativeDecimalFormat.FieldPositionIterator.setFieldPosition ( fpi , field ) ; } return result ; }

Target:
public char [ ] formatBigDecimal ( java.math.BigDecimal value , java.text.FieldPosition field ) { libcore.icu.NativeDecimalFormat.FieldPositionIterator fpi = libcore.icu.NativeDecimalFormat.FieldPositionIterator.forFieldPosition ( field ) ; char [ ] result = libcore.icu.NativeDecimalFormat.formatDigitList ( this . address , value.toString ( ) , fpi ) ; if ( ( fpi != null ) && ( field != null ) ) { libcore.icu.NativeDecimalFormat.updateFieldPosition ( field , fpi ) ; } return result ; }
Source:
public java.lang.Integer wifiNanPublish ( @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "callbackId" ) java.lang.Integer callbackId , @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "publishConfig" ) org.json.JSONObject publishConfig ) throws android.os.RemoteException , org.json.JSONException { int sessionId = getNextSessionId ( ) ; mMgr.publish ( com.googlecode.android_scripting.facade.wifi.WifiNanManagerFacade.getPublishConfig ( publishConfig ) , new com.googlecode.android_scripting.facade.wifi.WifiNanManagerFacade.NanDiscoverySessionCallbackPostsEvents ( callbackId , sessionId ) ) ; return sessionId ; }

Target:
public java.lang.Integer wifiNanPublish ( @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "clientId" , description = "The client ID returned when a connection was created" ) java.lang.Integer clientId , @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "publishConfig" ) org.json.JSONObject publishConfig ) throws android.os.RemoteException , org.json.JSONException { synchronized ( mLock ) { android.net.wifi.nan.WifiNanSession session = mSessions.get ( clientId ) ; if ( session == null ) { throw new java.lang.IllegalStateException ( ( ( "Calling wifiNanPublish before session (client ID " + clientId ) + ") is ready/or already disconnected" ) ) ; } int discoverySessionId = getNextDiscoverySessionId ( ) ; session.publish ( com.googlecode.android_scripting.facade.wifi.WifiNanManagerFacade.getPublishConfig ( publishConfig ) , new com.googlecode.android_scripting.facade.wifi.WifiNanManagerFacade.NanDiscoverySessionCallbackPostsEvents ( discoverySessionId ) ) ; return discoverySessionId ; } }
Source:
public com.android.layoutlib.api.LayoutScene render ( com.android.ide.eclipse.adt.internal.editors.uimodel.UiDocumentNode model , int width , int height , java.util.Set < com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode > explodeNodes ) { if ( ! ( ensureFileValid ( ) ) ) { return null ; } if ( ! ( ensureModelValid ( model ) ) ) { return null ; } com.android.ide.common.layoutlib.LayoutLibrary layoutLib = getReadyLayoutLib ( ) ; org.eclipse.core.resources.IProject iProject = mEditedFile.getProject ( ) ; return renderWithBridge ( iProject , model , layoutLib , width , height , explodeNodes ) ; }

Target:
public com.android.layoutlib.api.LayoutScene render ( com.android.ide.eclipse.adt.internal.editors.uimodel.UiDocumentNode model , int width , int height , java.util.Set < com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode > explodeNodes , boolean transparentBackground ) { if ( ! ( ensureFileValid ( ) ) ) { return null ; } if ( ! ( ensureModelValid ( model ) ) ) { return null ; } com.android.ide.common.layoutlib.LayoutLibrary layoutLib = getReadyLayoutLib ( ) ; org.eclipse.core.resources.IProject iProject = mEditedFile.getProject ( ) ; return renderWithBridge ( iProject , model , layoutLib , width , height , explodeNodes , transparentBackground ) ; }
Source:
private int changeCapability ( int capabilities , int capability , boolean enabled ) { if ( enabled ) { return capabilities | capability ; } else { return capabilities & ( ~ capability ) ; } }

Target:
public int applyOriginalConnectionCapabilities ( int capabilities ) { boolean supportsDowngradeToAudio = can ( mOriginalConnectionCapabilities , ( ( com.android.internal.telephony.Connection.Capability.SUPPORTS_DOWNGRADE_TO_VOICE_LOCAL ) | ( com.android.internal.telephony.Connection.Capability.SUPPORTS_DOWNGRADE_TO_VOICE_REMOTE ) ) ) ; capabilities = changeBitmask ( capabilities , com.android.services.telephony.CAPABILITY_CANNOT_DOWNGRADE_VIDEO_TO_AUDIO , ( ! supportsDowngradeToAudio ) ) ; capabilities = changeBitmask ( capabilities , com.android.services.telephony.CAPABILITY_SUPPORTS_VT_REMOTE_BIDIRECTIONAL , can ( mOriginalConnectionCapabilities , Capability.SUPPORTS_VT_REMOTE_BIDIRECTIONAL ) ) ; capabilities = changeBitmask ( capabilities , com.android.services.telephony.CAPABILITY_SUPPORTS_VT_LOCAL_BIDIRECTIONAL , can ( mOriginalConnectionCapabilities , Capability.SUPPORTS_VT_LOCAL_BIDIRECTIONAL ) ) ; return capabilities ; }
Source:
public void exportProject ( @ com.android.annotations.NonNull java.io.File destDir , boolean allowNonEmpty ) throws java.io.IOException { mSummary.setDestDir ( destDir ) ; createDestDir ( destDir , allowNonEmpty ) ; com.android.tools.gradle.eclipse.GradleImport.createProjectBuildGradle ( new java.io.File ( destDir , com.android.SdkConstants.FN_BUILD_GRADLE ) ) ; createSettingsGradle ( new java.io.File ( destDir , com.android.SdkConstants.FN_SETTINGS_GRADLE ) ) ; exportGradleWrapper ( destDir ) ; for ( com.android.tools.gradle.eclipse.ImportModule module : mModules ) { exportModule ( new java.io.File ( destDir , module.getModuleName ( ) ) , module ) ; } mSummary.write ( new java.io.File ( destDir , com.android.tools.gradle.eclipse.GradleImport.IMPORT_SUMMARY_TXT ) ) ; }

Target:
public void exportProject ( @ com.android.annotations.NonNull java.io.File destDir , boolean allowNonEmpty ) throws java.io.IOException { mSummary.setDestDir ( destDir ) ; createDestDir ( destDir , allowNonEmpty ) ; com.android.tools.gradle.eclipse.GradleImport.createProjectBuildGradle ( new java.io.File ( destDir , com.android.SdkConstants.FN_BUILD_GRADLE ) ) ; createSettingsGradle ( new java.io.File ( destDir , com.android.SdkConstants.FN_SETTINGS_GRADLE ) ) ; exportGradleWrapper ( destDir ) ; for ( com.android.tools.gradle.eclipse.ImportModule module : mRootModules ) { exportModule ( new java.io.File ( destDir , module.getModuleName ( ) ) , module ) ; } mSummary.write ( new java.io.File ( destDir , com.android.tools.gradle.eclipse.GradleImport.IMPORT_SUMMARY_TXT ) ) ; }
Source:
public java.lang.String getIccSimChallengeResponse ( int subId , int appType , java.lang.String data ) { try { com.android.internal.telephony.IPhoneSubInfo info = getSubscriberInfo ( ) ; if ( info == null ) return null ; return info.getIccSimChallengeResponse ( subId , appType , data ) ; } catch ( android.os.RemoteException ex ) { return null ; } catch ( java.lang.NullPointerException ex ) { return null ; } }

Target:
public java.lang.String getIccAuthentication ( int appType , int authType , java.lang.String data ) { return getIccAuthentication ( getSubId ( ) , appType , authType , data ) ; }
Source:
public < K , V > java.util.Map < K , V > getAllModels ( @ com.android.annotations.NonNull org.gradle.tooling.BuildAction < java.util.Map < K , V > > action , boolean emulateStudio_1_0 ) { org.gradle.tooling.ProjectConnection connection = getProjectConnection ( ) ; try { return buildModel ( connection , action , emulateStudio_1_0 ) ; } finally { connection.close ( ) ; } }

Target:
public < K , V > java.util.Map < K , V > getAllModels ( @ com.android.annotations.NonNull org.gradle.tooling.BuildAction < java.util.Map < K , V > > action , boolean emulateStudio_1_0 , @ com.android.annotations.Nullable java.lang.String benchmarkName , @ com.android.annotations.Nullable com.android.build.gradle.integration.common.fixture.GradleTestProject.BenchmarkMode benchmarkMode ) { org.gradle.tooling.ProjectConnection connection = getProjectConnection ( ) ; try { return buildModel ( connection , action , emulateStudio_1_0 , benchmarkName , benchmarkMode ) ; } finally { connection.close ( ) ; } }
Source:
public void onCreate ( android.os.Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; android.os.StrictMode.ThreadPolicy policy = new android.os.StrictMode.ThreadPolicy.Builder ( ) . permitAll ( ) . build ( ) ; android.os.StrictMode.setThreadPolicy ( policy ) ; }

Target:
public void onCreate ( android.os.Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; android.os.StrictMode.ThreadPolicy policy = new android.os.StrictMode.ThreadPolicy.Builder ( ) . permitAll ( ) . build ( ) ; android.os.StrictMode.setThreadPolicy ( policy ) ; mContext = this . getApplicationContext ( ) ; mConnectivityManager = ( ( android.net.ConnectivityManager ) ( mContext.getSystemService ( Context.CONNECTIVITY_SERVICE ) ) ) ; mDownloadManager = ( ( android.app.DownloadManager ) ( mContext.getSystemService ( Context.DOWNLOAD_SERVICE ) ) ) ; }
Source:
private libcore.tzdata.update2.BundleVersion readBundleVersion ( java.io.File bundleDir ) throws java.io.IOException , libcore.tzdata.update2.BundleException { android.util.Slog.i ( logTag , "Reading bundle format version" ) ; java.io.File bundleVersionFile = new java.io.File ( bundleDir , TimeZoneBundle.BUNDLE_VERSION_FILE_NAME ) ; if ( ! ( bundleVersionFile.exists ( ) ) ) { throw new libcore.tzdata.update2.BundleException ( ( "No bundle version file found: " + bundleVersionFile ) ) ; } byte [ ] versionBytes = libcore.tzdata.update2.FileUtils.readBytes ( bundleVersionFile , BundleVersion.BUNDLE_VERSION_FILE_LENGTH ) ; return libcore.tzdata.update2.BundleVersion.extractFromBytes ( versionBytes ) ; }

Target:
private libcore.tzdata.update2.BundleVersion readBundleVersion ( java.io.File bundleDir ) throws java.io.IOException , libcore.tzdata.update2.BundleException { android.util.Slog.i ( logTag , "Reading bundle format version" ) ; java.io.File bundleVersionFile = new java.io.File ( bundleDir , TimeZoneBundle.BUNDLE_VERSION_FILE_NAME ) ; if ( ! ( bundleVersionFile.exists ( ) ) ) { throw new libcore.tzdata.update2.BundleException ( ( "No bundle version file found: " + bundleVersionFile ) ) ; } byte [ ] versionBytes = libcore.tzdata.update2.FileUtils.readBytes ( bundleVersionFile , BundleVersion.BUNDLE_VERSION_FILE_LENGTH ) ; return libcore.tzdata.update2.BundleVersion.fromBytes ( versionBytes ) ; }
Source:
private void verifyAudioStateIntent ( int timeoutMs , android.bluetooth.BluetoothDevice device , int newState , int prevState ) { android.content.Intent intent = waitForIntent ( timeoutMs , mAudioStateChangedQueue ) ; org.junit.Assert.assertNotNull ( intent ) ; org.junit.Assert.assertEquals ( BluetoothA2dp.ACTION_PLAYING_STATE_CHANGED , intent.getAction ( ) ) ; org.junit.Assert.assertEquals ( device , intent.getParcelableExtra ( BluetoothDevice.EXTRA_DEVICE ) ) ; org.junit.Assert.assertEquals ( newState , intent.getIntExtra ( BluetoothProfile.EXTRA_STATE , ( - 1 ) ) ) ; org.junit.Assert.assertEquals ( prevState , intent.getIntExtra ( BluetoothProfile.EXTRA_PREVIOUS_STATE , ( - 1 ) ) ) ; }

Target:
private void verifyNoAudioStateIntent ( int timeoutMs ) { android.content.Intent intent = com.android.bluetooth.TestUtils.waitForNoIntent ( timeoutMs , mAudioStateChangedQueue ) ; org.junit.Assert.assertNull ( intent ) ; }
Source:
public void iccCloseLogicalChannel ( int channel , android.os.Message response ) { loglocal ( ( "iccCloseLogicalChannel: " + channel ) ) ; mCi.iccCloseLogicalChannel ( channel , obtainMessage ( com.android.internal.telephony.uicc.UiccProfile.EVENT_CLOSE_LOGICAL_CHANNEL_DONE , response ) ) ; }

Target:
public void iccTransmitApduBasicChannel ( int cla , int command , int p1 , int p2 , int p3 , java.lang.String data , android.os.Message response ) { mCi.iccTransmitApduBasicChannel ( cla , command , p1 , p2 , p3 , data , mHandler.obtainMessage ( com.android.internal.telephony.uicc.UiccProfile.EVENT_TRANSMIT_APDU_BASIC_CHANNEL_DONE , response ) ) ; }
Source:
public void TestRTLineMonkey ( ) { int loopCount = 200 ; int seed = 1 ; if ( ( params.inclusion ) >= 9 ) { loopCount = 2000 ; } logln ( "Line Break Monkey Test" ) ; android.icu.dev.test.rbbi.RBBITestMonkey.RBBILineMonkey m = new android.icu.dev.test.rbbi.RBBITestMonkey.RBBILineMonkey ( ) ; android.icu.text.BreakIterator bi = android.icu.text.BreakIterator.getLineInstance ( java.util.Locale.US ) ; java.lang.String rules = bi.toString ( ) ; android.icu.text.BreakIterator rtbi = new android.icu.text.RuleBasedBreakIterator ( rules ) ; if ( ( params ) == null ) { loopCount = 50 ; } RunMonkey ( rtbi , m , "line" , seed , loopCount ) ; }

Target:
public void TestRTCharMonkey ( ) { int loopCount = 200 ; int seed = 1 ; if ( ( android.icu.dev.test.TestFmwk.getExhaustiveness ( ) ) >= 9 ) { loopCount = 2000 ; } android.icu.dev.test.rbbi.RBBITestMonkey.RBBICharMonkey m = new android.icu.dev.test.rbbi.RBBITestMonkey.RBBICharMonkey ( ) ; android.icu.text.BreakIterator bi = android.icu.text.BreakIterator.getCharacterInstance ( java.util.Locale.US ) ; java.lang.String rules = bi.toString ( ) ; android.icu.text.BreakIterator rtbi = new android.icu.text.RuleBasedBreakIterator ( rules ) ; RunMonkey ( rtbi , m , "char" , seed , loopCount ) ; }
Source:
public void requestNetwork ( android.net.NetworkRequest request , android.app.PendingIntent operation ) { checkPendingIntent ( operation ) ; try { mService.pendingRequestForNetwork ( request.networkCapabilities , operation ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } }

Target:
public void requestNetwork ( android.net.NetworkRequest request , android.app.PendingIntent operation ) { checkPendingIntent ( operation ) ; try { mService.pendingRequestForNetwork ( request.networkCapabilities , operation ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } catch ( android.os.ServiceSpecificException e ) { throw android.net.ConnectivityManager.convertServiceException ( e ) ; } }
Source:
public void testParsingUncommonTimeZoneAbbreviations ( ) { java.lang.String fmt = "yyyy-MM-dd HH:mm:ss.SSS z" ; java.lang.String date = "2010-12-23 12:44:57.0 CET" ; assertEquals ( 1293104697000L , parseDate ( java.util.Locale.UK , fmt , date ) . getTimeInMillis ( ) ) ; assertEquals ( 1293104697000L , parseDate ( java.util.Locale.US , fmt , date ) . getTimeInMillis ( ) ) ; }

Target:
public void testFiveCount_L ( ) throws java.lang.Exception { java.util.TimeZone.setDefault ( java.util.TimeZone.getTimeZone ( "GMT" ) ) ; assertEquals ( "1" , formatDate ( java.util.Locale.ENGLISH , "L" ) ) ; assertEquals ( "01" , formatDate ( java.util.Locale.ENGLISH , "LL" ) ) ; assertEquals ( "Jan" , formatDate ( java.util.Locale.ENGLISH , "LLL" ) ) ; assertEquals ( "January" , formatDate ( java.util.Locale.ENGLISH , "LLLL" ) ) ; assertEquals ( "J" , formatDate ( java.util.Locale.ENGLISH , "LLLLL" ) ) ; }
Source:
private static native long nativeGetTotalStat ( int type ) ;

Target:
public static long getUidRxBytes ( int uid ) { final int callingUid = android.net.android.os.Process.myUid ( ) ; if ( ( callingUid == android.net.android.os.Process ) || ( callingUid == uid ) ) { try { return android.net.TrafficStats.getStatsService ( ) . getUidStats ( uid , android.net.TrafficStats.TYPE_RX_BYTES ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } } else { return android.net.TrafficStats.UNSUPPORTED ; } }
Source:
public void createUserData ( java.lang.String uuid , int userId , int userSerial , int flags ) throws com.android.internal.os.InstallerConnection.InstallerException { mInstaller.execute ( "create_user_data" , uuid , userId , userSerial , flags ) ; }

Target:
public void createUserData ( java.lang.String uuid , int userId , int userSerial , int flags ) throws com.android.internal.os.InstallerConnection.InstallerException { checkLock ( ) ; try { mInstalld.createUserData ( uuid , userId , userSerial , flags ) ; } catch ( android.os.RemoteException | android.os.ServiceSpecificException e ) { throw new com.android.internal.os.InstallerConnection.InstallerException ( e.getMessage ( ) ) ; } }
Source:
public void testSetWifiDisabledNoToggle ( ) throws java.lang.Exception { when ( mSettingsStore.handleWifiToggled ( org.mockito.Matchers.eq ( false ) ) ) . thenReturn ( false ) ; org.junit.Assert.assertTrue ( mWifiServiceImpl.setWifiEnabled ( com.android.server.wifi.WifiServiceImplTest.TEST_PACKAGE_NAME , false ) ) ; verify ( mWifiController , never ( ) ) . obtainMessageAndSend ( org.mockito.Matchers.eq ( com.android.server.wifi.WifiController.CMD_WIFI_TOGGLED ) ) ; }

Target:
public void testSetWifiEnabledNoToggle ( ) throws java.lang.Exception { when ( mWifiStateMachine.syncGetWifiApState ( ) ) . thenReturn ( WifiManager.WIFI_AP_STATE_DISABLED ) ; when ( mSettingsStore.handleWifiToggled ( org.mockito.Matchers.eq ( true ) ) ) . thenReturn ( false ) ; org.junit.Assert.assertTrue ( mWifiServiceImpl.setWifiEnabled ( com.android.server.wifi.WifiServiceImplTest.TEST_PACKAGE_NAME , true ) ) ; verify ( mWifiController , never ( ) ) . sendMessage ( org.mockito.Matchers.eq ( com.android.server.wifi.WifiController.CMD_WIFI_TOGGLED ) ) ; }
Source:
public static void assertEquals ( java.lang.String message , long expected , long actual ) { org.junit.Assert.assertEquals ( message , ( ( java.lang.Long ) ( expected ) ) , ( ( java.lang.Long ) ( actual ) ) ) ; }

Target:
public static void assertEquals ( java.lang.String message , float expected , float actual , float delta ) { if ( org.junit.Assert.floatIsDifferent ( expected , actual , delta ) ) { org.junit.Assert.failNotEquals ( message , java.lang.Float.valueOf ( expected ) , java.lang.Float.valueOf ( actual ) ) ; } }
Source:
protected void updateSearchPanel ( ) { super . updateSearchPanel ( ) ; mSearchPanelView.setStatusBarView ( mNavigationBarView ) ; mNavigationBarView.setDelegateView ( mSearchPanelView ) ; }

Target:
public void destroy ( ) { super . destroy ( ) ; if ( ( mStatusBarWindow ) != null ) { mWindowManager.removeViewImmediate ( mStatusBarWindow ) ; } if ( ( mNavigationBarView ) != null ) { mWindowManager.removeViewImmediate ( mNavigationBarView ) ; } mContext.unregisterReceiver ( mBroadcastReceiver ) ; }
Source:
public double get ( android.icu.text.PluralRules.Operand operand ) { switch ( operand ) { default : return source ; case i : return integerValue ; case f : return decimalDigits ; case t : return decimalDigitsWithoutTrailingZeros ; case v : return visibleDecimalDigitCount ; case w : return visibleDecimalDigitCountWithoutTrailingZeros ; } }

Target:
public double getPluralOperand ( android.icu.text.PluralRules.Operand operand ) { switch ( operand ) { case n : return source ; case i : return integerValue ; case f : return decimalDigits ; case t : return decimalDigitsWithoutTrailingZeros ; case v : return visibleDecimalDigitCount ; case w : return visibleDecimalDigitCountWithoutTrailingZeros ; default : return source ; } }
Source:
public java.util.List < android.view.inputmethod.InputMethodSubtype > getEnabledInputMethodSubtypeList ( android.view.inputmethod.InputMethodInfo imi , boolean allowsImplicitlySelectedSubtypes ) { try { return mService.getEnabledInputMethodSubtypeList ( ( imi == null ? null : imi.getId ( ) ) , allowsImplicitlySelectedSubtypes ) ; } catch ( android.os.RemoteException e ) { throw new java.lang.RuntimeException ( e ) ; } }

Target:
public java.util.List < android.view.inputmethod.InputMethodInfo > getInputMethodList ( ) { try { return mService.getInputMethodList ( ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } }
Source:
public void test_SSLEngine_setEnableSessionCreation_client ( ) throws java.lang.Exception { try { libcore.javax.net.ssl.TestSSLEnginePair.create ( new libcore.javax.net.ssl.TestSSLEnginePair.Hooks ( ) { @ java.lang.Override void beforeBeginHandshake ( javax.net.ssl.SSLEngine client , javax.net.ssl.SSLEngine server ) { client.setEnableSessionCreation ( false ) ; } } ) ; fail ( ) ; } catch ( javax.net.ssl.SSLException expected ) { } }

Target:
public void test_SSLEngine_setEnableSessionCreation_client ( ) throws java.lang.Exception { libcore.javax.net.ssl.TestSSLEnginePair p = null ; try { p = libcore.javax.net.ssl.TestSSLEnginePair.create ( new libcore.javax.net.ssl.TestSSLEnginePair.Hooks ( ) { @ java.lang.Override void beforeBeginHandshake ( javax.net.ssl.SSLEngine client , javax.net.ssl.SSLEngine server ) { client.setEnableSessionCreation ( false ) ; } } ) ; fail ( ) ; } catch ( javax.net.ssl.SSLException expected ) { } finally { if ( p != null ) { p.close ( ) ; } } }
Source:
com.google.common.cache.LocalCache.ReferenceEntry < K , V > getLiveEntry ( @ javax.annotation.Nullable java.lang.Object key ) { if ( key == null ) { return null ; } int hash = hash ( key ) ; return segmentFor ( hash ) . getLiveEntry ( key , hash , ticker.read ( ) ) ; }

Target:
int hash ( @ javax.annotation.Nullable java.lang.Object key ) { int h = keyEquivalence.hash ( key ) ; return com.google.common.cache.LocalCache.rehash ( h ) ; }
Source:
public android.content.ContentValues coalesce ( java.util.List < android.content.ContentValues > individualRowsSortedByTimestampDesc ) { return new com.android.dialer.calllog.datasources.util.RowCombiner ( individualRowsSortedByTimestampDesc ) . useMostRecentLong ( AnnotatedCallLog.TIMESTAMP ) . useMostRecentLong ( AnnotatedCallLog.NEW ) . useMostRecentString ( AnnotatedCallLog.NUMBER_TYPE_LABEL ) . useMostRecentString ( AnnotatedCallLog.NAME ) . useMostRecentString ( AnnotatedCallLog.FORMATTED_NUMBER ) . useMostRecentString ( AnnotatedCallLog.PHOTO_URI ) . useMostRecentLong ( AnnotatedCallLog.PHOTO_ID ) . useMostRecentString ( AnnotatedCallLog.LOOKUP_URI ) . useMostRecentString ( AnnotatedCallLog.GEOCODED_LOCATION ) . useSingleValueString ( AnnotatedCallLog.PHONE_ACCOUNT_LABEL ) . useSingleValueLong ( AnnotatedCallLog.PHONE_ACCOUNT_COLOR ) . useMostRecentLong ( AnnotatedCallLog.CALL_TYPE ) . combine ( ) ; }

Target:
public android.content.ContentValues coalesce ( java.util.List < android.content.ContentValues > individualRowsSortedByTimestampDesc ) { return new com.android.dialer.calllog.datasources.util.RowCombiner ( individualRowsSortedByTimestampDesc ) . useMostRecentLong ( AnnotatedCallLog.TIMESTAMP ) . useMostRecentLong ( AnnotatedCallLog.NEW ) . useMostRecentString ( AnnotatedCallLog.NUMBER_TYPE_LABEL ) . useMostRecentString ( AnnotatedCallLog.NAME ) . useMostRecentBlob ( AnnotatedCallLog.NUMBER ) . useMostRecentString ( AnnotatedCallLog.FORMATTED_NUMBER ) . useMostRecentString ( AnnotatedCallLog.PHOTO_URI ) . useMostRecentLong ( AnnotatedCallLog.PHOTO_ID ) . useMostRecentString ( AnnotatedCallLog.LOOKUP_URI ) . useMostRecentString ( AnnotatedCallLog.GEOCODED_LOCATION ) . useSingleValueString ( AnnotatedCallLog.PHONE_ACCOUNT_COMPONENT_NAME ) . useSingleValueString ( AnnotatedCallLog.PHONE_ACCOUNT_ID ) . useSingleValueString ( AnnotatedCallLog.PHONE_ACCOUNT_LABEL ) . useSingleValueLong ( AnnotatedCallLog.PHONE_ACCOUNT_COLOR ) . useMostRecentLong ( AnnotatedCallLog.CALL_TYPE ) . combine ( ) ; }
Source:
public com.android.sdklib.IAndroidTarget [ ] getTargets ( ) { if ( ( mTargets ) == null ) { java.io.File sdkHome = getSdkHome ( ) ; if ( sdkHome != null ) { com.android.sdklib.repository.local.LocalSdk localSdk = new com.android.sdklib.repository.local.LocalSdk ( sdkHome ) ; mTargets = localSdk.getTargets ( ) ; } else { mTargets = new com.android.sdklib.IAndroidTarget [ 0 ] ; } } return mTargets ; }

Target:
public com.android.sdklib.IAndroidTarget [ ] getTargets ( ) { if ( ( mTargets ) == null ) { com.android.sdklib.repository.local.LocalSdk localSdk = getSdk ( ) ; if ( localSdk != null ) { mTargets = localSdk.getTargets ( ) ; } else { mTargets = new com.android.sdklib.IAndroidTarget [ 0 ] ; } } return mTargets ; }
Source:
public void test_toString ( ) { java.lang.String fileName = ( ( java.lang.System.getProperty ( "user.home" ) ) + ( java.io.File.separator ) ) + "input.tst" ; java.io.File f = new java.io.File ( fileName ) ; assertEquals ( "Incorrect string returned" , fileName , f.toString ( ) ) ; if ( ( java.io.File.separatorChar ) == '\\' ) { java.lang.String result = new java.io.File ( "c:\\" ) . toString ( ) ; assertEquals ( "Removed backslash" , "c:\\" , result ) ; } }

Target:
public void test_toString ( ) { java.lang.String fileName = java.lang.System.getProperty ( "user.home" ) ; if ( ! ( fileName.endsWith ( java.io.File.separator ) ) ) { fileName += java.io.File.separator ; } fileName += "input.tst" ; java.io.File f = new java.io.File ( fileName ) ; assertEquals ( "Incorrect string returned" , fileName , f.toString ( ) ) ; if ( ( java.io.File.separatorChar ) == '\\' ) { java.lang.String result = new java.io.File ( "c:\\" ) . toString ( ) ; assertEquals ( "Removed backslash" , "c:\\" , result ) ; } }
Source:
public void handleMessage ( android.os.Message msg ) { debugLog ( ( "handleMessage() - Message: " + ( msg.what ) ) ) ; switch ( msg.what ) { case com.android.bluetooth.btservice.AdapterService.MESSAGE_PROFILE_SERVICE_STATE_CHANGED : { debugLog ( "handleMessage() - MESSAGE_PROFILE_SERVICE_STATE_CHANGED" ) ; processProfileServiceStateChanged ( ( ( java.lang.String ) ( msg.obj ) ) , msg.arg1 ) ; } break ; } }

Target:
boolean stopGattProfileService ( ) { setProfileServiceState ( com.android.bluetooth.gatt.GattService.class , BluetoothAdapter.STATE_OFF ) ; return true ; }
Source:
public void visitMethodInsn ( final int opcode , final java.lang.String owner , final java.lang.String name , final java.lang.String desc ) { if ( opcode == ( INVOKEINTERFACE ) ) { minSize += 5 ; maxSize += 5 ; } else { minSize += 3 ; maxSize += 3 ; } if ( ( mv ) != null ) { mv.visitMethodInsn ( opcode , owner , name , desc ) ; } }

Target:
private void doVisitMethodInsn ( int opcode , final java.lang.String owner , final java.lang.String name , final java.lang.String desc , final boolean itf ) { if ( opcode == ( INVOKEINTERFACE ) ) { minSize += 5 ; maxSize += 5 ; } else { minSize += 3 ; maxSize += 3 ; } if ( ( mv ) != null ) { mv.visitMethodInsn ( opcode , owner , name , desc , itf ) ; } }
Source:
public final void onSmsReceived ( java.lang.String format , byte [ ] pdu ) throws java.lang.IllegalStateException { synchronized ( mLock ) { if ( ( mListener ) == null ) { throw new java.lang.IllegalStateException ( "Feature not ready." ) ; } try { mListener.onSmsReceived ( format , pdu ) ; acknowledgeSms ( ( - 1 ) , android.telephony.ims.internal.SmsImplBase.DELIVER_STATUS_OK ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.telephony.ims.internal.SmsImplBase.LOG_TAG , ( "Can not deliver sms: " + ( e.getMessage ( ) ) ) ) ; acknowledgeSms ( ( - 1 ) , android.telephony.ims.internal.SmsImplBase.DELIVER_STATUS_ERROR ) ; } } }

Target:
public final void onSmsReceived ( int token , java.lang.String format , byte [ ] pdu ) throws java.lang.IllegalStateException { synchronized ( mLock ) { if ( ( mListener ) == null ) { throw new java.lang.IllegalStateException ( "Feature not ready." ) ; } try { mListener.onSmsReceived ( token , format , pdu ) ; acknowledgeSms ( token , 0 , android.telephony.ims.internal.SmsImplBase.DELIVER_STATUS_OK ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.telephony.ims.internal.SmsImplBase.LOG_TAG , ( "Can not deliver sms: " + ( e.getMessage ( ) ) ) ) ; acknowledgeSms ( token , 0 , android.telephony.ims.internal.SmsImplBase.DELIVER_STATUS_ERROR ) ; } } }
Source:
public void dumpDbInfo ( java.io.FileDescriptor fd , java.lang.String [ ] args ) { java.io.PrintWriter pw = new com.android.internal.util.FastPrintWriter ( new java.io.FileOutputStream ( fd ) ) ; android.util.PrintWriterPrinter printer = new android.util.PrintWriterPrinter ( pw ) ; android.database.sqlite.SQLiteDebug.dump ( printer , args ) ; pw.flush ( ) ; }

Target:
private void dumpDatabaseInfo ( java.io.FileDescriptor fd , java.lang.String [ ] args ) { java.io.PrintWriter pw = new com.android.internal.util.FastPrintWriter ( new java.io.FileOutputStream ( fd ) ) ; android.util.PrintWriterPrinter printer = new android.util.PrintWriterPrinter ( pw ) ; android.database.sqlite.SQLiteDebug.dump ( printer , args ) ; pw.flush ( ) ; }
Source:
private void verifyNoNetwork ( ) { assertNull ( mCm.getActiveNetworkInfo ( ) ) ; assertNull ( mCm.getActiveNetwork ( ) ) ; assertNull ( mCm.getActiveNetworkForUid ( java.lang.Process.myUid ( ) ) ) ; assertEquals ( 0 , mCm.getAllNetworks ( ) . length ) ; }

Target:
private void verifyNoNetwork ( ) { assertNull ( mCm.getActiveNetworkInfo ( ) ) ; assertNull ( mCm.getActiveNetwork ( ) ) ; assertNull ( mCm.getActiveNetworkForUid ( java.lang.Process.myUid ( ) ) ) ; com.android.server.ConnectivityServiceTest.assertEmpty ( mCm.getAllNetworks ( ) ) ; }
Source:
public void checkStateChanged ( org.eclipse.jface.viewers.CheckStateChangedEvent event ) { java.lang.Object [ ] checked = mCheckboxTableViewer.getCheckedElements ( ) ; java.util.List < com.android.ide.eclipse.adt.internal.wizards.newproject.ImportedProject > selected = new java.util.ArrayList < com.android.ide.eclipse.adt.internal.wizards.newproject.ImportedProject > ( checked.length ) ; for ( java.lang.Object o : checked ) { if ( ! ( mCheckboxTableViewer.getGrayed ( o ) ) ) { selected.add ( ( ( com.android.ide.eclipse.adt.internal.wizards.newproject.ImportedProject ) ( o ) ) ) ; } } mValues.importProjects = selected ; validatePage ( ) ; }

Target:
public void checkStateChanged ( org.eclipse.jface.viewers.CheckStateChangedEvent event ) { java.lang.Object [ ] checked = mCheckboxTableViewer.getCheckedElements ( ) ; java.util.List < com.android.ide.eclipse.adt.internal.wizards.newproject.ImportedProject > selected = new java.util.ArrayList < com.android.ide.eclipse.adt.internal.wizards.newproject.ImportedProject > ( checked.length ) ; for ( java.lang.Object o : checked ) { if ( ! ( mCheckboxTableViewer.getGrayed ( o ) ) ) { selected.add ( ( ( com.android.ide.eclipse.adt.internal.wizards.newproject.ImportedProject ) ( o ) ) ) ; } } mValues.importProjects = selected ; validatePage ( ) ; mCheckboxTableViewer.update ( event.getElement ( ) , null ) ; }
Source:
private java.security.SignatureSpi getSpi ( java.security.Key key ) { synchronized ( initLock ) { if ( ( spiImpl ) != null ) { return spiImpl ; } final org.apache.harmony.security.fortress.Engine.SpiAndProvider sap = java.security.Signature.tryAlgorithm ( key , provider , algorithm ) ; if ( sap == null ) { throw new java.security.ProviderException ( ( "No provider for " + ( getAlgorithm ( ) ) ) ) ; } spiImpl = ( ( java.security.SignatureSpi ) ( sap.spi ) ) ; provider = sap.provider ; return spiImpl ; } }

Target:
private java.security.SignatureSpi getSpi ( java.security.Key key ) { synchronized ( initLock ) { if ( ( ( spiImpl ) != null ) && ( key == null ) ) { return spiImpl ; } final org.apache.harmony.security.fortress.Engine.SpiAndProvider sap = java.security.Signature.tryAlgorithm ( key , specifiedProvider , algorithm ) ; if ( sap == null ) { throw new java.security.ProviderException ( ( "No provider for " + ( getAlgorithm ( ) ) ) ) ; } spiImpl = ( ( java.security.SignatureSpi ) ( sap.spi ) ) ; provider = sap.provider ; return spiImpl ; } }
Source:
public void testProviderService_supportsParameter_SupportedKeyClasses_Success ( ) throws java.lang.Exception { java.security.Provider provider = new libcore.java.security.ProviderTest.MockProvider ( "MockProvider" ) { public void setup ( ) { put ( "Signature.FOO" , libcore.java.security.ProviderTest.MockSpi.class . getName ( ) ) ; put ( "Signature.FOO SupportedKeyClasses" , libcore.javax.crypto.MockKey.class . getName ( ) ) ; } } ; java.security.Security.addProvider ( provider ) ; try { java.security.Provider.Service service = provider.getService ( "Signature" , "FOO" ) ; assertTrue ( service.supportsParameter ( new libcore.javax.crypto.MockKey ( ) ) ) ; } finally { java.security.Security.removeProvider ( provider.getName ( ) ) ; } }

Target:
public void testProviderService_supportsParameter_KnownService_Null_Failure ( ) throws java.lang.Exception { java.security.Provider provider = new libcore.java.security.ProviderTest.MockProvider ( "MockProvider" ) { public void setup ( ) { put ( "Signature.FOO" , libcore.java.security.ProviderTest.MockSpi.class . getName ( ) ) ; put ( "Signature.FOO SupportedKeyClasses" , java.security.interfaces.RSAPrivateKey.class . getName ( ) ) ; } } ; java.security.Security.addProvider ( provider ) ; try { java.security.Provider.Service service = provider.getService ( "Signature" , "FOO" ) ; assertFalse ( service.supportsParameter ( null ) ) ; } finally { java.security.Security.removeProvider ( provider.getName ( ) ) ; } }