auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void keyFeedbackFromInput ( android.view.KeyEvent event ) { if ( ( ( event.getAction ( ) ) == ( android.view.KeyEvent.ACTION_DOWN ) ) && ( ( ( event.getFlags ( ) ) & ( android.view.KeyEvent.FLAG_VIRTUAL_HARD_KEY ) ) != 0 ) ) { performHapticFeedbackLw ( null , HapticFeedbackConstants.VIRTUAL_KEY , false ) ; } }

Target:
private void updateLockScreenTimeout ( ) { synchronized ( mScreenLockTimeout ) { boolean enable = ( ( mAllowLockscreenWhenOn ) && ( mScreenOn ) ) && ( mKeyguardMediator.isSecure ( ) ) ; if ( ( mLockScreenTimerActive ) != enable ) { if ( enable ) { if ( com.android.internal.policy.impl.PhoneWindowManager.localLOGV ) android.util.Log.v ( com.android.internal.policy.impl.PhoneWindowManager.TAG , "setting lockscreen timer" ) ; mHandler.postDelayed ( mScreenLockTimeout , mLockScreenTimeout ) ; } else { if ( com.android.internal.policy.impl.PhoneWindowManager.localLOGV ) android.util.Log.v ( com.android.internal.policy.impl.PhoneWindowManager.TAG , "clearing lockscreen timer" ) ; mHandler.removeCallbacks ( mScreenLockTimeout ) ; } mLockScreenTimerActive = enable ; } } }
Source:
private void verifyRemovePasspointNetworkFromWifiConfigManager ( android.net.wifi.WifiConfiguration configuration ) throws java.lang.Exception { assertTrue ( mWifiConfigManager.removeNetwork ( configuration.networkId , com.android.server.wifi.WifiConfigManagerTest.TEST_CREATOR_UID ) ) ; verify ( mWifiKeyStore , never ( ) ) . removeKeys ( any ( android.net.wifi.WifiEnterpriseConfig.class ) ) ; verifyNetworkRemoveBroadcast ( configuration ) ; mContextConfigStoreMockOrder.verify ( mWifiConfigStore , never ( ) ) . write ( anyBoolean ( ) , any ( com.android.server.wifi.WifiConfigStoreData.class ) ) ; }

Target:
private void setupStoreDataForUserRead ( java.util.List < android.net.wifi.WifiConfiguration > userConfigurations , java.util.Set < java.lang.String > deletedEphemeralSsids ) { when ( mNetworkListStoreData.getUserConfigurations ( ) ) . thenReturn ( userConfigurations ) ; when ( mDeletedEphemeralSsidsStoreData.getSsidList ( ) ) . thenReturn ( deletedEphemeralSsids ) ; }
Source:
protected int engineUpdate ( byte [ ] input , int inputOffset , int inputLen , byte [ ] output , int outputOffset ) throws javax.crypto.ShortBufferException { return updateInternal ( input , inputOffset , inputLen , output , outputOffset ) ; }

Target:
protected int engineUpdate ( byte [ ] input , int inputOffset , int inputLen , byte [ ] output , int outputOffset ) throws javax.crypto.ShortBufferException { final int maximumLen = getOutputSize ( inputLen ) ; return updateInternal ( input , inputOffset , inputLen , output , outputOffset , maximumLen ) ; }
Source:
public java.lang.String getNumberLabel ( ) { switch ( nameSource ) { case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.CP2_DEFAULT_DIRECTORY : return com.android.dialer.common.Assert.isNotNull ( firstDefaultCp2Contact ) . getLabel ( ) ; case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.CP2_EXTENDED_DIRECTORY : return com.android.dialer.common.Assert.isNotNull ( firstExtendedCp2Contact ) . getLabel ( ) ; case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.PEOPLE_API : case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.CEQUINT : case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.CNAP : case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.NONE : return "" ; default : throw com.android.dialer.common.Assert.createUnsupportedOperationFailException ( java.lang.String.format ( "Unsupported name source: %s" , nameSource ) ) ; } }

Target:
public java.lang.String getNumberLabel ( ) { switch ( nameSource ) { case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.CP2_DEFAULT_DIRECTORY : return com.android.dialer.common.Assert.isNotNull ( firstDefaultCp2Contact ) . getLabel ( ) ; case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.CP2_EXTENDED_DIRECTORY : return com.android.dialer.common.Assert.isNotNull ( firstExtendedCp2Contact ) . getLabel ( ) ; case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.PHONE_NUMBER_CACHE : return phoneLookupInfo.getMigratedInfo ( ) . getLabel ( ) ; case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.PEOPLE_API : case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.CEQUINT : case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.CNAP : case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.NONE : return "" ; default : throw com.android.dialer.common.Assert.createUnsupportedOperationFailException ( java.lang.String.format ( "Unsupported name source: %s" , nameSource ) ) ; } }
Source:
private void runDeviceTests ( java.lang.String pkgName , java.lang.String testClassName , java.lang.String testMethodName ) throws com.android.tradefed.device.DeviceNotAvailableException { com.android.ddmlib.testrunner.RemoteAndroidTestRunner testRunner = new com.android.ddmlib.testrunner.RemoteAndroidTestRunner ( pkgName , com.android.graphics.benchmark.testtype.GraphicsBenchmarkHostsideController.AJUR_RUNNER , getDevice ( ) . getIDevice ( ) ) ; testRunner.setMethodName ( testClassName , testMethodName ) ; testRunner.addInstrumentationArg ( "timeout_msec" , java.lang.Long.toString ( com.android.graphics.benchmark.testtype.GraphicsBenchmarkHostsideController.DEFAULT_TEST_TIMEOUT_MS ) ) ; testRunner.setMaxTimeout ( com.android.graphics.benchmark.testtype.GraphicsBenchmarkHostsideController.DEFAULT_MAX_TIMEOUT_TO_OUTPUT_MS , java.util.concurrent.TimeUnit.MILLISECONDS ) ; com.android.tradefed.result.CollectingTestListener listener = new com.android.tradefed.result.CollectingTestListener ( ) ; getDevice ( ) . runInstrumentationTests ( testRunner , listener ) ; }

Target:
private void runDeviceTests ( java.lang.String pkgName , java.lang.String testClassName , java.lang.String testMethodName ) throws com.android.tradefed.device.DeviceNotAvailableException { com.android.ddmlib.testrunner.RemoteAndroidTestRunner testRunner = new com.android.ddmlib.testrunner.RemoteAndroidTestRunner ( pkgName , com.android.game.qualification.testtype.GameQualificationHostsideController.AJUR_RUNNER , getDevice ( ) . getIDevice ( ) ) ; testRunner.setMethodName ( testClassName , testMethodName ) ; testRunner.addInstrumentationArg ( "timeout_msec" , java.lang.Long.toString ( com.android.game.qualification.testtype.GameQualificationHostsideController.DEFAULT_TEST_TIMEOUT_MS ) ) ; testRunner.setMaxTimeout ( com.android.game.qualification.testtype.GameQualificationHostsideController.DEFAULT_MAX_TIMEOUT_TO_OUTPUT_MS , java.util.concurrent.TimeUnit.MILLISECONDS ) ; com.android.tradefed.result.CollectingTestListener listener = new com.android.tradefed.result.CollectingTestListener ( ) ; getDevice ( ) . runInstrumentationTests ( testRunner , listener ) ; }
Source:
public void removeConnectionServiceAdapter ( com.android.internal.telecom.IConnectionServiceAdapter adapter ) { mHandler.obtainMessage ( android.telecom.ConnectionService.MSG_REMOVE_CONNECTION_SERVICE_ADAPTER , adapter ) . sendToTarget ( ) ; }

Target:
public void swapConference ( java.lang.String callId , android.telecom.Logging.Session.Info sessionInfo ) { android.telecom.Log.startSession ( sessionInfo , android.telecom.ConnectionService.SESSION_SWAP_CONFERENCE ) ; try { com.android.internal.os.SomeArgs args = com.android.internal.os.SomeArgs.obtain ( ) ; args.arg1 = callId ; args.arg2 = android.telecom.Log.createSubsession ( ) ; mHandler.obtainMessage ( android.telecom.ConnectionService.MSG_SWAP_CONFERENCE , args ) . sendToTarget ( ) ; } finally { android.telecom.Log.endSession ( ) ; } }
Source:
private static void enqueueSentinelReference ( java.lang.ref.FinalizerReference.Sentinel sentinel ) { synchronized ( java.lang.ref.FinalizerReference.LIST_LOCK ) { for ( java.lang.ref.FinalizerReference r = java.lang.ref.FinalizerReference.head ; r != null ; r = r.next ) { if ( ( r.referent ) == sentinel ) { r.referent = null ; r.zombie = sentinel ; r.enqueueInternal ( ) ; return ; } } } throw new java.lang.AssertionError ( "newly-created live Sentinel not on list!" ) ; }

Target:
private static void enqueueSentinelReference ( java.lang.ref.FinalizerReference.Sentinel sentinel ) { synchronized ( java.lang.ref.FinalizerReference.LIST_LOCK ) { for ( java.lang.ref.FinalizerReference < ? > r = java.lang.ref.FinalizerReference.head ; r != null ; r = r.next ) { if ( ( r.referent ) == sentinel ) { java.lang.ref.FinalizerReference < java.lang.ref.FinalizerReference.Sentinel > sentinelReference = ( ( java.lang.ref.FinalizerReference < java.lang.ref.FinalizerReference.Sentinel > ) ( r ) ) ; sentinelReference.referent = null ; sentinelReference.zombie = sentinel ; sentinelReference.enqueueInternal ( ) ; return ; } } } throw new java.lang.AssertionError ( "newly-created live Sentinel not on list!" ) ; }
Source:
public void loadQuickContactBadge ( android.widget.QuickContactBadge badge , com.android.dialer.glidephotomanager.PhotoInfo photoInfo ) { com.android.dialer.common.Assert.isMainThread ( ) ; badge.assignContactUri ( com.android.dialer.glidephotomanager.impl.GlidePhotoManagerImpl.parseUri ( photoInfo.getLookupUri ( ) ) ) ; badge.setOverlay ( null ) ; com.android.dialer.glide.GlideRequest < android.graphics.drawable.Drawable > request = buildRequest ( com.android.dialer.glide.GlideApp.with ( badge ) , photoInfo ) ; request.into ( badge ) ; }

Target:
public void loadQuickContactBadge ( android.widget.QuickContactBadge badge , com.android.dialer.glidephotomanager.PhotoInfo photoInfo ) { com.android.dialer.common.Assert.isMainThread ( ) ; badge.assignContactUri ( ( android.text.TextUtils.isEmpty ( photoInfo.getLookupUri ( ) ) ? com.android.dialer.glidephotomanager.impl.DefaultLookupUriGenerator.generateUri ( photoInfo ) : com.android.dialer.glidephotomanager.impl.GlidePhotoManagerImpl.parseUri ( photoInfo.getLookupUri ( ) ) ) ) ; badge.setOverlay ( null ) ; com.android.dialer.glide.GlideRequest < android.graphics.drawable.Drawable > request = buildRequest ( com.android.dialer.glide.GlideApp.with ( badge ) , photoInfo ) ; request.into ( badge ) ; }
Source:
public java.util.List < com.android.tv.dvr.ScheduledRecording > getAvailableScheduledRecording ( long seriesRecordingId ) { if ( ! ( mDataManager.isDvrScheduleLoadFinished ( ) ) ) { return java.util.Collections.emptyList ( ) ; } java.util.List < com.android.tv.dvr.ScheduledRecording > schedules = new java.util.ArrayList < > ( ) ; for ( com.android.tv.dvr.ScheduledRecording schedule : mDataManager.getScheduledRecordings ( seriesRecordingId ) ) { if ( ( schedule.isInProgress ( ) ) || ( schedule.isNotStarted ( ) ) ) { schedules.add ( schedule ) ; } } return schedules ; }

Target:
public java.util.List < com.android.tv.dvr.data.ScheduledRecording > getAvailableScheduledRecording ( long seriesRecordingId ) { if ( ! ( mDataManager.isDvrScheduleLoadFinished ( ) ) ) { return java.util.Collections.emptyList ( ) ; } java.util.List < com.android.tv.dvr.data.ScheduledRecording > schedules = new java.util.ArrayList < > ( ) ; for ( com.android.tv.dvr.data.ScheduledRecording schedule : mDataManager.getScheduledRecordings ( seriesRecordingId ) ) { if ( ( schedule.isInProgress ( ) ) || ( schedule.isNotStarted ( ) ) ) { schedules.add ( schedule ) ; } } return schedules ; }
Source:
public java.lang.String loadLabel ( android.media.tv.TvInputInfo info ) { return info.loadLabel ( mContext ) . toString ( ) ; }

Target:
public java.lang.String loadLabel ( android.media.tv.TvInputInfo info ) { java.lang.String label = mTvInputLabels.get ( info.getId ( ) ) ; if ( label == null ) { label = info.loadLabel ( mContext ) . toString ( ) ; mTvInputLabels.put ( info.getId ( ) , label ) ; } return label ; }
Source:
public boolean hasCaCertInstalled ( @ android.annotation.Nullable android.content.ComponentName admin , byte [ ] certBuffer ) { throwIfParentInstance ( "hasCaCertInstalled" ) ; if ( ( mService ) != null ) { try { mService.enforceCanManageCaCerts ( admin ) ; return ( android.app.admin.DevicePolicyManager.getCaCertAlias ( certBuffer ) ) != null ; } catch ( android.os.RemoteException re ) { throw re.rethrowFromSystemServer ( ) ; } catch ( java.security.cert.CertificateException ce ) { android.util.Log.w ( android.app.admin.DevicePolicyManager.TAG , "Could not parse certificate" , ce ) ; } } return false ; }

Target:
public boolean hasCaCertInstalled ( @ android.annotation.Nullable android.content.ComponentName admin , byte [ ] certBuffer ) { throwIfParentInstance ( "hasCaCertInstalled" ) ; if ( ( mService ) != null ) { try { mService.enforceCanManageCaCerts ( admin , mContext.getPackageName ( ) ) ; return ( android.app.admin.DevicePolicyManager.getCaCertAlias ( certBuffer ) ) != null ; } catch ( android.os.RemoteException re ) { throw re.rethrowFromSystemServer ( ) ; } catch ( java.security.cert.CertificateException ce ) { android.util.Log.w ( android.app.admin.DevicePolicyManager.TAG , "Could not parse certificate" , ce ) ; } } return false ; }
Source:
private void handleTriggeringError ( java.util.Map < java.lang.String , com.google.gct.testing.ConfigurationResult > results , java.lang.String encodedConfigurationInstance , java.lang.String diffProgress ) { java.lang.String previousProgress = getPreviousProgress ( encodedConfigurationInstance ) ; reportNewProgress ( encodedConfigurationInstance , previousProgress , ( previousProgress + diffProgress ) ) ; com.google.gct.testing.ConfigurationResult result = getOrCreateConfigurationResult ( encodedConfigurationInstance , results ) ; result.setTriggeringError ( true ) ; finishedConfigurationInstances.add ( encodedConfigurationInstance ) ; }

Target:
private void reportNewProgress ( java.lang.String encodedConfigurationInstance , java.lang.String newProgress ) { newDataReceived = true ; getPreviousProgress ( encodedConfigurationInstance ) . add ( newProgress ) ; testRunListener.testConfigurationProgress ( com.google.gct.testing.ConfigurationInstance.parseFromEncodedString ( encodedConfigurationInstance ) . getResultsViewerDisplayString ( ) , newProgress ) ; }
Source:
public long getAppDataInode ( java.lang.String uuid , java.lang.String packageName , int userId , int flags ) throws com.android.internal.os.InstallerConnection.InstallerException { if ( ! ( checkBeforeRemote ( ) ) ) return - 1 ; try { return mInstalld.getAppDataInode ( uuid , packageName , userId , flags ) ; } catch ( android.os.RemoteException | android.os.ServiceSpecificException e ) { throw new com.android.internal.os.InstallerConnection.InstallerException ( e.getMessage ( ) ) ; } }

Target:
public long getAppDataInode ( java.lang.String uuid , java.lang.String packageName , int userId , int flags ) throws com.android.server.pm.Installer.InstallerException { if ( ! ( checkBeforeRemote ( ) ) ) return - 1 ; try { return mInstalld.getAppDataInode ( uuid , packageName , userId , flags ) ; } catch ( android.os.RemoteException | android.os.ServiceSpecificException e ) { throw com.android.server.pm.Installer.InstallerException.from ( e ) ; } }
Source:
public java.io.File getSdkHome ( ) { java.io.File binDir = getLintBinDir ( ) ; if ( binDir != null ) { assert binDir.getName ( ) . equals ( "tools" ) ; java.io.File root = binDir.getParentFile ( ) ; if ( ( root != null ) && ( root.isDirectory ( ) ) ) { return root ; } } java.lang.String home = java.lang.System.getenv ( "ANDROID_HOME" ) ; if ( home != null ) { return new java.io.File ( home ) ; } return null ; }

Target:
public java.io.File getSdkHome ( ) { java.io.File binDir = com.android.tools.lint.client.api.LintClient.getLintBinDir ( ) ; if ( binDir != null ) { assert binDir.getName ( ) . equals ( "tools" ) ; java.io.File root = binDir.getParentFile ( ) ; if ( ( root != null ) && ( root.isDirectory ( ) ) ) { return root ; } } java.lang.String home = java.lang.System.getenv ( "ANDROID_HOME" ) ; if ( home != null ) { return new java.io.File ( home ) ; } return null ; }
Source:
public static java.lang.String getClientKeyType ( byte keyType ) { switch ( keyType ) { case NativeCrypto.TLS_CT_RSA_SIGN : return org.conscrypt.SSLParametersImpl.KEY_TYPE_RSA ; case NativeCrypto.TLS_CT_DSS_SIGN : return org.conscrypt.SSLParametersImpl.KEY_TYPE_DSA ; case NativeCrypto.TLS_CT_RSA_FIXED_DH : return org.conscrypt.SSLParametersImpl.KEY_TYPE_DH_RSA ; case NativeCrypto.TLS_CT_DSS_FIXED_DH : return org.conscrypt.SSLParametersImpl.KEY_TYPE_DH_DSA ; case NativeCrypto.TLS_CT_ECDSA_SIGN : return org.conscrypt.SSLParametersImpl.KEY_TYPE_EC ; case NativeCrypto.TLS_CT_RSA_FIXED_ECDH : return org.conscrypt.SSLParametersImpl.KEY_TYPE_EC_RSA ; case NativeCrypto.TLS_CT_ECDSA_FIXED_ECDH : return org.conscrypt.SSLParametersImpl.KEY_TYPE_EC_EC ; default : return null ; } }

Target:
static java.lang.String getClientKeyType ( byte clientCertificateType ) { switch ( clientCertificateType ) { case NativeCrypto.TLS_CT_RSA_SIGN : return org.conscrypt.SSLParametersImpl.KEY_TYPE_RSA ; case NativeCrypto.TLS_CT_RSA_FIXED_DH : return org.conscrypt.SSLParametersImpl.KEY_TYPE_DH_RSA ; case NativeCrypto.TLS_CT_ECDSA_SIGN : return org.conscrypt.SSLParametersImpl.KEY_TYPE_EC ; case NativeCrypto.TLS_CT_RSA_FIXED_ECDH : return org.conscrypt.SSLParametersImpl.KEY_TYPE_EC_RSA ; case NativeCrypto.TLS_CT_ECDSA_FIXED_ECDH : return org.conscrypt.SSLParametersImpl.KEY_TYPE_EC_EC ; default : return null ; } }
Source:
public void testTimedoutAfterUnregisteredNetworkRequest ( ) { android.net.NetworkRequest nr = new android.net.NetworkRequest.Builder ( ) . addTransportType ( NetworkCapabilities.TRANSPORT_WIFI ) . build ( ) ; final com.android.server.ConnectivityServiceTest.TestNetworkCallback networkCallback = new com.android.server.ConnectivityServiceTest.TestNetworkCallback ( ) ; final int timeoutMs = 10 ; mCm.requestNetwork ( nr , networkCallback , timeoutMs ) ; mCm.unregisterNetworkCallback ( networkCallback ) ; com.android.server.ConnectivityServiceTest.sleepFor ( 15 ) ; networkCallback.assertNoCallback ( ) ; mWiFiNetworkAgent = new com.android.server.ConnectivityServiceTest.MockNetworkAgent ( TRANSPORT_WIFI ) ; mWiFiNetworkAgent.connect ( false ) ; networkCallback.assertNoCallback ( ) ; }

Target:
public void testNoCallbackAfterUnregisteredNetworkRequest ( ) { android.net.NetworkRequest nr = new android.net.NetworkRequest.Builder ( ) . addTransportType ( NetworkCapabilities.TRANSPORT_WIFI ) . build ( ) ; final com.android.server.ConnectivityServiceTest.TestNetworkCallback networkCallback = new com.android.server.ConnectivityServiceTest.TestNetworkCallback ( ) ; final int timeoutMs = 10 ; mCm.requestNetwork ( nr , networkCallback , timeoutMs ) ; mCm.unregisterNetworkCallback ( networkCallback ) ; networkCallback.assertNoCallback ( ) ; mWiFiNetworkAgent = new com.android.server.ConnectivityServiceTest.MockNetworkAgent ( TRANSPORT_WIFI ) ; mWiFiNetworkAgent.connect ( false ) ; networkCallback.assertNoCallback ( ) ; }
Source:
public synchronized void close ( ) throws com.android.sched.util.file.CannotCreateFileException , com.android.sched.util.file.WrongPermissionException , java.io.IOException { if ( ! ( closed ) ) { if ( vfs.getCapabilities ( ) . contains ( Capabilities.WRITE ) ) { printDigest ( vfs.getRootDir ( ) . createVFile ( com.android.sched.vfs.MessageDigestFS.DIGEST_FILE_NAME ) . getOutputStream ( ) ) ; } vfs.close ( ) ; closed = true ; } }

Target:
public synchronized void close ( ) throws com.android.sched.util.file.CannotCloseInputException , com.android.sched.util.file.CannotCloseOutputException { if ( ! ( closed ) ) { if ( vfs.getCapabilities ( ) . contains ( Capabilities.WRITE ) ) { try { printDigest ( vfs.getRootDir ( ) . createVFile ( com.android.sched.vfs.MessageDigestFS.DIGEST_FILE_NAME ) . getOutputStream ( ) ) ; } catch ( com.android.sched.util.file.WrongPermissionException | com.android.sched.util.file.CannotCreateFileException e ) { throw new com.android.sched.util.file.CannotCloseOutputException ( this , e ) ; } } vfs.close ( ) ; closed = true ; } }
Source:
private boolean selectDevice ( com.android.ide.eclipse.adt.internal.sdk.LayoutDevice device ) { final int count = mDeviceList.size ( ) ; for ( int i = 0 ; i < count ; i ++ ) { if ( device == ( mDeviceList.get ( i ) ) ) { mDeviceCombo.select ( i ) ; return true ; } } return false ; }

Target:
com.android.ide.eclipse.adt.internal.sdk.LayoutDevice.DeviceConfig getNextDeviceConfig ( com.android.ide.eclipse.adt.internal.sdk.LayoutDevice.DeviceConfig config ) { com.android.ide.eclipse.adt.internal.sdk.LayoutDevice device = getSelectedDevice ( ) ; java.util.List < com.android.ide.eclipse.adt.internal.sdk.LayoutDevice.DeviceConfig > configs = device.getConfigs ( ) ; for ( int i = 0 ; i < ( configs.size ( ) ) ; i ++ ) { if ( ( configs.get ( i ) ) == config ) { return configs.get ( ( ( i + 1 ) % ( configs.size ( ) ) ) ) ; } } return null ; }
Source:
public java.lang.String toString ( ) { return java.lang.String.format ( java.util.Locale.US , "[AudioState isMuted: %b, route: %s, supportedRouteMask: %s]" , isMuted , android.telecom.CallAudioState.audioRouteToString ( route ) , android.telecom.CallAudioState.audioRouteToString ( supportedRouteMask ) ) ; }

Target:
public java.lang.String toString ( ) { java.lang.String bluetoothDeviceList = supportedBluetoothDevices.stream ( ) . map ( BluetoothDevice :: getAddress ) . collect ( java.util.stream.Collectors.joining ( ", " ) ) ; return java.lang.String.format ( java.util.Locale.US , ( "[AudioState isMuted: %b, route: %s, supportedRouteMask: %s, " + "activeBluetoothDevice: [%s], supportedBluetoothDevices: [%s]]" ) , isMuted , android.telecom.CallAudioState.audioRouteToString ( route ) , android.telecom.CallAudioState.audioRouteToString ( supportedRouteMask ) , activeBluetoothDevice , bluetoothDeviceList ) ; }
Source:
public static void promptToLogIn ( final java.lang.String message ) throws com.google.gct.login.InvalidThreadTypeException { if ( ! ( com.google.gct.login.GoogleLogin.instance.isLoggedIn ( ) ) ) { if ( com.intellij.openapi.application.ApplicationManager.getApplication ( ) . isDispatchThread ( ) ) { com.google.gct.login.GoogleLogin.getInstance ( ) . logIn ( message ) ; } else { throw new com.google.gct.login.InvalidThreadTypeException ( "promptToLogin" ) ; } } }

Target:
public static void promptToLogIn ( final java.lang.String message , @ org.jetbrains.annotations.Nullable final com.google.gct.login.IGoogleLoginCompletedCallback callback ) throws com.google.gct.login.InvalidThreadTypeException { if ( ! ( com.google.gct.login.GoogleLogin.instance.isLoggedIn ( ) ) ) { if ( com.intellij.openapi.application.ApplicationManager.getApplication ( ) . isDispatchThread ( ) ) { com.google.gct.login.GoogleLogin.getInstance ( ) . logIn ( message , callback ) ; } else { throw new com.google.gct.login.InvalidThreadTypeException ( "promptToLogin" ) ; } } }
Source:
public static com.google.gct.intellij.endpoints.util.PsiClass getPublicAnnotatedClass ( com.google.gct.intellij.endpoints.util.PsiJavaFile psiJavaFile , java.lang.String annotationFqn ) { com.google.gct.intellij.endpoints.util.PsiClass [ ] classes = psiJavaFile.getClasses ( ) ; for ( com.google.gct.intellij.endpoints.util.PsiClass cls : classes ) { com.google.gct.intellij.endpoints.util.PsiModifierList modifierList = cls.getModifierList ( ) ; if ( ( modifierList != null ) && ( modifierList.hasExplicitModifier ( PsiModifier.PUBLIC ) ) ) { if ( com.intellij.codeInsight.AnnotationUtil.isAnnotated ( cls , annotationFqn , false ) ) { return cls ; } } } return null ; }

Target:
public static com.google.gct.idea.appengine.util.PsiClass getPublicAnnotatedClass ( com.google.gct.idea.appengine.util.PsiJavaFile psiJavaFile , java.lang.String annotationFqn ) { com.google.gct.idea.appengine.util.PsiClass [ ] classes = psiJavaFile.getClasses ( ) ; for ( com.google.gct.idea.appengine.util.PsiClass cls : classes ) { com.google.gct.idea.appengine.util.PsiModifierList modifierList = cls.getModifierList ( ) ; if ( ( modifierList != null ) && ( modifierList.hasExplicitModifier ( PsiModifier.PUBLIC ) ) ) { if ( com.intellij.codeInsight.AnnotationUtil.isAnnotated ( cls , annotationFqn , false ) ) { return cls ; } } } return null ; }
Source:
public void assertEventuallyTrue ( java.util.function.BooleanSupplier fn , long maxWaitingTimeMs ) { long start = android.os.SystemClock.elapsedRealtime ( ) ; while ( ( android.os.SystemClock.elapsedRealtime ( ) ) <= ( start + maxWaitingTimeMs ) ) { if ( fn.getAsBoolean ( ) ) { return ; } com.android.server.ConnectivityServiceTest.sleepFor ( 15 ) ; } assertTrue ( fn.getAsBoolean ( ) ) ; }

Target:
public void testSatisfiedNetworkRequestDoesNotTriggerOnUnavailable ( ) { android.net.NetworkRequest nr = new android.net.NetworkRequest.Builder ( ) . addTransportType ( NetworkCapabilities.TRANSPORT_WIFI ) . build ( ) ; final com.android.server.ConnectivityServiceTest.TestNetworkCallback networkCallback = new com.android.server.ConnectivityServiceTest.TestNetworkCallback ( ) ; mCm.requestNetwork ( nr , networkCallback , 10 ) ; mWiFiNetworkAgent = new com.android.server.ConnectivityServiceTest.MockNetworkAgent ( TRANSPORT_WIFI ) ; mWiFiNetworkAgent.connect ( false ) ; networkCallback.expectCallback ( com.android.server.ConnectivityServiceTest.CallbackState.AVAILABLE , mWiFiNetworkAgent ) ; com.android.server.ConnectivityServiceTest.sleepFor ( 15 ) ; networkCallback.assertNoCallback ( ) ; }
Source:
public static com.android.dialer.app.calllog.IntentProvider getCallDetailIntentProvider ( com.android.dialer.calldetails.CallDetailsEntries callDetailsEntries , com.android.dialer.dialercontact.DialerContact contact , boolean canReportCallerId ) { return new com.android.dialer.app.calllog.IntentProvider ( ) { @ java.lang.Override public android.content.Intent getIntent ( android.content.Context context ) { return com.android.dialer.calldetails.CallDetailsActivity.newInstance ( context , callDetailsEntries , contact , canReportCallerId ) ; } } ; }

Target:
public static com.android.dialer.app.calllog.IntentProvider getCallDetailIntentProvider ( com.android.dialer.calldetails.CallDetailsEntries callDetailsEntries , com.android.dialer.dialercontact.DialerContact contact , boolean canReportCallerId , boolean canSupportAssistedDialing ) { return new com.android.dialer.app.calllog.IntentProvider ( ) { @ java.lang.Override public android.content.Intent getIntent ( android.content.Context context ) { return com.android.dialer.calldetails.CallDetailsActivity.newInstance ( context , callDetailsEntries , contact , canReportCallerId , canSupportAssistedDialing ) ; } } ; }
Source:
private java.lang.String getSelectedApnKey ( ) { java.lang.String key = null ; android.database.Cursor cursor = getContentResolver ( ) . query ( com.android.settings.ApnSettings.PREFERAPN_URI , new java.lang.String [ ] { "_id" } , null , null , Telephony.Carriers.DEFAULT_SORT_ORDER ) ; if ( ( cursor.getCount ( ) ) > 0 ) { cursor.moveToFirst ( ) ; key = cursor.getString ( com.android.settings.ApnSettings.ID_INDEX ) ; } cursor.close ( ) ; return key ; }

Target:
private java.lang.String getSelectedApnKey ( ) { java.lang.String key = null ; android.database.Cursor cursor = getContentResolver ( ) . query ( getUriForCurrSubId ( com.android.settings.ApnSettings.PREFERAPN_URI ) , new java.lang.String [ ] { "_id" } , null , null , Telephony.Carriers.DEFAULT_SORT_ORDER ) ; if ( ( cursor.getCount ( ) ) > 0 ) { cursor.moveToFirst ( ) ; key = cursor.getString ( com.android.settings.ApnSettings.ID_INDEX ) ; } cursor.close ( ) ; return key ; }
Source:
public void testCompileConflictingSourceAndImport ( ) throws java.lang.Exception { java.io.File jackOut = com.android.jack.TestTools.createTempDir ( "importtest" , "dir" ) ; com.android.jack.Options options = com.android.jack.TestTools.buildCommandLineArgs ( com.android.jack.TestTools.getJackTestsWithJackFolder ( "fibonacci" ) ) ; options.jayceOutDir = jackOut ; com.android.jack.TestTools.runCompilation ( options ) ; com.android.jack.Options conflictOptions = com.android.jack.TestTools.buildCommandLineArgs ( com.android.jack.TestTools.getJackTestsWithJackFolder ( "fibonacci" ) ) ; conflictOptions.jayceImport.add ( jackOut ) ; try { com.android.jack.TestTools.runCompilation ( conflictOptions ) ; junit.framework.Assert.fail ( ) ; } catch ( com.android.jack.backend.jayce.ImportConflictException e ) { } }

Target:
public void testCompileConflictingSourceAndImport ( ) throws java.lang.Exception { java.io.File jackOut = com.android.jack.TestTools.createTempDir ( "importtest" , "dir" ) ; com.android.jack.Options options = com.android.jack.TestTools.buildCommandLineArgs ( com.android.jack.TestTools.getJackTestsWithJackFolder ( "fibonacci" ) ) ; options.libraryOutDir = jackOut ; com.android.jack.TestTools.runCompilation ( options ) ; com.android.jack.Options conflictOptions = com.android.jack.TestTools.buildCommandLineArgs ( com.android.jack.TestTools.getJackTestsWithJackFolder ( "fibonacci" ) ) ; conflictOptions.jayceImport.add ( jackOut ) ; try { com.android.jack.TestTools.runCompilation ( conflictOptions ) ; junit.framework.Assert.fail ( ) ; } catch ( com.android.jack.backend.jayce.ImportConflictException e ) { } }
Source:
private void enableNetworkAndVerifySuccess ( ) throws java.lang.Exception { when ( mWifiNative.selectNetwork ( 0 ) ) . thenReturn ( true ) ; mLooper.startAutoDispatch ( ) ; org.junit.Assert.assertTrue ( mWsm.syncEnableNetwork ( mWsmAsyncChannel , 0 , true ) ) ; mLooper.stopAutoDispatch ( ) ; verify ( mWifiNative ) . selectNetwork ( 0 ) ; }

Target:
public void connectionFailureDoesNotSetHasEverConnectedTrue ( ) throws java.lang.Exception { testDhcpFailure ( ) ; verify ( mWifiConfigManager , never ( ) ) . updateNetworkAfterConnect ( 0 ) ; }
Source:
com.google.common.collect.ImmutableMap < K , V > map ( ) { return this ; }

Target:
com.google.common.collect.ImmutableList < com.google.common.collect.Table.Cell < R , C , V > > createAsList ( ) { return new com.google.common.collect.ImmutableAsList < com.google.common.collect.Table.Cell < R , C , V > > ( ) { @ java.lang.Override public com.google.common.collect.Table.Cell < R , C , V > get ( int index ) { return getCell ( index ) ; } @ java.lang.Override com.google.common.collect.ImmutableCollection < com.google.common.collect.Table.Cell < R , C , V > > delegateCollection ( ) { return com.google.common.collect.RegularImmutableTable.CellSet.this ; } } ; }
Source:
private final java.security.cert.X509CRL getCRL ( java.security.cert.CertificateFactory f , java.lang.String name ) throws java.lang.Exception { final java.io.InputStream is = tests.support.resource.Support_Resources.getStream ( name ) ; assertNotNull ( ( "File does not exist: " + name ) , is ) ; try { return ( ( java.security.cert.X509CRL ) ( f.generateCRL ( is ) ) ) ; } finally { try { is.close ( ) ; } catch ( java.io.IOException ignored ) { } } }

Target:
private final java.security.cert.X509CRL getCRL ( java.security.cert.CertificateFactory f , java.lang.String name ) throws java.lang.Exception { final java.io.InputStream is = tests.support.resource.Support_Resources.getStream ( name ) ; assertNotNull ( ( "File does not exist: " + name ) , is ) ; try { java.security.cert.X509CRL crl = ( ( java.security.cert.X509CRL ) ( f.generateCRL ( is ) ) ) ; assertNotNull ( crl ) ; return crl ; } finally { try { is.close ( ) ; } catch ( java.io.IOException ignored ) { } } }
Source:
private com.android.sdklib.internal.repository.archives.Archive parseArchive ( org.w3c.dom.Node archiveNode ) { com.android.sdklib.internal.repository.archives.Archive a = new com.android.sdklib.internal.repository.archives.Archive ( this , ( ( com.android.sdklib.internal.repository.archives.Archive.Os ) ( com.android.sdklib.internal.repository.XmlParserUtils.getEnumAttribute ( archiveNode , SdkRepoConstants.ATTR_OS , com.android.sdklib.internal.repository.archives.Archive.Os.values ( ) , null ) ) ) , ( ( com.android.sdklib.internal.repository.archives.Archive.Arch ) ( com.android.sdklib.internal.repository.XmlParserUtils.getEnumAttribute ( archiveNode , SdkRepoConstants.ATTR_ARCH , com.android.sdklib.internal.repository.archives.Archive.Arch.values ( ) , Arch.ANY ) ) ) , com.android.sdklib.internal.repository.XmlParserUtils.getXmlString ( archiveNode , SdkRepoConstants.NODE_URL ) , com.android.sdklib.internal.repository.XmlParserUtils.getXmlLong ( archiveNode , SdkRepoConstants.NODE_SIZE , 0 ) , com.android.sdklib.internal.repository.XmlParserUtils.getXmlString ( archiveNode , SdkRepoConstants.NODE_CHECKSUM ) ) ; return a ; }

Target:
private com.android.sdklib.internal.repository.archives.Archive parseArchive ( org.w3c.dom.Node archiveNode ) { com.android.sdklib.internal.repository.archives.Archive a = new com.android.sdklib.internal.repository.archives.Archive ( this , ( ( com.android.sdklib.internal.repository.archives.Archive.Os ) ( com.android.sdklib.internal.repository.packages.PackageParserUtils.getEnumAttribute ( archiveNode , SdkRepoConstants.ATTR_OS , com.android.sdklib.internal.repository.archives.Archive.Os.values ( ) , null ) ) ) , ( ( com.android.sdklib.internal.repository.archives.Archive.Arch ) ( com.android.sdklib.internal.repository.packages.PackageParserUtils.getEnumAttribute ( archiveNode , SdkRepoConstants.ATTR_ARCH , com.android.sdklib.internal.repository.archives.Archive.Arch.values ( ) , Arch.ANY ) ) ) , com.android.sdklib.internal.repository.packages.PackageParserUtils.getXmlString ( archiveNode , SdkRepoConstants.NODE_URL ) , com.android.sdklib.internal.repository.packages.PackageParserUtils.getXmlLong ( archiveNode , SdkRepoConstants.NODE_SIZE , 0 ) , com.android.sdklib.internal.repository.packages.PackageParserUtils.getXmlString ( archiveNode , SdkRepoConstants.NODE_CHECKSUM ) ) ; return a ; }
Source:
public boolean isLeEnabled ( ) { final int state = getLeState ( ) ; if ( state == ( android.bluetooth.BluetoothAdapter.STATE_ON ) ) { if ( android.bluetooth.BluetoothAdapter.DBG ) android.util.Log.d ( android.bluetooth.BluetoothAdapter.TAG , "STATE_ON" ) ; } else if ( state == ( android.bluetooth.BluetoothAdapter.STATE_BLE_ON ) ) { if ( android.bluetooth.BluetoothAdapter.DBG ) android.util.Log.d ( android.bluetooth.BluetoothAdapter.TAG , "STATE_BLE_ON" ) ; } else { if ( android.bluetooth.BluetoothAdapter.DBG ) android.util.Log.d ( android.bluetooth.BluetoothAdapter.TAG , "STATE_OFF" ) ; return false ; } return true ; }

Target:
public static java.lang.String nameForState ( @ android.bluetooth.BluetoothAdapter.AdapterState int state ) { switch ( state ) { case android.bluetooth.BluetoothAdapter.STATE_OFF : return "OFF" ; case android.bluetooth.BluetoothAdapter.STATE_TURNING_ON : return "TURNING_ON" ; case android.bluetooth.BluetoothAdapter.STATE_ON : return "ON" ; case android.bluetooth.BluetoothAdapter.STATE_TURNING_OFF : return "TURNING_OFF" ; case android.bluetooth.BluetoothAdapter.STATE_BLE_TURNING_ON : return "BLE_TURNING_ON" ; case android.bluetooth.BluetoothAdapter.STATE_BLE_ON : return "BLE_ON" ; case android.bluetooth.BluetoothAdapter.STATE_BLE_TURNING_OFF : return "BLE_TURNING_OFF" ; default : return ( "?!?!? (" + state ) + ")" ; } }
Source:
private com.android.jack.ir.ast.JMethod getDirectMethod ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JDefinedClassOrInterface declaringType , @ javax.annotation.Nonnull java.lang.String methodNameWithParam ) { com.android.jack.ir.ast.JMethod methodFound = null ; com.android.jack.ir.formatter.TypeAndMethodFormatter formatter = com.android.jack.Jack.getLookupFormatter ( ) ; for ( com.android.jack.ir.ast.JMethod m : declaringType.getMethods ( ) ) { if ( formatter.getName ( m ) . startsWith ( methodNameWithParam ) ) { if ( methodFound != null ) { throw new java.lang.AssertionError ( ) ; } else { methodFound = m ; } } } return methodFound ; }

Target:
private com.android.jack.ir.ast.JMethod getMethod ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JDefinedClassOrInterface receiverType , @ javax.annotation.Nonnull com.android.jack.ir.ast.JType returnType , @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethodId mthId ) { try { return receiverType.getMethod ( mthId.getName ( ) , returnType , mthId.getParamTypes ( ) ) ; } catch ( com.android.jack.lookup.JMethodWithReturnLookupException e ) { com.android.jack.ir.ast.JClass superClass = receiverType.getSuperClass ( ) ; com.android.jack.ir.ast.JMethod methodFound ; if ( superClass instanceof com.android.jack.ir.ast.JDefinedClass ) { methodFound = getMethod ( ( ( com.android.jack.ir.ast.JDefinedClass ) ( superClass ) ) , returnType , mthId ) ; if ( methodFound != null ) { return methodFound ; } } return null ; } }
Source:
private void updateOnTransition ( boolean onEntry ) { if ( ( ( mKeyguardManager ) != null ) && ( ! ( mKeyguardManager.inKeyguardRestrictedInputMode ( ) ) ) ) { mCallLogQueryHandler.markNewCallsAsOld ( ) ; if ( ! onEntry ) { mCallLogQueryHandler.markMissedCallsAsRead ( ) ; } removeMissedCallNotifications ( ) ; updateVoicemailNotifications ( ) ; } }

Target:
private void updateOnTransition ( boolean onEntry ) { if ( ( ( mKeyguardManager ) != null ) && ( ! ( mKeyguardManager.inKeyguardRestrictedInputMode ( ) ) ) ) { mCallLogQueryHandler.markNewCallsAsOld ( ) ; if ( ! onEntry ) { mCallLogQueryHandler.markMissedCallsAsRead ( ) ; } com.android.dialer.calllog.CallLogNotificationsHelper.removeMissedCallNotifications ( ) ; com.android.dialer.calllog.CallLogNotificationsHelper.updateVoicemailNotifications ( getActivity ( ) ) ; } }
Source:
public void onCreate ( ) { mHandlerThread = new android.os.HandlerThread ( "RecommendationProvider" ) ; mHandlerThread.start ( ) ; mHandler = new android.os.Handler ( mHandlerThread.getLooper ( ) ) ; mProvider = new com.android.networkrecommendation.DefaultNetworkRecommendationService.DefaultNetworkRecommendationProvider ( mHandler , ( ( android.net.NetworkScoreManager ) ( getSystemService ( Context.NETWORK_SCORE_SERVICE ) ) ) , new com.android.networkrecommendation.DefaultNetworkRecommendationService.ScoreStorage ( ) ) ; }

Target:
public void onCreate ( ) { mHandlerThread = new android.os.HandlerThread ( "RecommendationProvider" ) ; mHandlerThread.start ( ) ; mHandler = new android.os.Handler ( mHandlerThread.getLooper ( ) ) ; mProvider = new com.android.networkrecommendation.DefaultNetworkRecommendationProvider ( mHandler , ( ( android.net.NetworkScoreManager ) ( getSystemService ( Context.NETWORK_SCORE_SERVICE ) ) ) , new com.android.networkrecommendation.DefaultNetworkRecommendationProvider.ScoreStorage ( ) ) ; }
Source:
public void print ( @ javax.annotation.Nonnull java.io.PrintStream printer , @ javax.annotation.Nonnull java.lang.String str ) { if ( ! ( prefixDone ) ) { if ( needBullet ) { printer.print ( currentBullet ) ; needBullet = false ; } else { printer.print ( currentBlank ) ; } prefixDone = true ; } printer.print ( str ) ; newLineDone = false ; }

Target:
public void print ( @ javax.annotation.Nonnull java.io.PrintWriter printer , @ javax.annotation.Nonnull java.lang.String str ) { if ( ! ( prefixDone ) ) { if ( needBullet ) { printer.print ( currentBullet ) ; needBullet = false ; } else { printer.print ( currentBlank ) ; } prefixDone = true ; } printer.print ( str ) ; newLineDone = false ; }
Source:
android.content.res.Resources mockResource ( ) { android.content.res.Resources resource = mock ( android.content.res.Resources.class ) ; when ( resource.getInteger ( R.integer.config_wifi_framework_SECURITY_AWARD ) ) . thenReturn ( 80 ) ; when ( resource.getInteger ( R.integer.config_wifi_framework_SAME_BSSID_AWARD ) ) . thenReturn ( 24 ) ; when ( resource.getBoolean ( R.bool.config_wifi_framework_enable_associated_network_selection ) ) . thenReturn ( true ) ; when ( resource.getInteger ( R.integer.config_wifi_framework_wifi_score_good_rssi_threshold_24GHz ) ) . thenReturn ( WifiQualifiedNetworkSelector.RSSI_SATURATION_2G_BAND ) ; when ( resource.getInteger ( R.integer.config_wifi_framework_current_network_boost ) ) . thenReturn ( WifiQualifiedNetworkSelector.SAME_NETWORK_AWARD ) ; return resource ; }

Target:
android.content.res.Resources mockResource ( ) { android.content.res.Resources resource = mock ( android.content.res.Resources.class ) ; when ( resource.getInteger ( R.integer.config_wifi_framework_SECURITY_AWARD ) ) . thenReturn ( 80 ) ; when ( resource.getInteger ( R.integer.config_wifi_framework_SAME_BSSID_AWARD ) ) . thenReturn ( 24 ) ; when ( resource.getBoolean ( R.bool.config_wifi_framework_enable_associated_network_selection ) ) . thenReturn ( true ) ; when ( resource.getInteger ( R.integer.config_wifi_framework_wifi_score_good_rssi_threshold_24GHz ) ) . thenReturn ( ( - 60 ) ) ; when ( resource.getInteger ( R.integer.config_wifi_framework_current_network_boost ) ) . thenReturn ( 16 ) ; return resource ; }
Source:
static com.android.ide.common.res2.ResourceSet getBaseResourceSet ( ) throws com.android.ide.common.res2.DuplicateDataException , java.io.IOException { if ( ( com.android.ide.common.res2.ResourceSetTest.sBaseResourceSet ) == null ) { java.io.File root = com.android.testutils.TestUtils.getRoot ( "resources" , "baseSet" ) ; com.android.ide.common.res2.ResourceSetTest.sBaseResourceSet = new com.android.ide.common.res2.ResourceSet ( "main" ) ; com.android.ide.common.res2.ResourceSetTest.sBaseResourceSet.addSource ( root ) ; com.android.ide.common.res2.RecordingLogger logger = new com.android.ide.common.res2.RecordingLogger ( ) ; com.android.ide.common.res2.ResourceSetTest.sBaseResourceSet.loadFromFiles ( logger ) ; checkLogger ( logger ) ; } return com.android.ide.common.res2.ResourceSetTest.sBaseResourceSet ; }

Target:
static com.android.ide.common.res2.ResourceSet getBaseResourceSet ( ) throws com.android.ide.common.res2.DuplicateDataException , java.io.IOException { java.io.File root = com.android.testutils.TestUtils.getRoot ( "resources" , "baseSet" ) ; com.android.ide.common.res2.ResourceSet resourceSet = new com.android.ide.common.res2.ResourceSet ( "main" ) ; resourceSet.addSource ( root ) ; com.android.ide.common.res2.RecordingLogger logger = new com.android.ide.common.res2.RecordingLogger ( ) ; resourceSet.loadFromFiles ( logger ) ; checkLogger ( logger ) ; return resourceSet ; }
Source:
public void verifyModifyOriginalConfig ( ) throws java.lang.Exception { android.net.wifi.hotspot2.PasspointConfiguration config = new android.net.wifi.hotspot2.PasspointConfiguration ( ) ; config.homeSp = new android.net.wifi.hotspot2.pps.HomeSP ( ) ; config.homeSp.fqdn = "test1" ; config.credential = new android.net.wifi.hotspot2.pps.Credential ( ) ; config.credential.userCredential = new android.net.wifi.hotspot2.pps.Credential.UserCredential ( ) ; mProvider = createProvider ( config ) ; verifyInstalledConfig ( config , true ) ; config.homeSp.fqdn = "test2" ; verifyInstalledConfig ( config , false ) ; }

Target:
public void verifyModifyOriginalConfig ( ) throws java.lang.Exception { android.net.wifi.hotspot2.PasspointConfiguration config = new android.net.wifi.hotspot2.PasspointConfiguration ( ) ; android.net.wifi.hotspot2.pps.HomeSP homeSp = new android.net.wifi.hotspot2.pps.HomeSP ( ) ; homeSp.setFqdn ( "test1" ) ; config.setHomeSp ( homeSp ) ; android.net.wifi.hotspot2.pps.Credential credential = new android.net.wifi.hotspot2.pps.Credential ( ) ; credential.setUserCredential ( new android.net.wifi.hotspot2.pps.Credential.UserCredential ( ) ) ; config.setCredential ( credential ) ; mProvider = createProvider ( config ) ; verifyInstalledConfig ( config , true ) ; config.getHomeSp ( ) . setFqdn ( "test2" ) ; verifyInstalledConfig ( config , false ) ; }
Source:
public boolean checkExternalFreeStorage ( android.net.Uri packageUri , boolean isForwardLocked ) throws android.os.RemoteException { final java.io.File apkFile = new java.io.File ( packageUri.getPath ( ) ) ; try { return isUnderExternalThreshold ( apkFile , isForwardLocked ) ; } catch ( java.io.IOException e ) { return true ; } }

Target:
public boolean checkExternalFreeStorage ( android.net.Uri packageUri , boolean isForwardLocked , java.lang.String abiOverride ) throws android.os.RemoteException { final java.io.File apkFile = new java.io.File ( packageUri.getPath ( ) ) ; try { return isUnderExternalThreshold ( apkFile , isForwardLocked , abiOverride ) ; } catch ( java.io.IOException e ) { return true ; } }
Source:
public void setUp ( ) throws java.lang.Exception { super . setUp ( getClass ( ) . getSimpleName ( ) ) ; mIccCardStatus.mApplications = new com.android.internal.telephony.uicc.IccCardApplicationStatus [ ] { } ; mIccCardStatus.mCdmaSubscriptionAppIndex = mIccCardStatus.mImsSubscriptionAppIndex = mIccCardStatus.mGsmUmtsSubscriptionAppIndex = - 1 ; mIccIoResult = new com.android.internal.telephony.uicc.IccIoResult ( 144 , 0 , com.android.internal.telephony.uicc.IccUtils.hexStringToBytes ( "FF40" ) ) ; mSimulatedCommands.setIccIoResultForApduLogicalChannel ( mIccIoResult ) ; mTestHandlerThread = new com.android.internal.telephony.uicc.UiccCardTest.UiccCardHandlerThread ( getClass ( ) . getSimpleName ( ) ) ; mTestHandlerThread.start ( ) ; waitUntilReady ( ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { super . setUp ( getClass ( ) . getSimpleName ( ) ) ; mIccCardStatus.mApplications = new com.android.internal.telephony.uicc.IccCardApplicationStatus [ ] { } ; mIccCardStatus.mCdmaSubscriptionAppIndex = mIccCardStatus.mImsSubscriptionAppIndex = mIccCardStatus.mGsmUmtsSubscriptionAppIndex = - 1 ; mIccCardStatus.mCardState = IccCardStatus.CardState.CARDSTATE_PRESENT ; mIccIoResult = new com.android.internal.telephony.uicc.IccIoResult ( 144 , 0 , com.android.internal.telephony.uicc.IccUtils.hexStringToBytes ( "FF40" ) ) ; mSimulatedCommands.setIccIoResultForApduLogicalChannel ( mIccIoResult ) ; mTestHandlerThread = new com.android.internal.telephony.uicc.UiccCardTest.UiccCardHandlerThread ( getClass ( ) . getSimpleName ( ) ) ; mTestHandlerThread.start ( ) ; waitUntilReady ( ) ; }
Source:
public void testContains ( ) throws java.lang.Exception { assertFalse ( mKeyStore.contains ( android.security.KeyStoreTest.TEST_KEYNAME ) ) ; assertTrue ( mKeyStore.password ( android.security.KeyStoreTest.TEST_PASSWD ) ) ; assertFalse ( mKeyStore.contains ( android.security.KeyStoreTest.TEST_KEYNAME ) ) ; assertTrue ( mKeyStore.put ( android.security.KeyStoreTest.TEST_KEYNAME , android.security.KeyStoreTest.TEST_KEYVALUE , KeyStore.UID_SELF , KeyStore.FLAG_ENCRYPTED ) ) ; assertTrue ( mKeyStore.contains ( android.security.KeyStoreTest.TEST_KEYNAME ) ) ; }

Target:
public void testContains ( ) throws java.lang.Exception { assertFalse ( mKeyStore.contains ( android.security.KeyStoreTest.TEST_KEYNAME ) ) ; assertTrue ( mKeyStore.onUserPasswordChanged ( android.security.KeyStoreTest.TEST_PASSWD ) ) ; assertFalse ( mKeyStore.contains ( android.security.KeyStoreTest.TEST_KEYNAME ) ) ; assertTrue ( mKeyStore.put ( android.security.KeyStoreTest.TEST_KEYNAME , android.security.KeyStoreTest.TEST_KEYVALUE , KeyStore.UID_SELF , KeyStore.FLAG_ENCRYPTED ) ) ; assertTrue ( mKeyStore.contains ( android.security.KeyStoreTest.TEST_KEYNAME ) ) ; }
Source:
public void testBatchAndFlush ( ) throws java.lang.Exception { android.hardware.cts.helpers.SensorCtsHelper.sleep ( 3 , java.util.concurrent.TimeUnit.SECONDS ) ; java.util.ArrayList < java.lang.Throwable > errorsFound = new java.util.ArrayList < > ( ) ; for ( android.hardware.Sensor sensor : mSensorList ) { verifyRegisterListenerCallFlush ( sensor , null , errorsFound ) ; } assertOnErrors ( errorsFound ) ; }

Target:
public void testBatchAndFlush ( ) throws java.lang.Exception { final int SENSOR_TYPE_DEVICE_PRIVATE_BASE = 65536 ; android.hardware.cts.helpers.SensorCtsHelper.sleep ( 3 , java.util.concurrent.TimeUnit.SECONDS ) ; java.util.ArrayList < java.lang.Throwable > errorsFound = new java.util.ArrayList < > ( ) ; for ( android.hardware.Sensor sensor : mSensorList ) { if ( ( sensor.getType ( ) ) < SENSOR_TYPE_DEVICE_PRIVATE_BASE ) { verifyRegisterListenerCallFlush ( sensor , null , errorsFound ) ; } } assertOnErrors ( errorsFound ) ; }