auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
void remove ( java.util.UUID uuid ) { synchronized ( mApps ) { java.util.Iterator < com.android.bluetooth.gatt.ContextMap < T > . App > i = mApps.iterator ( ) ; while ( i.hasNext ( ) ) { com.android.bluetooth.gatt.ContextMap < T > . App entry = i.next ( ) ; if ( entry.uuid.equals ( uuid ) ) { entry.unlinkToDeath ( ) ; i.remove ( ) ; break ; } } } }

Target:
void remove ( java.util.UUID uuid ) { synchronized ( mApps ) { java.util.Iterator < com.android.bluetooth.gatt.ContextMap < T > . App > i = mApps.iterator ( ) ; while ( i.hasNext ( ) ) { com.android.bluetooth.gatt.ContextMap < T > . App entry = i.next ( ) ; if ( entry.uuid.equals ( uuid ) ) { entry.unlinkToDeath ( ) ; mScanStats.get ( entry.name ) . isRegistered = false ; i.remove ( ) ; break ; } } } }
Source:
public java.util.Map < java.lang.String , com.android.builder.model.AndroidProject > getAllModels ( boolean emulateStudio_1_0 ) { org.gradle.tooling.ProjectConnection connection = getProjectConnection ( ) ; try { return com.android.build.gradle.integration.common.fixture.GradleTestProject.buildModel ( connection , 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 ) { org.gradle.tooling.ProjectConnection connection = getProjectConnection ( ) ; try { return com.android.build.gradle.integration.common.fixture.GradleTestProject.buildModel ( connection , action , emulateStudio_1_0 ) ; } finally { connection.close ( ) ; } }
Source:
int broadcastIntentInPackage ( java.lang.String packageName , int uid , android.content.Intent intent , java.lang.String resolvedType , android.app.IIntentReceiver resultTo , int resultCode , java.lang.String resultData , android.os.Bundle map , java.lang.String requiredPermission , boolean serialized , boolean sticky ) { synchronized ( this ) { final long origId = android.os.Binder.clearCallingIdentity ( ) ; int res = broadcastIntentLocked ( null , packageName , intent , resolvedType , resultTo , resultCode , resultData , map , requiredPermission , serialized , sticky , ( - 1 ) , uid ) ; android.os.Binder.restoreCallingIdentity ( origId ) ; return res ; } }

Target:
int broadcastIntentInPackage ( java.lang.String packageName , int uid , android.content.Intent intent , java.lang.String resolvedType , android.content.IIntentReceiver resultTo , int resultCode , java.lang.String resultData , android.os.Bundle map , java.lang.String requiredPermission , boolean serialized , boolean sticky ) { synchronized ( this ) { final long origId = android.os.Binder.clearCallingIdentity ( ) ; int res = broadcastIntentLocked ( null , packageName , intent , resolvedType , resultTo , resultCode , resultData , map , requiredPermission , serialized , sticky , ( - 1 ) , uid ) ; android.os.Binder.restoreCallingIdentity ( origId ) ; return res ; } }
Source:
public com.google.mockwebserver.MockResponse clone ( ) { try { return ( ( com.google.mockwebserver.MockResponse ) ( super . clone ( ) ) ) ; } catch ( java.lang.CloneNotSupportedException e ) { throw new java.lang.AssertionError ( ) ; } }

Target:
public com.google.mockwebserver.MockResponse clone ( ) { try { com.google.mockwebserver.MockResponse result = ( ( com.google.mockwebserver.MockResponse ) ( super . clone ( ) ) ) ; result.headers = new java.util.ArrayList < java.lang.String > ( result.headers ) ; return result ; } catch ( java.lang.CloneNotSupportedException e ) { throw new java.lang.AssertionError ( ) ; } }
Source:
private int getArrayLength ( int res ) { int offset = android.icu.impl.ICUResourceBundleReader.RES_GET_OFFSET ( res ) ; if ( offset == 0 ) { return 0 ; } int type = android.icu.impl.ICUResourceBundleReader.RES_GET_TYPE ( res ) ; if ( type == ( android.icu.util.UResourceBundle.ARRAY ) ) { offset = getResourceByteOffset ( offset ) ; return getInt ( offset ) ; } else if ( type == ( ICUResourceBundle.ARRAY16 ) ) { return b16BitUnits.charAt ( offset ) ; } else { return 0 ; } }

Target:
public java.lang.String [ ] getStringArray ( ) { android.icu.impl.ICUResourceBundleReader.Array array = reader.getArray ( res ) ; if ( array == null ) { throw new android.icu.util.UResourceTypeMismatchException ( "" ) ; } return getStringArray ( array ) ; }
Source:
public final byte get ( ) { if ( ( position ) == ( limit ) ) { throw new java.nio.BufferUnderflowException ( ) ; } return this . block.peekByte ( ( ( offset ) + ( ( position ) ++ ) ) ) ; }

Target:
final void get ( char [ ] dst , int dstOffset , int charCount ) { int byteCount = checkGetBounds ( SizeOf.CHAR , dst.length , dstOffset , charCount ) ; this . block.peekCharArray ( ( ( offset ) + ( position ) ) , dst , dstOffset , charCount , order.needsSwap ) ; position += byteCount ; }
Source:
public void testRevokePropagatedOnUpgradeOldToNewModel ( ) throws java.lang.Exception { assertNull ( getDevice ( ) . installPackage ( com.android.cts.migration.MigrationHelper.getTestFile ( mCtsBuild , android.appsecurity.cts.PermissionsHostTest.APK_22 ) , false , false ) ) ; try { runDeviceTests ( android.appsecurity.cts.PermissionsHostTest.PKG , "com.android.cts.usepermission.UsePermissionTest22" , "testRevokePropagatedOnUpgradeOldToNewModel_part1" ) ; fail ( "App must be killed on a permission revoke" ) ; } catch ( java.lang.AssertionError expected ) { } assertNull ( getDevice ( ) . installPackage ( com.android.cts.migration.MigrationHelper.getTestFile ( mCtsBuild , android.appsecurity.cts.PermissionsHostTest.APK_23 ) , true , false ) ) ; runDeviceTests ( android.appsecurity.cts.PermissionsHostTest.PKG , "com.android.cts.usepermission.UsePermissionTest23" , "testRevokePropagatedOnUpgradeOldToNewModel_part2" ) ; }

Target:
public void testNoResidualPermissionsOnUninstall ( ) throws java.lang.Exception { assertNull ( getDevice ( ) . installPackage ( com.android.cts.migration.MigrationHelper.getTestFile ( mCtsBuild , android.appsecurity.cts.PermissionsHostTest.APK_23 ) , false , false ) ) ; runDeviceTests ( android.appsecurity.cts.PermissionsHostTest.USES_PERMISSION_PKG , "com.android.cts.usepermission.UsePermissionTest23" , "testNoResidualPermissionsOnUninstall_part1" ) ; assertNull ( getDevice ( ) . uninstallPackage ( android.appsecurity.cts.PermissionsHostTest.USES_PERMISSION_PKG ) ) ; assertNull ( getDevice ( ) . installPackage ( com.android.cts.migration.MigrationHelper.getTestFile ( mCtsBuild , android.appsecurity.cts.PermissionsHostTest.APK_23 ) , false , false ) ) ; runDeviceTests ( android.appsecurity.cts.PermissionsHostTest.USES_PERMISSION_PKG , "com.android.cts.usepermission.UsePermissionTest23" , "testNoResidualPermissionsOnUninstall_part2" ) ; }
Source:
public void validateUpdateParameterWithNoServerCheck ( ) throws java.lang.Exception { android.net.wifi.hotspot2.pps.UpdateParameter updateParam = new android.net.wifi.hotspot2.pps.UpdateParameter ( ) ; updateParam.updateIntervalInMinutes = UpdateParameter.UPDATE_CHECK_INTERVAL_NEVER ; updateParam.username = null ; updateParam.base64EncodedPassword = null ; updateParam.updateMethod = null ; updateParam.restriction = null ; updateParam.serverUri = null ; updateParam.trustRootCertUrl = null ; updateParam.trustRootCertSha256Fingerprint = null ; org.junit.Assert.assertTrue ( updateParam.validate ( ) ) ; }

Target:
public void validateUpdateParameterWithNoServerCheck ( ) throws java.lang.Exception { android.net.wifi.hotspot2.pps.UpdateParameter updateParam = new android.net.wifi.hotspot2.pps.UpdateParameter ( ) ; updateParam.setUpdateIntervalInMinutes ( UpdateParameter.UPDATE_CHECK_INTERVAL_NEVER ) ; updateParam.setUsername ( null ) ; updateParam.setBase64EncodedPassword ( null ) ; updateParam.setUpdateMethod ( null ) ; updateParam.setRestriction ( null ) ; updateParam.setServerUri ( null ) ; updateParam.setTrustRootCertUrl ( null ) ; updateParam.setTrustRootCertSha256Fingerprint ( null ) ; org.junit.Assert.assertTrue ( updateParam.validate ( ) ) ; }
Source:
public boolean requestRouteToHost ( int hostAddress ) { if ( android.net.MobileDataStateTracker.DBG ) { android.util.Log.d ( android.net.MobileDataStateTracker.TAG , ( ( ( ( ( ( "Requested host route to " + ( java.lang.Integer.toHexString ( hostAddress ) ) ) + " for " ) + ( mApnType ) ) + "(" ) + ( mInterfaceName ) ) + ")" ) ) ; } if ( ( ( mInterfaceName ) != null ) && ( hostAddress != ( - 1 ) ) ) { return ( android.net.NetworkUtils.addHostRoute ( mInterfaceName , hostAddress ) ) == 0 ; } else { return false ; } }

Target:
public boolean requestRouteToHost ( java.net.InetAddress hostAddress ) { if ( android.net.MobileDataStateTracker.DBG ) { android.util.Log.d ( android.net.MobileDataStateTracker.TAG , ( ( ( ( ( ( "Requested host route to " + ( hostAddress.getHostAddress ( ) ) ) + " for " ) + ( mApnType ) ) + "(" ) + ( mInterfaceName ) ) + ")" ) ) ; } if ( ( mInterfaceName ) != null ) { return android.net.NetworkUtils.addHostRoute ( mInterfaceName , hostAddress , null ) ; } else { return false ; } }
Source:
public boolean isTerminated ( ) { return ( mIsTerminated ) || ( isInterrupted ( ) ) ; }

Target:
public void run ( ) { if ( ( org.eclipse.swt.widgets.Display.getCurrent ( ) ) != null ) { com.android.ide.eclipse.adt.AdtPlugin.log ( IStatus.ERROR , "Adt test runner executed on UI thread" ) ; com.android.ide.eclipse.adt.AdtPlugin.printErrorToConsole ( mJUnitInfo.getProject ( ) , "Test launch failed due to internal error: Running tests on UI thread" ) ; terminate ( ) ; return ; } mTestRunner = new com.android.ide.eclipse.adt.internal.launch.junit.runtime.RemoteAdtTestRunner ( ) ; mTestRunner.runTests ( mRunConfig.getProgramArguments ( ) , mJUnitInfo ) ; }
Source:
private boolean isBootCompleted ( ) throws java.lang.Exception { return "1" . equals ( getDevice ( ) . executeShellCommand ( "getprop sys.boot_completed" ) . trim ( ) ) ; }

Target:
private boolean isBootCompleted ( ) throws java.lang.Exception { com.android.ddmlib.CollectingOutputReceiver receiver = new com.android.ddmlib.CollectingOutputReceiver ( ) ; try { getDevice ( ) . getIDevice ( ) . executeShellCommand ( "getprop sys.boot_completed" , receiver ) ; } catch ( com.android.ddmlib.AdbCommandRejectedException e ) { com.android.ddmlib.Log.d ( android.appsecurity.cts.DirectBootHostTest.TAG , "Ignored AdbCommandRejectedException while `getprop sys.boot_completed`" ) ; } java.lang.String output = receiver.getOutput ( ) ; if ( output != null ) { output = output.trim ( ) ; } return "1" . equals ( output ) ; }
Source:
public void keepScreenOnStoppedLw ( ) { if ( ( ( mKeyguardDelegate ) != null ) && ( ! ( mKeyguardDelegate.isShowingAndNotHidden ( ) ) ) ) { long curTime = android.os.SystemClock.uptimeMillis ( ) ; mPowerManager.userActivity ( android.os.SystemClock.uptimeMillis ( ) , false ) ; } }

Target:
private boolean keyguardIsShowingTq ( ) { if ( ( mKeyguardDelegate ) == null ) return false ; return mKeyguardDelegate.isShowingAndNotOccluded ( ) ; }
Source:
public final void testEqualsObject ( ) { com.android.ide.eclipse.adt.editors.layout.gscripts.Rect r = new com.android.ide.eclipse.adt.editors.layout.gscripts.Rect ( 3 , 4 , 20 , 30 ) ; assertFalse ( r.equals ( null ) ) ; assertFalse ( r.equals ( new java.lang.Object ( ) ) ) ; assertTrue ( r.equals ( new com.android.ide.eclipse.adt.editors.layout.gscripts.Rect ( 3 , 4 , 20 , 30 ) ) ) ; }

Target:
public final void testEqualsObject ( ) { com.android.ide.common.api.Rect r = new com.android.ide.common.api.Rect ( 3 , 4 , 20 , 30 ) ; assertFalse ( r.equals ( null ) ) ; assertFalse ( r.equals ( new java.lang.Object ( ) ) ) ; assertTrue ( r.equals ( new com.android.ide.common.api.Rect ( 3 , 4 , 20 , 30 ) ) ) ; }
Source:
public void testStartCallWithSpeakerphoneNotProvided_SpeakerphoneOffByDefault ( ) { if ( ! ( mShouldTestTelecom ) ) { return ; } android.media.AudioManager am = ( ( android.media.AudioManager ) ( mContext.getSystemService ( Context.AUDIO_SERVICE ) ) ) ; int expectedRoute = ( am.isWiredHeadsetOn ( ) ) ? android.telecom.CallAudioState.ROUTE_WIRED_HEADSET : android.telecom.CallAudioState.ROUTE_EARPIECE ; placeAndVerifyCall ( ) ; verifyConnectionForOutgoingCall ( ) ; assertAudioRoute ( mInCallCallbacks.getService ( ) , expectedRoute ) ; }

Target:
public void testStartCallWithSpeakerphoneFalse_SpeakerphoneOffInCall ( ) { if ( ! ( mShouldTestTelecom ) ) { return ; } final android.os.Bundle extras = new android.os.Bundle ( ) ; extras.putBoolean ( TelecomManager.EXTRA_START_CALL_WITH_SPEAKERPHONE , false ) ; placeAndVerifyCall ( extras ) ; verifyConnectionForOutgoingCall ( ) ; assertNotAudioRoute ( mInCallCallbacks.getService ( ) , CallAudioState.ROUTE_SPEAKER ) ; }
Source:
void dump ( java.io.FileDescriptor fd , java.io.PrintWriter pw , java.lang.String [ ] args ) { pw.println ( ( "mStarted " + ( mStarted.get ( ) ) ) ) ; pw.println ( ( "mWifiWakeupEnabled " + ( mWifiWakeupEnabled ) ) ) ; }

Target:
void dump ( java.io.FileDescriptor fd , java.io.PrintWriter pw , java.lang.String [ ] args ) { pw.println ( ( "mStarted " + ( mStarted.get ( ) ) ) ) ; pw.println ( ( "mWifiWakeupEnabled: " + ( mWifiWakeupEnabled ) ) ) ; pw.println ( ( "mSavedSsids: " + ( mSavedSsids ) ) ) ; pw.println ( ( "mSavedSsidsInLastScan: " + ( mSavedSsidsInLastScan ) ) ) ; pw.println ( ( "mSavedSsidsOnDisable: " + ( mSavedSsidsOnDisable ) ) ) ; }
Source:
public void onServiceDisconnected ( android.content.ComponentName name ) { synchronized ( mLock ) { mIsBinding = false ; } if ( isServiceControllerAvailable ( ) ) { mImsServiceControllerBinder.unlinkToDeath ( mImsDeathRecipient , 0 ) ; } notifyAllFeaturesRemoved ( ) ; cleanUpService ( ) ; android.util.Log.w ( com.android.internal.telephony.ims.ImsServiceController.LOG_TAG , ( ( "ImsService(" + name ) + "): onServiceDisconnected. Rebinding..." ) ) ; startDelayedRebindToService ( ) ; }

Target:
public void onServiceDisconnected ( android.content.ComponentName name ) { synchronized ( mLock ) { mIsBinding = false ; } cleanupConnection ( ) ; android.util.Log.w ( com.android.internal.telephony.ims.ImsServiceController.LOG_TAG , ( ( "ImsService(" + name ) + "): onServiceDisconnected. Waiting..." ) ) ; }
Source:
public void testUserMaskingSystem ( ) throws java.lang.Exception { org.conscrypt.TrustedCertificateStoreTest.install ( org.conscrypt.TrustedCertificateStoreTest.getCa1 ( ) , org.conscrypt.TrustedCertificateStoreTest.getAliasSystemCa1 ( ) ) ; org.conscrypt.TrustedCertificateStoreTest.install ( org.conscrypt.TrustedCertificateStoreTest.getCa1 ( ) , org.conscrypt.TrustedCertificateStoreTest.getAliasUserCa1 ( ) ) ; assertMasked ( org.conscrypt.TrustedCertificateStoreTest.getCa1 ( ) , org.conscrypt.TrustedCertificateStoreTest.getAliasSystemCa1 ( ) ) ; assertRootCa ( org.conscrypt.TrustedCertificateStoreTest.getCa1 ( ) , org.conscrypt.TrustedCertificateStoreTest.getAliasUserCa1 ( ) ) ; assertAliases ( org.conscrypt.TrustedCertificateStoreTest.getAliasSystemCa1 ( ) , org.conscrypt.TrustedCertificateStoreTest.getAliasUserCa1 ( ) ) ; }

Target:
public void testOneSystemOneUserOneDeletedSameSubject ( ) throws java.lang.Exception { install ( org.conscrypt.TrustedCertificateStoreTest.getCa1 ( ) , org.conscrypt.TrustedCertificateStoreTest.getAliasSystemCa1 ( ) ) ; store.installCertificate ( org.conscrypt.TrustedCertificateStoreTest.getCa3WithCa1Subject ( ) ) ; store.deleteCertificateEntry ( org.conscrypt.TrustedCertificateStoreTest.getAliasSystemCa1 ( ) ) ; assertDeleted ( org.conscrypt.TrustedCertificateStoreTest.getCa1 ( ) , org.conscrypt.TrustedCertificateStoreTest.getAliasSystemCa1 ( ) ) ; assertRootCa ( org.conscrypt.TrustedCertificateStoreTest.getCa3WithCa1Subject ( ) , org.conscrypt.TrustedCertificateStoreTest.getAliasUserCa3 ( ) ) ; assertAliases ( org.conscrypt.TrustedCertificateStoreTest.getAliasUserCa3 ( ) ) ; }
Source:
public void execute ( java.lang.String programName ) { java.lang.StringBuilder commandBuilder = new java.lang.StringBuilder ( ) ; commandBuilder.append ( "dalvikvm32 " ) ; commandBuilder.append ( "-cp " ) . append ( testLocation ) . append ( "/" ) . append ( programName ) . append ( " " ) ; commandBuilder.append ( executeClass ) ; executionResult = executeOnDevice ( commandBuilder.toString ( ) , true ) ; }

Target:
public void execute ( java.lang.String programName ) { java.lang.StringBuilder commandBuilder = new java.lang.StringBuilder ( ) ; commandBuilder.append ( "dalvikvm32 " ) ; if ( dexfuzz.Options.executeOnHost ) { commandBuilder.append ( device.getHostExecutionFlags ( ) ) . append ( " " ) ; } commandBuilder.append ( "-cp " ) . append ( testLocation ) . append ( "/" ) . append ( programName ) . append ( " " ) ; commandBuilder.append ( executeClass ) ; executionResult = executeCommandWithTimeout ( commandBuilder.toString ( ) , true ) ; }
Source:
private void responseSms ( android.hardware.radio.V1_0.RadioResponseInfo responseInfo , android.hardware.radio.V1_0.SendSmsResult sms ) { com.android.internal.telephony.RILRequest rr = mRil.processResponse ( responseInfo ) ; if ( rr != null ) { com.android.internal.telephony.SmsResponse ret = null ; if ( ( responseInfo.error ) == ( android.hardware.radio.V1_0.RadioError.NONE ) ) { ret = new com.android.internal.telephony.SmsResponse ( sms.messageRef , sms.ackPDU , sms.errorCode ) ; sendMessageResponse ( rr.mResult , ret ) ; } mRil.processResponseDone ( rr , responseInfo , ret ) ; } }

Target:
private void responseSetupDataCall ( android.hardware.radio.V1_0.RadioResponseInfo responseInfo , android.hardware.radio.V1_0.SetupDataCallResult dcResponse ) { com.android.internal.telephony.RILRequest rr = mRil.processResponse ( responseInfo ) ; if ( rr != null ) { com.android.internal.telephony.dataconnection.DataCallResponse ret = null ; if ( ( responseInfo.error ) == ( android.hardware.radio.V1_0.RadioError.NONE ) ) { ret = com.android.internal.telephony.RIL.convertHalDc ( dcResponse ) ; com.android.internal.telephony.RadioResponse.sendMessageResponse ( rr.mResult , ret ) ; } mRil.processResponseDone ( rr , responseInfo , ret ) ; } }
Source:
protected void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; ssc = java.nio.channels.ServerSocketChannel.open ( ) ; ssc.configureBlocking ( false ) ; java.net.ServerSocket ss = ssc.socket ( ) ; java.net.InetSocketAddress address = new java.net.InetSocketAddress ( org.apache.harmony.nio.tests.java.nio.channels.SelectorTest.PORT ) ; ss.bind ( address ) ; selector = java.nio.channels.Selector.open ( ) ; }

Target:
protected void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; ssc = java.nio.channels.ServerSocketChannel.open ( ) ; ssc.configureBlocking ( false ) ; java.net.ServerSocket ss = ssc.socket ( ) ; ss.bind ( null ) ; localAddress = ss.getLocalSocketAddress ( ) ; selector = java.nio.channels.Selector.open ( ) ; }
Source:
public void binderDied ( ) { foregroundTokenDied ( this ) ; }

Target:
public void onReceive ( android.content.Context context , android.content.Intent intent ) { java.lang.String [ ] pkgs = intent.getStringArrayExtra ( Intent.EXTRA_PACKAGES ) ; if ( pkgs != null ) { for ( java.lang.String pkg : pkgs ) { synchronized ( this ) { if ( forceStopPackageLocked ( pkg , ( - 1 ) , false , false , false , false , false , 0 , "query restart" ) ) { setResultCode ( Activity.RESULT_OK ) ; return ; } } } } }
Source:
public int getCallState ( int subId ) { try { com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony == null ) return android.telephony.TelephonyManager.CALL_STATE_IDLE ; return telephony.getCallStateForSubscriber ( subId ) ; } catch ( android.os.RemoteException ex ) { return android.telephony.TelephonyManager.CALL_STATE_IDLE ; } catch ( java.lang.NullPointerException ex ) { return android.telephony.TelephonyManager.CALL_STATE_IDLE ; } }

Target:
public int getCallStateForSlot ( int slotIndex ) { try { com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony == null ) return android.telephony.TelephonyManager.CALL_STATE_IDLE ; return telephony.getCallStateForSlot ( slotIndex ) ; } catch ( android.os.RemoteException ex ) { return android.telephony.TelephonyManager.CALL_STATE_IDLE ; } catch ( java.lang.NullPointerException ex ) { return android.telephony.TelephonyManager.CALL_STATE_IDLE ; } }
Source:
public void testTransmitFollowupFail ( ) throws org.json.JSONException { final short transactionId = 5689 ; android.os.Bundle args = new android.os.Bundle ( ) ; args.putInt ( "id" , transactionId ) ; args.putInt ( "reason" , WifiNanNative.NAN_STATUS_TX_FAIL ) ; com.android.server.wifi.nan.WifiNanHalMock.callTransmitFollowup ( com.android.server.wifi.HalMockUtils.convertBundleToJson ( args ) . toString ( ) ) ; org.mockito.Mockito.verify ( mNanStateManager ) . onMessageSendFailNotification ( transactionId , WifiNanSessionCallback.REASON_TX_FAIL ) ; org.mockito.Mockito.verifyNoMoreInteractions ( mNanStateManager ) ; }

Target:
public void testTransmitFollowupFail ( ) throws org.json.JSONException { final short transactionId = 5689 ; android.os.Bundle args = new android.os.Bundle ( ) ; args.putInt ( "id" , transactionId ) ; args.putInt ( "reason" , WifiNanNative.NAN_STATUS_TX_FAIL ) ; com.android.server.wifi.nan.WifiNanHalMock.callTransmitFollowup ( com.android.server.wifi.HalMockUtils.convertBundleToJson ( args ) . toString ( ) ) ; org.mockito.Mockito.verify ( mNanStateManager ) . onMessageSendFailNotification ( transactionId , WifiNanDiscoverySessionCallback.REASON_TX_FAIL ) ; org.mockito.Mockito.verifyNoMoreInteractions ( mNanStateManager ) ; }
Source:
private void prepareOperationSubscription ( boolean hasPrivileges ) throws java.lang.Exception { android.telephony.SubscriptionInfo subInfo = new android.telephony.SubscriptionInfo ( com.android.internal.telephony.euicc.EuiccControllerTest.SUBSCRIPTION_ID , com.android.internal.telephony.euicc.EuiccControllerTest.ICC_ID , 0 , "" , "" , 0 , 0 , "" , 0 , null , 0 , 0 , "" , true , ( hasPrivileges ? new android.telephony.UiccAccessRule [ ] { com.android.internal.telephony.euicc.EuiccControllerTest.ACCESS_RULE } : null ) ) ; org.mockito.Mockito.when ( mSubscriptionManager.getAvailableSubscriptionInfoList ( ) ) . thenReturn ( java.util.Collections.singletonList ( subInfo ) ) ; }

Target:
private void prepareOperationSubscription ( boolean hasPrivileges ) throws java.lang.Exception { android.telephony.SubscriptionInfo subInfo = new android.telephony.SubscriptionInfo ( com.android.internal.telephony.euicc.EuiccControllerTest.SUBSCRIPTION_ID , com.android.internal.telephony.euicc.EuiccControllerTest.ICC_ID , 0 , "" , "" , 0 , 0 , "" , 0 , null , 0 , 0 , "" , true , ( hasPrivileges ? new android.telephony.UiccAccessRule [ ] { com.android.internal.telephony.euicc.EuiccControllerTest.ACCESS_RULE } : null ) ) ; org.mockito.Mockito.when ( mSubscriptionManager.canManageSubscription ( subInfo , com.android.internal.telephony.euicc.EuiccControllerTest.PACKAGE_NAME ) ) . thenReturn ( hasPrivileges ) ; org.mockito.Mockito.when ( mSubscriptionManager.getAvailableSubscriptionInfoList ( ) ) . thenReturn ( java.util.Collections.singletonList ( subInfo ) ) ; }
Source:
public void testImsServiceUpSentCompat ( ) throws android.os.RemoteException { mTestImsServiceBinder.createMMTelFeature ( android.telephony.ims.ImsServiceTest.TEST_SLOT_0 , mTestCallback ) ; mTestImsService.mSpyMMTelFeature.sendSetFeatureState ( ImsFeature.STATE_READY ) ; org.mockito.ArgumentCaptor < android.content.Intent > intentCaptor = org.mockito.ArgumentCaptor.forClass ( android.content.Intent.class ) ; org.mockito.Mockito.verify ( mMockContext ) . sendBroadcast ( intentCaptor.capture ( ) ) ; try { junit.framework.Assert.assertNotNull ( intentCaptor.getValue ( ) ) ; verifyServiceUpSent ( intentCaptor.getValue ( ) ) ; } catch ( java.lang.IndexOutOfBoundsException e ) { junit.framework.Assert.fail ( "Did not receive all intents" ) ; } }

Target:
public void testCallMethodOnCreatedFeature ( ) throws android.os.RemoteException { android.telephony.ims.aidl.IImsMmTelFeature f = mTestImsServiceBinder.createMmTelFeature ( android.telephony.ims.ImsServiceTest.TEST_SLOT_0 , mTestCallback ) ; f.getUtInterface ( ) ; junit.framework.Assert.assertTrue ( mTestImsService.mTestMmTelFeature.isUtInterfaceCalled ) ; }
Source:
private java.security.cert.TrustAnchor findTrustAnchorByIssuerAndSignature ( java.security.cert.X509Certificate lastCert ) { java.security.cert.TrustAnchor trustAnchor = trustedCertificateIndex.findByIssuerAndSignature ( lastCert ) ; if ( trustAnchor != null ) { return trustAnchor ; } if ( ( trustedCertificateStore ) == null ) { return null ; } java.security.cert.X509Certificate issuer = trustedCertificateStore.findIssuer ( lastCert ) ; if ( issuer != null ) { return trustedCertificateIndex.index ( issuer ) ; } return null ; }

Target:
public int compare ( java.security.cert.TrustAnchor lhs , java.security.cert.TrustAnchor rhs ) { java.security.cert.X509Certificate lhsCert = lhs.getTrustedCert ( ) ; java.security.cert.X509Certificate rhsCert = rhs.getTrustedCert ( ) ; return org.conscrypt.TrustManagerImpl.TrustAnchorComparator.CERT_COMPARATOR.compare ( lhsCert , rhsCert ) ; }
Source:
public static java.lang.String formatSet ( @ com.android.annotations.NonNull java.util.EnumSet < com.android.tools.lint.checks.PluralsDatabase.Quantity > set ) { java.util.List < java.lang.String > list = new java.util.ArrayList < java.lang.String > ( set.size ( ) ) ; for ( com.android.tools.lint.checks.PluralsDatabase.Quantity quantity : set ) { list.add ( quantity.name ( ) ) ; } return com.android.tools.lint.detector.api.LintUtils.formatList ( list , java.lang.Integer.MAX_VALUE ) ; }

Target:
public static java.lang.String formatSet ( @ com.android.annotations.NonNull java.util.EnumSet < com.android.tools.lint.checks.PluralsDatabase.Quantity > set ) { java.util.List < java.lang.String > list = new java.util.ArrayList < java.lang.String > ( set.size ( ) ) ; for ( com.android.tools.lint.checks.PluralsDatabase.Quantity quantity : set ) { list.add ( ( ( '`' + ( quantity.name ( ) ) ) + '`' ) ) ; } return com.android.tools.lint.detector.api.LintUtils.formatList ( list , java.lang.Integer.MAX_VALUE ) ; }
Source:
public boolean disable ( ) { try { return mManagerService.disable ( true ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothAdapter.TAG , "" , e ) ; } return false ; }

Target:
public boolean enable ( ) { if ( ( isEnabled ( ) ) == true ) { if ( android.bluetooth.BluetoothAdapter.DBG ) android.util.Log.d ( android.bluetooth.BluetoothAdapter.TAG , "enable(): BT is already enabled..!" ) ; return true ; } try { return mManagerService.enable ( android.app.ActivityThread.currentPackageName ( ) ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothAdapter.TAG , "" , e ) ; } return false ; }
Source:
private final void shutdownIfNoPower ( ) { if ( ( ( ( mBatteryLevel ) == 0 ) && ( ! ( isPowered ( ) ) ) ) && ( android.app.ActivityManagerNative.isSystemReady ( ) ) ) { android.content.Intent intent = new android.content.Intent ( android.content.Intent.ACTION_REQUEST_SHUTDOWN ) ; intent.putExtra ( Intent.EXTRA_KEY_CONFIRM , false ) ; intent.setFlags ( Intent.FLAG_ACTIVITY_NEW_TASK ) ; mContext.startActivity ( intent ) ; } }

Target:
private final void shutdownIfNoPower ( ) { if ( ( ( ( ( mBatteryLevel ) == 0 ) && ( ! ( isPowered ( ) ) ) ) || ( ( mBatteryHealth ) == ( android.os.BatteryManager.BATTERY_HEALTH_DEAD ) ) ) && ( android.app.ActivityManagerNative.isSystemReady ( ) ) ) { android.content.Intent intent = new android.content.Intent ( android.content.Intent.ACTION_REQUEST_SHUTDOWN ) ; intent.putExtra ( Intent.EXTRA_KEY_CONFIRM , false ) ; intent.setFlags ( Intent.FLAG_ACTIVITY_NEW_TASK ) ; mContext.startActivity ( intent ) ; } }
Source:
private com.android.jack.ir.ast.JMethodId getNewInstanceId ( com.android.jack.ir.ast.JClassOrInterface reflectArrayType ) { if ( ( newInstance ) == null ) { java.util.List < com.android.jack.ir.ast.JType > argsType = new java.util.ArrayList < com.android.jack.ir.ast.JType > ( 2 ) ; argsType.add ( session.getPhantomLookup ( ) . getClass ( CommonTypes.JAVA_LANG_CLASS ) ) ; argsType.add ( getIntArrayType ( ) ) ; newInstance = reflectArrayType.getOrCreateMethodId ( "newInstance" , argsType , MethodKind.STATIC ) ; } assert ( newInstance ) != null ; return newInstance ; }

Target:
private com.android.jack.ir.ast.JMethodId getNewInstanceId ( com.android.jack.ir.ast.JClassOrInterface reflectArrayType ) { if ( ( newInstance ) == null ) { java.util.List < com.android.jack.ir.ast.JType > argsType = new java.util.ArrayList < com.android.jack.ir.ast.JType > ( 2 ) ; argsType.add ( jlc ) ; argsType.add ( getIntArrayType ( ) ) ; newInstance = reflectArrayType.getOrCreateMethodId ( "newInstance" , argsType , MethodKind.STATIC ) ; } assert ( newInstance ) != null ; return newInstance ; }
Source:
private synchronized void onGetReport ( byte type , byte id , short bufferSize ) { if ( com.android.bluetooth.hid.HidDeviceService.DBG ) { android.util.Log.d ( com.android.bluetooth.hid.HidDeviceService.TAG , ( ( ( ( ( "onGetReport(): type=" + type ) + " id=" ) + id ) + " bufferSize=" ) + bufferSize ) ) ; } android.os.Message msg = mHandler.obtainMessage ( com.android.bluetooth.hid.HidDeviceService.MESSAGE_GET_REPORT ) ; msg.obj = ( bufferSize > 0 ) ? new java.lang.Integer ( bufferSize ) : null ; msg.arg1 = type ; msg.arg2 = id ; mHandler.sendMessage ( msg ) ; }

Target:
synchronized void onGetReportFromNative ( byte type , byte id , short bufferSize ) { if ( com.android.bluetooth.hid.HidDeviceService.DBG ) { android.util.Log.d ( com.android.bluetooth.hid.HidDeviceService.TAG , ( ( ( ( ( "onGetReport(): type=" + type ) + " id=" ) + id ) + " bufferSize=" ) + bufferSize ) ) ; } android.os.Message msg = mHandler.obtainMessage ( com.android.bluetooth.hid.HidDeviceService.MESSAGE_GET_REPORT ) ; msg.obj = ( bufferSize > 0 ) ? new java.lang.Integer ( bufferSize ) : null ; msg.arg1 = type ; msg.arg2 = id ; mHandler.sendMessage ( msg ) ; }
Source:
private static void checkName ( @ com.android.annotations.NonNull java.lang.String name , @ com.android.annotations.NonNull java.lang.String displayName ) { com.android.build.gradle.internal.VariantManager.checkPrefix ( name , displayName , com.android.builder.core.VariantConfiguration.Type.ANDROID_TEST.getPrefix ( ) ) ; com.android.build.gradle.internal.VariantManager.checkPrefix ( name , displayName , com.android.builder.core.VariantConfiguration.Type.UNIT_TEST.getPrefix ( ) ) ; if ( com.android.builder.core.BuilderConstants.LINT.equals ( name ) ) { throw new java.lang.RuntimeException ( java.lang.String.format ( "%1$s names cannot be %2$s" , displayName , com.android.builder.core.BuilderConstants.LINT ) ) ; } }

Target:
private static void checkName ( @ com.android.annotations.NonNull java.lang.String name , @ com.android.annotations.NonNull java.lang.String displayName ) { com.android.build.gradle.internal.VariantManager.checkPrefix ( name , displayName , com.android.builder.core.VariantType.ANDROID_TEST.getPrefix ( ) ) ; com.android.build.gradle.internal.VariantManager.checkPrefix ( name , displayName , com.android.builder.core.VariantType.UNIT_TEST.getPrefix ( ) ) ; if ( com.android.builder.core.BuilderConstants.LINT.equals ( name ) ) { throw new java.lang.RuntimeException ( java.lang.String.format ( "%1$s names cannot be %2$s" , displayName , com.android.builder.core.BuilderConstants.LINT ) ) ; } }
Source:
public static com.android.jack.dx.rop.cst.CstMethodRef createMethodRef ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JReferenceType type , @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethod method ) { com.android.jack.dx.rop.cst.CstMethodRef methodRef = new com.android.jack.dx.rop.cst.CstMethodRef ( com.android.jack.backend.dex.rop.RopHelper.getCstType ( type ) , new com.android.jack.dx.rop.cst.CstString ( method.getName ( ) ) , com.android.jack.backend.dex.rop.RopHelper.getPrototype ( method.getMethodId ( ) ) ) ; return methodRef ; }

Target:
public static com.android.jack.dx.rop.cst.CstMethodRef createMethodRef ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JReferenceType type , @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethod method ) { com.android.jack.dx.rop.cst.CstMethodRef methodRef = new com.android.jack.dx.rop.cst.CstMethodRef ( com.android.jack.backend.dex.rop.RopHelper.convertTypeToDx ( type ) , new com.android.jack.dx.rop.cst.CstString ( method.getName ( ) ) , com.android.jack.backend.dex.rop.RopHelper.getPrototype ( method.getMethodId ( ) ) ) ; return methodRef ; }
Source:
public void setUp ( ) throws java.lang.Exception { super . setUp ( getClass ( ) . getSimpleName ( ) ) ; replaceInstance ( com.android.internal.telephony.imsphone.ImsPhoneCallTracker.class , "mPhone" , mImsCT , mImsPhone ) ; mImsCallUT = new com.android.internal.telephony.imsphone.ImsPhoneCall ( mImsCT , ImsPhoneCall.CONTEXT_FOREGROUND ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { super . setUp ( getClass ( ) . getSimpleName ( ) ) ; replaceInstance ( com.android.internal.telephony.imsphone.ImsPhoneCallTracker.class , "mPhone" , mImsCT , mImsPhone ) ; mImsCallUT = new com.android.internal.telephony.imsphone.ImsPhoneCall ( mImsCT , ImsPhoneCall.CONTEXT_FOREGROUND ) ; mMediaProfile = new android.telephony.ims.ImsStreamMediaProfile ( ) ; }
Source:
private static void sendMulticastMessage ( java.net.InetAddress group , int port , java.lang.String msg , java.net.NetworkInterface sendingInterface ) throws java.io.IOException { java.nio.channels.DatagramChannel dc = java.nio.channels.DatagramChannel.open ( ) ; if ( sendingInterface != null ) { dc.setOption ( java.net.StandardSocketOptions.IP_MULTICAST_IF , sendingInterface ) ; } libcore.java.nio.channels.DatagramChannelMulticastTest.sendMessage ( dc , msg , new java.net.InetSocketAddress ( group , port ) ) ; dc.close ( ) ; }

Target:
private static void createChannelAndSendMulticastMessage ( java.net.InetAddress group , int port , java.lang.String msg , java.net.NetworkInterface sendingInterface ) throws java.io.IOException { java.nio.channels.DatagramChannel dc = java.nio.channels.DatagramChannel.open ( ) ; libcore.java.nio.channels.DatagramChannelMulticastTest.BindableChannel channel = new libcore.java.nio.channels.DatagramChannelMulticastTest.BindableChannel ( dc , sendingInterface ) ; channel.sendMulticastMessage ( msg , new java.net.InetSocketAddress ( group , port ) ) ; dc.close ( ) ; }
Source:
public void testLibsManifestMerging ( ) throws java.lang.Exception { java.io.File project = new java.io.File ( testDir , "libsTest" ) ; java.io.File fileOutput = new java.io.File ( project , ( ( "libapp/build/" + ( com.android.builder.model.AndroidProject.FD_INTERMEDIATES ) ) + "/bundles/release/AndroidManifest.xml" ) ) ; runGradleTasks ( sdkDir , ndkDir , BasePlugin.GRADLE_MIN_VERSION , project , "clean" , "build" ) ; assertTrue ( fileOutput.exists ( ) ) ; }

Target:
public void testLibsManifestMerging ( ) throws java.lang.Exception { java.io.File project = new java.io.File ( testDir , "libsTest" ) ; java.io.File fileOutput = new java.io.File ( project , ( ( "libapp/build/" + ( com.android.builder.model.AndroidProject.FD_INTERMEDIATES ) ) + "/bundles/release/AndroidManifest.xml" ) ) ; runGradleTasks ( sdkDir , ndkDir , BasePlugin.GRADLE_MIN_VERSION , project , java.util.Collections.< java.lang.String > emptyList ( ) , "clean" , "build" ) ; assertTrue ( fileOutput.exists ( ) ) ; }
Source:
public int getState ( ) { if ( android.bluetooth.BluetoothPbap.VDBG ) android.bluetooth.BluetoothPbap.log ( "getState()" ) ; final android.bluetooth.IBluetoothPbap service = mService ; if ( service != null ) { try { return service.getState ( ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothPbap.TAG , e.toString ( ) ) ; } } else { android.util.Log.w ( android.bluetooth.BluetoothPbap.TAG , "Proxy not attached to service" ) ; if ( android.bluetooth.BluetoothPbap.DBG ) android.bluetooth.BluetoothPbap.log ( android.util.Log.getStackTraceString ( new java.lang.Throwable ( ) ) ) ; } return BluetoothProfile.STATE_DISCONNECTED ; }

Target:
public int getConnectionState ( android.bluetooth.BluetoothDevice device ) { android.bluetooth.BluetoothPbap.log ( ( "getConnectionState: device=" + device ) ) ; final android.bluetooth.IBluetoothPbap service = mService ; if ( service == null ) { android.util.Log.w ( android.bluetooth.BluetoothPbap.TAG , "Proxy not attached to service" ) ; return BluetoothProfile.STATE_DISCONNECTED ; } try { return service.getConnectionState ( device ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothPbap.TAG , e.toString ( ) ) ; } return BluetoothProfile.STATE_DISCONNECTED ; }
Source:
public void iccOpenLogicalChannel ( java.lang.String aid , int p2 , android.os.Message response ) { loglocal ( ( ( ( ( ( ( ( "iccOpenLogicalChannel: " + aid ) + " , " ) + p2 ) + " by pid:" ) + ( android.os.Binder.getCallingPid ( ) ) ) + " uid:" ) + ( android.os.Binder.getCallingUid ( ) ) ) ) ; mCi.iccOpenLogicalChannel ( aid , p2 , obtainMessage ( com.android.internal.telephony.uicc.UiccProfile.EVENT_OPEN_LOGICAL_CHANNEL_DONE , response ) ) ; }

Target:
public void iccOpenLogicalChannel ( java.lang.String aid , int p2 , android.os.Message response ) { loglocal ( ( ( ( ( ( ( ( "iccOpenLogicalChannel: " + aid ) + " , " ) + p2 ) + " by pid:" ) + ( android.os.Binder.getCallingPid ( ) ) ) + " uid:" ) + ( android.os.Binder.getCallingUid ( ) ) ) ) ; mCi.iccOpenLogicalChannel ( aid , p2 , mHandler.obtainMessage ( com.android.internal.telephony.uicc.UiccProfile.EVENT_OPEN_LOGICAL_CHANNEL_DONE , response ) ) ; }
Source:
private void addDomain ( java.util.Iterator < java.lang.String > labels , com.android.server.wifi.hotspot2.DomainMatcher.Match match ) { java.lang.String labelName = labels.next ( ) ; if ( labels.hasNext ( ) ) { com.android.server.wifi.hotspot2.DomainMatcher.Label subLabel = new com.android.server.wifi.hotspot2.DomainMatcher.Label ( com.android.server.wifi.hotspot2.DomainMatcher.Match.None ) ; mSubDomains.put ( labelName , subLabel ) ; subLabel.addDomain ( labels , match ) ; } else { mSubDomains.put ( labelName , new com.android.server.wifi.hotspot2.DomainMatcher.Label ( match ) ) ; } }

Target:
public void addDomain ( java.util.Iterator < java.lang.String > labels , int match ) { java.lang.String labelName = labels.next ( ) ; com.android.server.wifi.hotspot2.DomainMatcher.Label subLabel = mSubDomains.get ( labelName ) ; if ( subLabel == null ) { subLabel = new com.android.server.wifi.hotspot2.DomainMatcher.Label ( com.android.server.wifi.hotspot2.DomainMatcher.MATCH_NONE ) ; mSubDomains.put ( labelName , subLabel ) ; } if ( labels.hasNext ( ) ) { subLabel.addDomain ( labels , match ) ; } else { subLabel.mMatch = match ; } }
Source:
public void onReceivedError ( android.webkit.WebView view , int errorCode , java.lang.String description , java.lang.String failingUrl ) { setUrlFail ( true ) ; }

Target:
public boolean onKey ( android.view.View view , int keyCode , android.view.KeyEvent event ) { if ( ( keyCode == ( android.view.KeyEvent.KEYCODE_ENTER ) ) && ( ( event.getAction ( ) ) == ( android.view.KeyEvent.ACTION_UP ) ) ) { loadUrlFromUrlBar ( view ) ; return true ; } return false ; }
Source:
public void run ( ) { mKeyguardMediator.keyguardDone ( false , true ) ; }

Target:
public void screenTurnedOff ( int why ) { android.util.EventLog.writeEvent ( 70000 , 0 ) ; synchronized ( mLock ) { mScreenOnEarly = false ; mScreenOnFully = false ; } if ( ( mKeyguardMediator ) != null ) { mKeyguardMediator.onScreenTurnedOff ( why ) ; } synchronized ( mLock ) { updateOrientationListenerLp ( ) ; updateLockScreenTimeout ( ) ; } }
Source:
private boolean hasAcceptedTos ( ) { if ( isVvm3 ( ) ) { return ( preferences.getInt ( com.android.dialer.app.voicemail.error.VoicemailTosMessageCreator.PREF_VVM3_TOS_VERSION_ACCEPTED_KEY , 0 ) ) >= ( com.android.dialer.app.voicemail.error.VoicemailTosMessageCreator.CURRENT_VVM3_TOS_VERSION ) ; } else { return ( preferences.getInt ( com.android.dialer.app.voicemail.error.VoicemailTosMessageCreator.PREF_DIALER_TOS_VERSION_ACCEPTED_KEY , 0 ) ) >= ( com.android.dialer.app.voicemail.error.VoicemailTosMessageCreator.CURRENT_DIALER_TOS_VERSION ) ; } }

Target:
private void recordTosAcceptance ( ) { if ( isVvm3 ( ) ) { preferences.edit ( ) . putInt ( VoicemailVersionConstants.PREF_VVM3_TOS_VERSION_ACCEPTED_KEY , VoicemailVersionConstants.CURRENT_VVM3_TOS_VERSION ) . apply ( ) ; } else { preferences.edit ( ) . putInt ( VoicemailVersionConstants.PREF_DIALER_TOS_VERSION_ACCEPTED_KEY , VoicemailVersionConstants.CURRENT_DIALER_TOS_VERSION ) . apply ( ) ; } android.telecom.PhoneAccountHandle handle = new android.telecom.PhoneAccountHandle ( android.content.ComponentName.unflattenFromString ( status.phoneAccountComponentName ) , status.phoneAccountId ) ; com.android.voicemail.VoicemailComponent.get ( context ) . getVoicemailClient ( ) . onTosAccepted ( context , handle ) ; }
Source:
private java.util.List < com.android.apksig.internal.apk.v3.V3SigningCertificateLineage.SigningCertificateNode > read ( java.nio.ByteBuffer inputByteBuffer ) throws java.io.IOException { com.android.apksig.internal.apk.ApkSigningBlockUtils.checkByteOrderLittleEndian ( inputByteBuffer ) ; if ( ( inputByteBuffer.remaining ( ) ) < 8 ) { throw new java.lang.IllegalArgumentException ( "Improper SigningCertificateLineage format: insufficient data for header." ) ; } if ( ( inputByteBuffer.getInt ( ) ) != ( com.android.apksig.SigningCertificateLineage.MAGIC ) ) { throw new java.lang.IllegalArgumentException ( "Improper SigningCertificateLineage format: MAGIC header mismatch." ) ; } return read ( inputByteBuffer , inputByteBuffer.getInt ( ) ) ; }

Target:
private static com.android.apksig.SigningCertificateLineage read ( java.nio.ByteBuffer inputByteBuffer ) throws java.io.IOException { com.android.apksig.internal.apk.ApkSigningBlockUtils.checkByteOrderLittleEndian ( inputByteBuffer ) ; if ( ( inputByteBuffer.remaining ( ) ) < 8 ) { throw new java.lang.IllegalArgumentException ( "Improper SigningCertificateLineage format: insufficient data for header." ) ; } if ( ( inputByteBuffer.getInt ( ) ) != ( com.android.apksig.SigningCertificateLineage.MAGIC ) ) { throw new java.lang.IllegalArgumentException ( "Improper SigningCertificateLineage format: MAGIC header mismatch." ) ; } return com.android.apksig.SigningCertificateLineage.read ( inputByteBuffer , inputByteBuffer.getInt ( ) ) ; }
Source:
private boolean areAllRecordsLoaded ( ) { for ( com.android.internal.telephony.uicc.UiccCardApplication app : mUiccApplications ) { if ( ( app != null ) && ( isSupportedApplication ( app ) ) ) { com.android.internal.telephony.uicc.IccRecords ir = app.getIccRecords ( ) ; if ( ( ir == null ) || ( ! ( ir.isLoaded ( ) ) ) ) { return false ; } } } return ( mUiccApplications [ 0 ] ) != null ; }

Target:
private boolean areAllApplicationsReady ( ) { for ( com.android.internal.telephony.uicc.UiccCardApplication app : mUiccApplications ) { if ( ( ( app != null ) && ( isSupportedApplication ( app ) ) ) && ( ! ( app.isReady ( ) ) ) ) { if ( com.android.internal.telephony.uicc.UiccProfile.VDBG ) log ( "areAllApplicationsReady: return false" ) ; return false ; } } if ( com.android.internal.telephony.uicc.UiccProfile.VDBG ) { log ( ( "areAllApplicationsReady: outside loop, return " + ( ( mUiccApplications [ 0 ] ) != null ) ) ) ; } return ( mUiccApplications [ 0 ] ) != null ; }
Source:
public void inviteNext ( ) { }

Target:
public void inviteNext ( ) { doorLock.lock ( ) ; try { if ( ( expectedMainDexTypes ) > 0 ) { ( expectedMainDexTypes ) -- ; } if ( ( expectedMainDexTypes ) == 0 ) { allMarkedTypesProcessed.signalAll ( ) ; } } finally { doorLock.unlock ( ) ; } }
Source:
public final java.lang.String getHumanReadableValue ( @ javax.annotation.Nonnegative int columnIdx ) { java.io.ByteArrayOutputStream baos = new java.io.ByteArrayOutputStream ( ) ; java.io.PrintStream printer = new java.io.PrintStream ( baos ) ; com.android.sched.util.print.TextPrinter provider = new com.android.sched.util.print.TextPrinter ( printer ) ; provider.print ( this ) ; return baos.toString ( ) ; }

Target:
public final java.lang.String getHumanReadableValue ( @ javax.annotation.Nonnegative int columnIdx ) { java.io.ByteArrayOutputStream baos = new java.io.ByteArrayOutputStream ( ) ; java.io.PrintStream printer = new java.io.PrintStream ( baos ) ; com.android.sched.util.print.TextPrinter provider = new com.android.sched.util.print.TextPrinter ( printer ) ; provider.getFormatter ( getDataView ( ) . getDataTypes ( ) [ columnIdx ] ) . print ( printer , getValue ( columnIdx ) ) ; return baos.toString ( ) ; }
Source:
private void installLocalPackageFile ( java.lang.String hostApkPath , java.lang.String ... args ) throws java.lang.Exception { java.util.List < java.lang.String > command = new java.util.ArrayList < > ( ) ; command.add ( "install" ) ; if ( ( args.length ) > 0 ) { java.util.Collections.addAll ( command , args ) ; } command.add ( hostApkPath ) ; getDevice ( ) . executeAdbCommand ( command.toArray ( new java.lang.String [ 0 ] ) ) ; }

Target:
private void rebootDeviceAndWaitForRestart ( ) throws java.lang.Exception { com.android.timezone.xts.TimeZoneUpdateHostTest.log ( "Rebooting device" ) ; getDevice ( ) . reboot ( ) ; }
Source:
protected void onListItemClick ( android.widget.ListView listView , android.view.View view , int position , long id ) { super . onListItemClick ( listView , view , position , id ) ; android.content.Intent intent = getIntent ( position ) ; startActivity ( intent ) ; }

Target:
protected void onCreate ( android.os.Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; com.android.cts.verifier.TestListAdapter adapter = new com.android.cts.verifier.TestListAdapter ( this ) ; setListAdapter ( adapter ) ; com.android.cts.verifier.TestListActivity.TestResultContentObserver observer = new com.android.cts.verifier.TestListActivity.TestResultContentObserver ( adapter ) ; android.content.ContentResolver resolver = getContentResolver ( ) ; resolver.registerContentObserver ( TestResultsProvider.CONTENT_URI , true , observer ) ; }
Source:
private com.android.draw9patch.ui.ImageViewer.UpdateRegionInfo getVerticalPaddingRight ( int y ) { int top = ( patchInfo.verticalPadding.first ) + 1 ; int bottom = ( ( image.getHeight ( ) ) - ( patchInfo.verticalPadding.second ) ) - 1 ; return getContainingPadding ( top , bottom , y , com.android.draw9patch.ui.ImageViewer.UpdateRegion.RIGHT_PADDING ) ; }

Target:
private com.android.draw9patch.ui.ImageViewer.UpdateRegionInfo findVerticalPatch ( int x , int y ) { java.util.List < com.android.draw9patch.ui.Pair < java.lang.Integer > > markers ; com.android.draw9patch.ui.ImageViewer.UpdateRegion region ; if ( x < ( ( image.getWidth ( ) ) / 2 ) ) { markers = patchInfo.verticalPatchMarkers ; region = com.android.draw9patch.ui.ImageViewer.UpdateRegion.LEFT_PATCH ; } else { markers = patchInfo.verticalPaddingMarkers ; region = com.android.draw9patch.ui.ImageViewer.UpdateRegion.RIGHT_PADDING ; } return getContainingPatch ( markers , y , region ) ; }
Source:
public void iccExchangeSimIO ( int fileID , int command , int p1 , int p2 , int p3 , java.lang.String pathID , android.os.Message response ) { mCi.iccIO ( command , fileID , pathID , p1 , p2 , p3 , null , null , obtainMessage ( com.android.internal.telephony.uicc.UiccProfile.EVENT_SIM_IO_DONE , response ) ) ; }

Target:
public void iccExchangeSimIO ( int fileID , int command , int p1 , int p2 , int p3 , java.lang.String pathID , android.os.Message response ) { mCi.iccIO ( command , fileID , pathID , p1 , p2 , p3 , null , null , mHandler.obtainMessage ( com.android.internal.telephony.uicc.UiccProfile.EVENT_SIM_IO_DONE , response ) ) ; }
Source:
synchronized long nClosureCreate ( long kernelID , long returnValue , long [ ] fieldIDs , long [ ] values , int [ ] sizes , long [ ] depClosures , long [ ] depFieldIDs ) { validate ( ) ; return rsnClosureCreate ( mContext , kernelID , returnValue , fieldIDs , values , sizes , depClosures , depFieldIDs ) ; }

Target:
synchronized long nClosureCreate ( long kernelID , long returnValue , long [ ] fieldIDs , long [ ] values , int [ ] sizes , long [ ] depClosures , long [ ] depFieldIDs ) { validate ( ) ; long c = rsnClosureCreate ( mContext , kernelID , returnValue , fieldIDs , values , sizes , depClosures , depFieldIDs ) ; if ( c == 0 ) { throw new android.renderscript.RSRuntimeException ( "Failed creating closure." ) ; } return c ; }