auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void callOnRemovingChildren ( com.android.ide.eclipse.adt.internal.editors.layout.gre.NodeProxy parentNode , java.util.List < com.android.ide.common.api.INode > children ) { if ( parentNode != null ) { com.android.ide.eclipse.adt.internal.editors.layout.uimodel.UiViewElementNode parentUiNode = parentNode.getNode ( ) ; com.android.ide.common.api.IViewRule parentRule = loadRule ( parentUiNode ) ; if ( parentRule != null ) { try { parentRule.onRemovingChildren ( children , parentNode ) ; } catch ( java.lang.Exception e ) { com.android.ide.eclipse.adt.AdtPlugin.log ( e , "%s.onDispose() failed: %s" , parentRule.getClass ( ) . getSimpleName ( ) , e.toString ( ) ) ; } } } }

Target:
public void callOnRemovingChildren ( com.android.ide.eclipse.adt.internal.editors.layout.gre.NodeProxy parentNode , java.util.List < com.android.ide.common.api.INode > children ) { if ( parentNode != null ) { com.android.ide.eclipse.adt.internal.editors.layout.uimodel.UiViewElementNode parentUiNode = parentNode.getNode ( ) ; com.android.ide.common.api.IViewRule parentRule = loadRule ( parentUiNode ) ; if ( parentRule != null ) { try { parentRule.onRemovingChildren ( children , parentNode , ( ( mInsertType ) == ( com.android.ide.common.api.InsertType.MOVE_WITHIN ) ) ) ; } catch ( java.lang.Exception e ) { com.android.ide.eclipse.adt.AdtPlugin.log ( e , "%s.onDispose() failed: %s" , parentRule.getClass ( ) . getSimpleName ( ) , e.toString ( ) ) ; } } } }
Source:
private static android.net.wifi.hotspot2.pps.UpdateParameter createUpdateParameter ( ) { android.net.wifi.hotspot2.pps.UpdateParameter updateParam = new android.net.wifi.hotspot2.pps.UpdateParameter ( ) ; updateParam.updateIntervalInMinutes = 1712 ; updateParam.updateMethod = UpdateParameter.UPDATE_METHOD_OMADM ; updateParam.restriction = UpdateParameter.UPDATE_RESTRICTION_HOMESP ; updateParam.serverUri = "server.pdate.com" ; updateParam.username = "username" ; updateParam.base64EncodedPassword = android.util.Base64.encodeToString ( "password" . getBytes ( ) , Base64.DEFAULT ) ; updateParam.trustRootCertUrl = "trust.cert.com" ; updateParam.trustRootCertSha256Fingerprint = new byte [ 32 ] ; return updateParam ; }

Target:
private static android.net.wifi.hotspot2.pps.UpdateParameter createUpdateParameter ( ) { android.net.wifi.hotspot2.pps.UpdateParameter updateParam = new android.net.wifi.hotspot2.pps.UpdateParameter ( ) ; updateParam.setUpdateIntervalInMinutes ( 1712 ) ; updateParam.setUpdateMethod ( UpdateParameter.UPDATE_METHOD_OMADM ) ; updateParam.setRestriction ( UpdateParameter.UPDATE_RESTRICTION_HOMESP ) ; updateParam.setServerUri ( "server.pdate.com" ) ; updateParam.setUsername ( "username" ) ; updateParam.setBase64EncodedPassword ( android.util.Base64.encodeToString ( "password" . getBytes ( ) , Base64.DEFAULT ) ) ; updateParam.setTrustRootCertUrl ( "trust.cert.com" ) ; updateParam.setTrustRootCertSha256Fingerprint ( new byte [ 32 ] ) ; return updateParam ; }
Source:
public boolean pageDown ( final boolean bottom ) { mFactory.startYourEngines ( true ) ; if ( checkNeedsPost ( ) ) { java.lang.Boolean ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean call ( ) { return pageDown ( bottom ) ; } } ) ; return ret ; } return mAwContents.pageDown ( bottom ) ; }

Target:
public void clearView ( ) { if ( checkNeedsPost ( ) ) { mRunQueue.addTask ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { clearView ( ) ; } } ) ; return ; } mAwContents.clearView ( ) ; }
Source:
private void launchAssistAction ( ) { sendCloseSystemWindows ( com.android.internal.policy.impl.PhoneWindowManager.SYSTEM_DIALOG_REASON_ASSIST ) ; android.content.Intent intent = android.app.SearchManager.getAssistIntent ( mContext ) ; if ( intent != null ) { intent.setFlags ( ( ( ( android.content.Intent.FLAG_ACTIVITY_NEW_TASK ) | ( android.content.Intent.FLAG_ACTIVITY_SINGLE_TOP ) ) | ( android.content.Intent.FLAG_ACTIVITY_CLEAR_TOP ) ) ) ; try { mContext.startActivity ( intent ) ; } catch ( android.content.ActivityNotFoundException e ) { android.util.Slog.w ( com.android.internal.policy.impl.PhoneWindowManager.TAG , "No activity to handle assist action." , e ) ; } } }

Target:
private void launchAssistAction ( ) { sendCloseSystemWindows ( com.android.internal.policy.impl.PhoneWindowManager.SYSTEM_DIALOG_REASON_ASSIST ) ; android.content.Intent intent = ( ( android.app.SearchManager ) ( mContext.getSystemService ( Context.SEARCH_SERVICE ) ) ) . getAssistIntent ( mContext , UserHandle.USER_CURRENT ) ; if ( intent != null ) { intent.setFlags ( ( ( ( android.content.Intent.FLAG_ACTIVITY_NEW_TASK ) | ( android.content.Intent.FLAG_ACTIVITY_SINGLE_TOP ) ) | ( android.content.Intent.FLAG_ACTIVITY_CLEAR_TOP ) ) ) ; try { mContext.startActivityAsUser ( intent , new android.os.UserHandle ( android.os.UserHandle.USER_CURRENT ) ) ; } catch ( android.content.ActivityNotFoundException e ) { android.util.Slog.w ( com.android.internal.policy.impl.PhoneWindowManager.TAG , "No activity to handle assist action." , e ) ; } } }
Source:
public void testConnectsToEmergencyNumberWithPlusSign_US ( ) { assertFalse ( shortInfo.connectsToEmergencyNumber ( "+911" , RegionCode.US ) ) ; assertFalse ( shortInfo.connectsToEmergencyNumber ( "＋911" , RegionCode.US ) ) ; assertFalse ( shortInfo.connectsToEmergencyNumber ( " +911" , RegionCode.US ) ) ; assertFalse ( shortInfo.connectsToEmergencyNumber ( "+112" , RegionCode.US ) ) ; assertFalse ( shortInfo.connectsToEmergencyNumber ( "+999" , RegionCode.US ) ) ; }

Target:
public void testConnectsToEmergencyNumberWithFormatting_US ( ) { assertTrue ( com.android.i18n.phonenumbers.ShortNumberInfoTest.shortInfo.connectsToEmergencyNumber ( "9-1-1" , RegionCode.US ) ) ; assertTrue ( com.android.i18n.phonenumbers.ShortNumberInfoTest.shortInfo.connectsToEmergencyNumber ( "1-1-2" , RegionCode.US ) ) ; assertFalse ( com.android.i18n.phonenumbers.ShortNumberInfoTest.shortInfo.connectsToEmergencyNumber ( "9-9-9" , RegionCode.US ) ) ; }
Source:
public void testUngrant_NoGrant_Failure ( ) throws java.lang.Exception { assertTrue ( "Password should work for keystore" , mKeyStore.password ( android.security.KeyStoreTest.TEST_PASSWD ) ) ; assertTrue ( "Should be able to generate key for testcase" , mKeyStore.generate ( android.security.KeyStoreTest.TEST_KEYNAME , KeyStore.UID_SELF , KeyStore.FLAG_ENCRYPTED ) ) ; assertFalse ( "Should not be able to revoke not existent grant" , mKeyStore.ungrant ( android.security.KeyStoreTest.TEST_KEYNAME , 0 ) ) ; }

Target:
public void testUngrant_DoubleGrantUngrant_Failure ( ) throws java.lang.Exception { assertTrue ( "Password should work for keystore" , mKeyStore.password ( android.security.KeyStoreTest.TEST_PASSWD ) ) ; assertTrue ( "Should be able to generate key for testcase" , mKeyStore.generate ( android.security.KeyStoreTest.TEST_KEYNAME , KeyStore.UID_SELF , NativeCrypto.EVP_PKEY_RSA , 1024 , KeyStore.FLAG_ENCRYPTED , null ) ) ; assertTrue ( "Should be able to grant key to other user" , mKeyStore.grant ( android.security.KeyStoreTest.TEST_KEYNAME , 0 ) ) ; assertTrue ( "Should be able to grant key to other user a second time" , mKeyStore.grant ( android.security.KeyStoreTest.TEST_KEYNAME , 0 ) ) ; assertTrue ( "Should be able to ungrant key to other user" , mKeyStore.ungrant ( android.security.KeyStoreTest.TEST_KEYNAME , 0 ) ) ; assertFalse ( "Should fail to ungrant key to other user second time" , mKeyStore.ungrant ( android.security.KeyStoreTest.TEST_KEYNAME , 0 ) ) ; }
Source:
private static void setEntry ( art.Test989.MethodTracer type ) throws java.lang.Exception { if ( ( art.Test989.DISABLE_TRACING ) || ( ! ( java.lang.System.getProperty ( "java.vm.name" ) . equals ( "Dalvik" ) ) ) ) { art.Trace.disableMethodTracing ( java.lang.Thread.currentThread ( ) ) ; art.Test989.setupTracing ( ) ; } art.Test989.currentTracer = type ; }

Target:
private static void setEntry ( art.Test989.MethodTracer type ) throws java.lang.Exception { if ( ( art.Test989.DISABLE_TRACING ) || ( ! ( java.lang.System.getProperty ( "java.vm.name" ) . equals ( "Dalvik" ) ) ) ) { art.Trace.disableTracing ( java.lang.Thread.currentThread ( ) ) ; art.Test989.setupTracing ( ) ; } art.Test989.currentTracer = type ; }
Source:
public void run ( ) { mCallbackHandler = new android.os.Handler ( mLooper , this ) ; while ( true ) { try { listenToSocket ( ) ; } catch ( java.lang.Exception e ) { loge ( ( "Error in NativeDaemonConnector: " + e ) ) ; android.os.SystemClock.sleep ( 5000 ) ; } } }

Target:
public void run ( ) { mCallbackHandler = new android.os.Handler ( mLooper , this ) ; while ( true ) { try { listenToSocket ( ) ; } catch ( java.lang.Exception e ) { loge ( ( "Error in NativeDaemonConnector: " + e ) ) ; java.lang.String shutdownAct = android.os.SystemProperties.get ( ShutdownThread.SHUTDOWN_ACTION_PROPERTY , "" ) ; if ( ( shutdownAct != null ) && ( ( shutdownAct.length ( ) ) > 0 ) ) { break ; } android.os.SystemClock.sleep ( 5000 ) ; } } }
Source:
public void incCount ( int targetSdkVersion ) { synchronized ( mScoClients ) { requestScoState ( BluetoothHeadset.STATE_AUDIO_CONNECTED , targetSdkVersion ) ; if ( ( mStartcount ) == 0 ) { try { mCb.linkToDeath ( this , 0 ) ; } catch ( android.os.RemoteException e ) { android.util.Log.w ( android.media.AudioService.TAG , ( ( "ScoClient incCount() could not link to " + ( mCb ) ) + " binder death" ) ) ; } } ( mStartcount ) ++ ; } }

Target:
public void incCount ( int scoAudioMode ) { synchronized ( mScoClients ) { requestScoState ( BluetoothHeadset.STATE_AUDIO_CONNECTED , scoAudioMode ) ; if ( ( mStartcount ) == 0 ) { try { mCb.linkToDeath ( this , 0 ) ; } catch ( android.os.RemoteException e ) { android.util.Log.w ( android.media.AudioService.TAG , ( ( "ScoClient incCount() could not link to " + ( mCb ) ) + " binder death" ) ) ; } } ( mStartcount ) ++ ; } }
Source:
public void createAndroidComponents ( org.gradle.model.collection.CollectionBuilder < com.android.build.gradle.model.AndroidComponentSpec > androidComponents ) { androidComponents.create ( com.android.build.gradle.model.AndroidComponentModelPlugin.COMPONENT_NAME ) ; }

Target:
public void execute ( com.android.build.gradle.managed.ProductFlavor productFlavor ) { productFlavor.getNdkConfig ( ) . setCFlags ( com.google.common.collect.Lists.< java.lang.String > newArrayList ( ) ) ; productFlavor.getNdkConfig ( ) . setCppFlags ( com.google.common.collect.Lists.< java.lang.String > newArrayList ( ) ) ; productFlavor.getNdkConfig ( ) . setLdLibs ( com.google.common.collect.Lists.< java.lang.String > newArrayList ( ) ) ; productFlavor.getNdkConfig ( ) . setAbiFilters ( com.google.common.collect.Sets.< java.lang.String > newHashSet ( ) ) ; }
Source:
public void setAddress ( java.lang.String callId , android.net.Uri address , int presentation ) { com.android.server.telecom.Log.startSession ( "CSW.sA" ) ; long token = android.os.Binder.clearCallingIdentity ( ) ; try { synchronized ( mLock ) { logIncoming ( "setAddress %s %s %d" , callId , address , presentation ) ; com.android.server.telecom.Call call = mCallIdMapper.getCall ( callId ) ; if ( call != null ) { call.setHandle ( address , presentation ) ; } } } finally { android.os.Binder.restoreCallingIdentity ( token ) ; com.android.server.telecom.Log.endSession ( ) ; } }

Target:
public void setAddress ( java.lang.String callId , android.net.Uri address , int presentation ) { android.telecom.Log.startSession ( "CSW.sA" ) ; long token = android.os.Binder.clearCallingIdentity ( ) ; try { synchronized ( mLock ) { logIncoming ( "setAddress %s %s %d" , callId , address , presentation ) ; com.android.server.telecom.Call call = mCallIdMapper.getCall ( callId ) ; if ( call != null ) { call.setHandle ( address , presentation ) ; } } } finally { android.os.Binder.restoreCallingIdentity ( token ) ; android.telecom.Log.endSession ( ) ; } }
Source:
private void freeLoadedPrograms ( ) { synchronized ( installedJack ) { java.util.Collection < com.android.jack.server.JackHttpServer.Program < com.android.jack.api.JackProvider > > programs = getInstalledJacks ( ) ; for ( com.android.jack.server.JackHttpServer.Program < com.android.jack.api.JackProvider > program : programs ) { program.setLoadedProgram ( com.android.jack.server.JackHttpServer.Assertion.ENABLED , null ) ; program.setLoadedProgram ( com.android.jack.server.JackHttpServer.Assertion.DISABLED , null ) ; } } java.lang.System.gc ( ) ; }

Target:
public void resetMaxServiceStat ( ) { synchronized ( lock ) { serviceInfo.maxForward = serviceInfo.currentForward ; serviceInfo.maxLocal = serviceInfo.currentLocal ; } }
Source:
public void onConnectionEvent ( java.lang.String callId , java.lang.String event , android.os.Bundle extras ) { com.android.server.telecom.Log.startSession ( "CSW.oCE" ) ; long token = android.os.Binder.clearCallingIdentity ( ) ; try { synchronized ( mLock ) { android.os.Bundle.setDefusable ( extras , true ) ; com.android.server.telecom.Call call = mCallIdMapper.getCall ( callId ) ; if ( call != null ) { call.onConnectionEvent ( event , extras ) ; } } } finally { android.os.Binder.restoreCallingIdentity ( token ) ; com.android.server.telecom.Log.endSession ( ) ; } }

Target:
public void onConnectionEvent ( java.lang.String callId , java.lang.String event , android.os.Bundle extras ) { android.telecom.Log.startSession ( "CSW.oCE" ) ; long token = android.os.Binder.clearCallingIdentity ( ) ; try { synchronized ( mLock ) { android.os.Bundle.setDefusable ( extras , true ) ; com.android.server.telecom.Call call = mCallIdMapper.getCall ( callId ) ; if ( call != null ) { call.onConnectionEvent ( event , extras ) ; } } } finally { android.os.Binder.restoreCallingIdentity ( token ) ; android.telecom.Log.endSession ( ) ; } }
Source:
protected boolean isEnabled ( com.android.tools.lint.detector.api.Issue issue ) { java.lang.Class < ? extends com.android.tools.lint.detector.api.Detector > detectorClass = getDetectorInstance ( ) . getClass ( ) ; if ( ( issue.getDetectorClass ( ) ) == detectorClass ) { return true ; } if ( ( issue == ( com.android.tools.lint.client.api.IssueRegistry.LINT_ERROR ) ) || ( issue == ( com.android.tools.lint.client.api.IssueRegistry.PARSER_ERROR ) ) ) { return ! ( ignoreSystemErrors ( ) ) ; } return false ; }

Target:
protected boolean isEnabled ( com.android.tools.lint.detector.api.Issue issue ) { java.lang.Class < ? extends com.android.tools.lint.detector.api.Detector > detectorClass = getDetectorInstance ( ) . getClass ( ) ; if ( ( issue.getImplementation ( ) . getDetectorClass ( ) ) == detectorClass ) { return true ; } if ( ( issue == ( com.android.tools.lint.client.api.IssueRegistry.LINT_ERROR ) ) || ( issue == ( com.android.tools.lint.client.api.IssueRegistry.PARSER_ERROR ) ) ) { return ! ( ignoreSystemErrors ( ) ) ; } return false ; }
Source:
public boolean requestANQPElements ( long bssid , com.android.server.wifi.ScanDetail scanDetail , boolean rcOIs , boolean hsReleaseR2 ) { if ( ! ( canSendRequestNow ( bssid ) ) ) { return false ; } if ( ! ( mPasspointHandler.requestANQP ( bssid , com.android.server.wifi.hotspot2.ANQPRequestManager.getRequestElementIDs ( rcOIs , hsReleaseR2 ) ) ) ) { return false ; } updateHoldOffInfo ( bssid ) ; mPendingQueries.put ( bssid , scanDetail ) ; return true ; }

Target:
public boolean requestANQPElements ( long bssid , com.android.server.wifi.hotspot2.ANQPNetworkKey anqpNetworkKey , boolean rcOIs , boolean hsReleaseR2 ) { if ( ! ( canSendRequestNow ( bssid ) ) ) { return false ; } if ( ! ( mPasspointHandler.requestANQP ( bssid , com.android.server.wifi.hotspot2.ANQPRequestManager.getRequestElementIDs ( rcOIs , hsReleaseR2 ) ) ) ) { return false ; } updateHoldOffInfo ( bssid ) ; mPendingQueries.put ( bssid , anqpNetworkKey ) ; return true ; }
Source:
public void sendSMS ( java.lang.String smscPDU , java.lang.String pdu , android.os.Message result ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_SEND_SMS , result ) ; constructGsmSendSmsRilRequest ( rr , smscPDU , pdu ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; mMetrics.writeRilSendSms ( mInstanceId , rr.mSerial , SmsSession.Event.Tech.SMS_GSM , SmsSession.Event.Format.SMS_FORMAT_3GPP ) ; send ( rr ) ; }

Target:
public void setSuppServiceNotifications ( boolean enable , android.os.Message result ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION , result , mRILDefaultWorkSource ) ; rr.mParcel.writeInt ( 1 ) ; rr.mParcel.writeInt ( ( enable ? 1 : 0 ) ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; send ( rr ) ; }
Source:
public static org.bouncycastle.crypto.params.DHPrivateKeyParameters generateEphemeralClientKeyExchange ( java.security.SecureRandom random , org.bouncycastle.crypto.params.DHParameters dhParams , java.io.OutputStream output ) throws java.io.IOException { org.bouncycastle.crypto.AsymmetricCipherKeyPair kp = org.bouncycastle.crypto.tls.TlsDHUtils.generateDHKeyPair ( random , dhParams ) ; org.bouncycastle.crypto.params.DHPublicKeyParameters dh_public = ( ( org.bouncycastle.crypto.params.DHPublicKeyParameters ) ( kp.getPublic ( ) ) ) ; org.bouncycastle.crypto.tls.TlsDHUtils.writeDHParameter ( dh_public.getY ( ) , output ) ; return ( ( org.bouncycastle.crypto.params.DHPrivateKeyParameters ) ( kp.getPrivate ( ) ) ) ; }

Target:
public static org.bouncycastle.crypto.params.DHPrivateKeyParameters generateEphemeralClientKeyExchange ( java.security.SecureRandom random , org.bouncycastle.crypto.params.DHParameters dhParams , java.io.OutputStream output ) throws java.io.IOException { org.bouncycastle.crypto.AsymmetricCipherKeyPair kp = org.bouncycastle.crypto.tls.TlsDHUtils.generateDHKeyPair ( random , dhParams ) ; org.bouncycastle.crypto.params.DHPublicKeyParameters dhPublic = ( ( org.bouncycastle.crypto.params.DHPublicKeyParameters ) ( kp.getPublic ( ) ) ) ; org.bouncycastle.crypto.tls.TlsDHUtils.writeDHParameter ( dhPublic.getY ( ) , output ) ; return ( ( org.bouncycastle.crypto.params.DHPrivateKeyParameters ) ( kp.getPrivate ( ) ) ) ; }
Source:
private int findThreadIdFromName ( java.lang.String threadName ) { com.android.utils.SparseArray < java.lang.String > threads = mTraceData.getThreads ( ) ; for ( int i = 0 ; i < ( threads.size ( ) ) ; i ++ ) { if ( threads.valueAt ( i ) . equalsIgnoreCase ( threadName ) ) { return threads.keyAt ( i ) ; } } return - 1 ; }

Target:
public void setRenderClock ( com.android.tools.perflib.vmtrace.ClockType clock ) { mRenderClock = clock ; if ( ( mCallHierarchyRenderer ) != null ) { mCallHierarchyRenderer.setRenderClock ( clock ) ; repaint ( ) ; } }
Source:
public boolean isCurrentFileBestMatchFor ( com.android.ide.common.resources.configuration.FolderConfiguration config ) { com.android.ide.common.resources.ResourceFile match = mResources.getMatchingFile ( mEditedFile.getName ( ) , ResourceFolderType.LAYOUT , config ) ; if ( match != null ) { return match.getFile ( ) . equals ( mEditedFile ) ; } else { com.android.ide.eclipse.adt.AdtPlugin.log ( IStatus.ERROR , "Current file is not a match for the given config." ) ; } return false ; }

Target:
public boolean isCurrentFileBestMatchFor ( com.android.ide.common.resources.configuration.FolderConfiguration config ) { com.android.ide.common.resources.ResourceFile match = mResources.getMatchingFile ( mEditedFile.getName ( ) , ResourceType.LAYOUT , config ) ; if ( match != null ) { return match.getFile ( ) . equals ( mEditedFile ) ; } else { com.android.ide.eclipse.adt.AdtPlugin.log ( IStatus.ERROR , "Current file is not a match for the given config." ) ; } return false ; }
Source:
private synchronized < T extends com.android.server.IpSecService.KernelResource > void releaseKernelResource ( com.android.server.IpSecService.KernelResourceArray < T > resArray , int resourceId , java.lang.String typeName ) throws android.os.RemoteException { T record = resArray.getAndCheckOwner ( resourceId ) ; if ( record == null ) { throw new java.lang.IllegalArgumentException ( ( ( ( typeName + " " ) + resourceId ) + " is not available to be deleted" ) ) ; } record.release ( ) ; resArray.remove ( resourceId ) ; }

Target:
private void releaseResource ( com.android.server.IpSecService.RefcountedResourceArray resArray , int resourceId ) throws android.os.RemoteException { resArray.getRefcountedResourceOrThrow ( resourceId ) . userRelease ( ) ; }
Source:
private void writeCharacteristic ( java.lang.String writeValue ) { android.bluetooth.BluetoothGattCharacteristic characteristic = getCharacteristic ( com.android.cts.verifier.bluetooth.BleServerService.CHARACTERISTIC_UUID ) ; if ( characteristic != null ) return ; characteristic.setValue ( writeValue ) ; }

Target:
private void onMtuTestDataReceive ( ) { android.util.Log.d ( com.android.cts.verifier.bluetooth.BleServerService.TAG , ( ( ( "onMtuTestDataReceive(" + ( mCountMtuChange ) ) + "):" ) + ( mMtuTestReceivedData ) ) ) ; if ( mMtuTestReceivedData.equals ( BleClientService.WRITE_VALUE_512BYTES_FOR_MTU ) ) { android.bluetooth.BluetoothGattCharacteristic characteristic = getCharacteristic ( com.android.cts.verifier.bluetooth.BleServerService.CHARACTERISTIC_UUID ) ; characteristic.setValue ( mMtuTestReceivedData.getBytes ( ) ) ; notifyMtuRequest ( ) ; } else { showMessage ( getString ( R.string.ble_mtu_fail_message ) ) ; } mMtuTestReceivedData = "" ; if ( ( mCountMtuChange ) >= 2 ) { mCountMtuChange = 0 ; } }
Source:
public void importFromJast ( @ javax.annotation.Nonnull com.android.jack.jayce.v0002.io.ImportHelper loader , @ javax.annotation.Nonnull java.lang.Object node ) { com.android.jack.ir.ast.JDynamicCastOperation jDynamicCastOperation = ( ( com.android.jack.ir.ast.JDynamicCastOperation ) ( node ) ) ; castType = com.android.jack.jayce.v0002.io.ImportHelper.getSignatureName ( jDynamicCastOperation.getCastType ( ) ) ; expr = ( ( com.android.jack.jayce.v0002.nodes.NExpression ) ( loader.load ( jDynamicCastOperation.getExpr ( ) ) ) ) ; sourceInfo = loader.load ( jDynamicCastOperation.getSourceInfo ( ) ) ; }

Target:
public void importFromJast ( @ javax.annotation.Nonnull com.android.jack.jayce.v0002.io.ImportHelper loader , @ javax.annotation.Nonnull java.lang.Object node ) { throw new java.lang.AssertionError ( ) ; }
Source:
android.server.cts.ActivityManagerState.ActivityTask getRecentsTask ( ) { android.server.cts.ActivityManagerState.ActivityStack recentsStack = getStackById ( android.server.cts.RECENTS_STACK_ID ) ; if ( recentsStack != null ) { for ( android.server.cts.ActivityManagerState.ActivityTask task : recentsStack.mTasks ) { if ( ( task.mTaskType ) == ( android.server.cts.ActivityManagerState.RECENTS_ACTIVITY_TYPE ) ) { return task ; } } return null ; } return null ; }

Target:
android.server.cts.ActivityManagerState.ActivityTask getRecentsTask ( ) { android.server.cts.ActivityManagerState.ActivityStack recentsStack = getStackById ( android.server.cts.ActivityManagerTestBase.RECENTS_STACK_ID ) ; if ( recentsStack != null ) { for ( android.server.cts.ActivityManagerState.ActivityTask task : recentsStack.mTasks ) { if ( ( task.mTaskType ) == ( android.server.cts.ActivityManagerState.RECENTS_ACTIVITY_TYPE ) ) { return task ; } } return null ; } return null ; }
Source:
protected boolean start ( ) { android.os.HandlerThread thread = new android.os.HandlerThread ( "BluetoothAvrcpHandler" ) ; thread.start ( ) ; android.os.Looper looper = thread.getLooper ( ) ; mHandler = new com.android.bluetooth.avrcp.AvrcpControllerService.AvrcpMessageHandler ( looper ) ; com.android.bluetooth.avrcp.AvrcpControllerService.setAvrcpControllerService ( this ) ; return true ; }

Target:
protected boolean start ( ) { android.os.HandlerThread thread = new android.os.HandlerThread ( "BluetoothAvrcpHandler" ) ; thread.start ( ) ; android.os.Looper looper = thread.getLooper ( ) ; mHandler = new com.android.bluetooth.avrcp.AvrcpControllerService.AvrcpMessageHandler ( looper ) ; com.android.bluetooth.avrcp.AvrcpControllerService.setAvrcpControllerService ( this ) ; com.android.bluetooth.avrcp.AvrcpControllerService.mAudioManager = ( ( android.media.AudioManager ) ( com.android.bluetooth.avrcp.AvrcpControllerService.sAvrcpControllerService.getSystemService ( Context.AUDIO_SERVICE ) ) ) ; return true ; }
Source:
public void testStartStopFlow ( ) throws java.lang.Exception { executeAndValidateStartupSequence ( ) ; mDut.stop ( ) ; mTestLooper.dispatchAll ( ) ; mInOrder.verify ( mWifiMock ) . stop ( ) ; mInOrder.verify ( mManagerStatusCallbackMock ) . onStop ( ) ; org.mockito.Mockito.verifyNoMoreInteractions ( mServiceManagerMock , mWifiMock , mManagerStatusCallbackMock ) ; }

Target:
public void testStartStopFlow ( ) throws java.lang.Exception { mInOrder = org.mockito.Mockito.inOrder ( mServiceManagerMock , mWifiMock , mManagerStatusCallbackMock ) ; executeAndValidateInitializationSequence ( ) ; executeAndValidateStartupSequence ( ) ; mDut.stop ( ) ; mTestLooper.dispatchAll ( ) ; mInOrder.verify ( mWifiMock ) . stop ( ) ; mInOrder.verify ( mManagerStatusCallbackMock ) . onStop ( ) ; org.mockito.Mockito.verifyNoMoreInteractions ( mManagerStatusCallbackMock ) ; }
Source:
public void testConflictingImportVerbose ( ) throws java.lang.Exception { java.io.ByteArrayOutputStream errOut = new java.io.ByteArrayOutputStream ( ) ; commonConflictingImport ( errOut , true ) ; errOut.close ( ) ; java.lang.String errString = errOut.toString ( ) ; junit.framework.Assert.assertTrue ( errString.contains ( "Ignoring import: Type com.android.jack.inner.test015.lib.A from directory" ) ) ; junit.framework.Assert.assertTrue ( errString.contains ( "has already been imported from directory" ) ) ; }

Target:
public void testConflictingImportVerbose ( ) throws java.lang.Exception { java.io.ByteArrayOutputStream errOut = new java.io.ByteArrayOutputStream ( ) ; commonConflictingImport ( errOut , true ) ; errOut.close ( ) ; java.lang.String errString = errOut.toString ( ) ; junit.framework.Assert.assertTrue ( errString.contains ( "Ignoring import: Type com.android.jack.inner.test015.lib.A from" ) ) ; junit.framework.Assert.assertTrue ( errString.contains ( "has already been imported from" ) ) ; }
Source:
public void testUpdate_allNetworksScored ( ) { org.mockito.Mockito.when ( mNetworkScoreCache.isScoredNetwork ( com.android.server.wifi.RecommendedNetworkEvaluatorTest.TRUSTED_SCAN_DETAIL.getScanResult ( ) ) ) . thenReturn ( true ) ; org.mockito.Mockito.when ( mNetworkScoreCache.isScoredNetwork ( com.android.server.wifi.RecommendedNetworkEvaluatorTest.UNTRUSTED_SCAN_DETAIL.getScanResult ( ) ) ) . thenReturn ( true ) ; mRecommendedNetworkEvaluator.update ( com.google.android.collect.Lists.newArrayList ( com.android.server.wifi.RecommendedNetworkEvaluatorTest.TRUSTED_SCAN_DETAIL , com.android.server.wifi.RecommendedNetworkEvaluatorTest.UNTRUSTED_SCAN_DETAIL ) ) ; org.mockito.Mockito.verifyZeroInteractions ( mNetworkScoreManager ) ; }

Target:
public void testUpdate_allNetworksScored ( ) { org.mockito.Mockito.when ( mNetworkScoreCache.isScoredNetwork ( mTrustedScanDetail.getScanResult ( ) ) ) . thenReturn ( true ) ; org.mockito.Mockito.when ( mNetworkScoreCache.isScoredNetwork ( mUntrustedScanDetail.getScanResult ( ) ) ) . thenReturn ( true ) ; mRecommendedNetworkEvaluator.update ( com.google.android.collect.Lists.newArrayList ( mTrustedScanDetail , mUntrustedScanDetail ) ) ; org.mockito.Mockito.verifyZeroInteractions ( mNetworkScoreManager ) ; }
Source:
public com.android.ide.eclipse.adt.internal.wizards.templates.TemplateMetadata getTemplate ( ) { if ( ( mTemplate ) == null ) { java.lang.String xml = readTemplateTextResource ( com.android.ide.eclipse.adt.internal.wizards.templates.TemplateHandler.TEMPLATE_XML ) ; if ( xml != null ) { org.w3c.dom.Document doc = com.android.ide.eclipse.adt.internal.editors.layout.gle2.DomUtilities.parseDocument ( xml , true ) ; if ( ( doc != null ) && ( ( doc.getDocumentElement ( ) ) != null ) ) { mTemplate = new com.android.ide.eclipse.adt.internal.wizards.templates.TemplateMetadata ( doc ) ; } } } return mTemplate ; }

Target:
public com.android.ide.eclipse.adt.internal.wizards.templates.TemplateMetadata getTemplate ( ) { if ( ( mTemplate ) == null ) { mTemplate = mManager.getTemplate ( mRootPath ) ; } return mTemplate ; }
Source:
public void onStateChanged ( int newState ) { com.android.dialer.common.LogUtil.enterBlock ( "SimulatorConnection.onStateChanged" ) ; onEvent ( new com.android.dialer.simulator.Simulator.Event ( com.android.dialer.simulator.Simulator.Event.STATE_CHANGE , stateToString ( currentState ) , stateToString ( newState ) ) ) ; currentState = newState ; }

Target:
public void onStateChanged ( int newState ) { com.android.dialer.common.LogUtil.i ( "SimulatorConnection.onStateChanged" , "%s -> %s" , stateToString ( currentState ) , stateToString ( newState ) ) ; int oldState = currentState ; currentState = newState ; onEvent ( new com.android.dialer.simulator.Simulator.Event ( com.android.dialer.simulator.Simulator.Event.STATE_CHANGE , stateToString ( oldState ) , stateToString ( newState ) ) ) ; }
Source:
private org.apache.http.client.HttpClient getHttpClient ( int timeout ) { org.apache.http.params.HttpParams params = new org.apache.http.params.BasicHttpParams ( ) ; org.apache.http.params.HttpConnectionParams.setConnectionTimeout ( params , com.android.exchange.EasSyncService.CONNECTION_TIMEOUT ) ; org.apache.http.params.HttpConnectionParams.setSoTimeout ( params , timeout ) ; org.apache.http.params.HttpConnectionParams.setSocketBufferSize ( params , 8192 ) ; org.apache.http.client.HttpClient client = new org.apache.http.impl.client.DefaultHttpClient ( getClientConnectionManager ( ) , params ) ; return client ; }

Target:
private org.apache.http.client.HttpClient getHttpClient ( int timeout ) { org.apache.http.params.HttpParams params = new org.apache.http.params.BasicHttpParams ( ) ; org.apache.http.params.HttpConnectionParams.setConnectionTimeout ( params , com.android.exchange.EasSyncService.CONNECTION_TIMEOUT ) ; org.apache.http.params.HttpConnectionParams.setSoTimeout ( params , timeout ) ; org.apache.http.params.HttpConnectionParams.setSocketBufferSize ( params , 8192 ) ; org.apache.http.client.HttpClient client = new org.apache.http.impl.client.DefaultHttpClient ( getClientConnectionManager ( ) , params ) ; if ( mTrustSsl ) { org.apache.http.HttpHost httpHost = android.net.Proxy.getPreferredHttpHost ( mContext , ( "httpts://" + ( mHostAddress ) ) ) ; if ( httpHost != null ) { if ( Eas.USER_LOG ) { userLog ( ( "Using proxy:" + ( httpHost.toString ( ) ) ) ) ; } org.apache.http.conn.params.ConnRouteParams.setDefaultProxy ( client.getParams ( ) , httpHost ) ; } } return client ; }
Source:
public static com.android.ims.ImsServiceProxyCompat create ( int slotId , android.os.IBinder.DeathRecipient recipient ) { android.os.IBinder binder = android.os.ServiceManager.checkService ( com.android.ims.ImsServiceProxyCompat.IMS_SERVICE ) ; if ( binder != null ) { try { binder.linkToDeath ( recipient , 0 ) ; } catch ( android.os.RemoteException e ) { } } return new com.android.ims.ImsServiceProxyCompat ( slotId , binder ) ; }

Target:
public static com.android.ims.ImsServiceProxyCompat create ( android.content.Context context , int slotId , android.os.IBinder.DeathRecipient recipient ) { android.os.IBinder binder = android.os.ServiceManager.checkService ( com.android.ims.ImsServiceProxyCompat.IMS_SERVICE ) ; if ( binder != null ) { try { binder.linkToDeath ( recipient , 0 ) ; } catch ( android.os.RemoteException e ) { } } return new com.android.ims.ImsServiceProxyCompat ( context , slotId , binder ) ; }
Source:
public static int getCallbackAction ( java.lang.String number , int features , boolean isLightbringerCall ) { if ( android.text.TextUtils.isEmpty ( number ) ) { return com.android.dialer.calllogutils.CallbackActionHelper.CallbackAction.NONE ; } if ( isLightbringerCall ) { return com.android.dialer.calllogutils.CallbackActionHelper.CallbackAction.LIGHTBRINGER ; } boolean isVideoCall = ( features & ( android.provider.CallLog.Calls.FEATURES_VIDEO ) ) == ( android.provider.CallLog.Calls.FEATURES_VIDEO ) ; if ( isVideoCall ) { return com.android.dialer.calllogutils.CallbackActionHelper.CallbackAction.IMS_VIDEO ; } return com.android.dialer.calllogutils.CallbackActionHelper.CallbackAction.VOICE ; }

Target:
public static int getCallbackAction ( java.lang.String number , int features , boolean isDuoCall ) { if ( android.text.TextUtils.isEmpty ( number ) ) { return com.android.dialer.calllogutils.CallbackActionHelper.CallbackAction.NONE ; } if ( isDuoCall ) { return com.android.dialer.calllogutils.CallbackActionHelper.CallbackAction.DUO ; } boolean isVideoCall = ( features & ( android.provider.CallLog.Calls.FEATURES_VIDEO ) ) == ( android.provider.CallLog.Calls.FEATURES_VIDEO ) ; if ( isVideoCall ) { return com.android.dialer.calllogutils.CallbackActionHelper.CallbackAction.IMS_VIDEO ; } return com.android.dialer.calllogutils.CallbackActionHelper.CallbackAction.VOICE ; }
Source:
public void onAttachFailed ( ) { android.os.Bundle mResults = new android.os.Bundle ( ) ; mResults.putInt ( "sessionId" , mSessionId ) ; mResults.putLong ( "latencyMs" , ( ( java.lang.System.currentTimeMillis ( ) ) - ( mCreateTimestampMs ) ) ) ; mEventFacade.postEvent ( "WifiNanOnAttachFailed" , mResults ) ; }

Target:
public void onAttachFailed ( ) { android.os.Bundle mResults = new android.os.Bundle ( ) ; mResults.putInt ( "sessionId" , mSessionId ) ; mResults.putLong ( "latencyMs" , ( ( java.lang.System.currentTimeMillis ( ) ) - ( mCreateTimestampMs ) ) ) ; mEventFacade.postEvent ( "WifiAwareOnAttachFailed" , mResults ) ; }
Source:
public void unbind ( ) throws android.os.RemoteException { synchronized ( mLock ) { mBackoff.stop ( ) ; if ( ( ( mImsServiceConnection ) == null ) || ( ( mImsDeathRecipient ) == null ) ) { return ; } changeImsServiceFeatures ( new java.util.HashSet < > ( ) ) ; removeImsServiceFeatureListener ( ) ; mImsServiceControllerBinder.unlinkToDeath ( mImsDeathRecipient , 0 ) ; android.util.Log.i ( com.android.internal.telephony.ims.ImsServiceController.LOG_TAG , ( "Unbinding ImsService: " + ( mComponentName ) ) ) ; mContext.unbindService ( mImsServiceConnection ) ; cleanUpService ( ) ; } }

Target:
public void disableIms ( int slotId ) { try { synchronized ( mLock ) { if ( isServiceControllerAvailable ( ) ) { mIImsServiceController.disableIms ( slotId ) ; } } } catch ( android.os.RemoteException e ) { android.util.Log.w ( com.android.internal.telephony.ims.ImsServiceController.LOG_TAG , ( "Couldn't disable IMS: " + ( e.getMessage ( ) ) ) ) ; } }
Source:
public static java.lang.String getPackageVersionCode ( android.content.Context context ) { java.lang.String msg = "versionCode not available." ; try { android.content.pm.PackageManager pm = context.getPackageManager ( ) ; android.content.pm.PackageInfo pi = pm.getPackageInfo ( context.getPackageName ( ) , 0 ) ; msg = "" ; if ( ( pi.versionCode ) > 0 ) { msg = java.lang.Integer.toString ( pi.versionCode ) ; } } catch ( android.content.pm.PackageManager.NameNotFoundException e ) { org.chromium.base.Log.d ( org.chromium.base.BuildInfo.TAG , msg ) ; } return msg ; }

Target:
public static java.lang.String getPackageVersionCode ( ) { java.lang.String msg = "versionCode not available." ; try { android.content.pm.PackageManager pm = org.chromium.base.ContextUtils.getApplicationContext ( ) . getPackageManager ( ) ; android.content.pm.PackageInfo pi = pm.getPackageInfo ( org.chromium.base.BuildInfo.getPackageName ( ) , 0 ) ; msg = "" ; if ( ( pi.versionCode ) > 0 ) { msg = java.lang.Integer.toString ( pi.versionCode ) ; } } catch ( android.content.pm.PackageManager.NameNotFoundException e ) { org.chromium.base.Log.d ( org.chromium.base.BuildInfo.TAG , msg ) ; } return msg ; }
Source:
public java.lang.String getMeid ( ) { if ( isPhoneTypeGsm ( ) ) { loge ( "[GsmCdmaPhone] getMeid() is a CDMA method" ) ; return "0" ; } else { return mMeid ; } }

Target:
public java.lang.String getPlmn ( ) { if ( isPhoneTypeGsm ( ) ) { com.android.internal.telephony.uicc.IccRecords r = mIccRecords.get ( ) ; return r != null ? r.getPnnHomeName ( ) : null ; } else if ( isPhoneTypeCdma ( ) ) { loge ( "Plmn is not available in CDMA" ) ; return null ; } else { return ( mSimRecords ) != null ? mSimRecords.getPnnHomeName ( ) : null ; } }
Source:
public void testSign_Success ( ) throws java.lang.Exception { mKeyStore.password ( android.security.KeyStoreTest.TEST_PASSWD ) ; assertTrue ( mKeyStore.generate ( android.security.KeyStoreTest.TEST_KEYNAME , KeyStore.UID_SELF , NativeCrypto.EVP_PKEY_RSA , android.security.KeyStoreTest.RSA_KEY_SIZE , KeyStore.FLAG_ENCRYPTED , null ) ) ; assertTrue ( mKeyStore.contains ( android.security.KeyStoreTest.TEST_KEYNAME ) ) ; final byte [ ] signature = mKeyStore.sign ( android.security.KeyStoreTest.TEST_KEYNAME , android.security.KeyStoreTest.TEST_DATA ) ; assertNotNull ( "Signature should not be null" , signature ) ; }

Target:
public void testSign_Success ( ) throws java.lang.Exception { mKeyStore.password ( android.security.KeyStoreTest.TEST_PASSWD ) ; assertTrue ( mKeyStore.generate ( android.security.KeyStoreTest.TEST_KEYNAME , KeyStore.UID_SELF , NativeConstants.EVP_PKEY_RSA , android.security.KeyStoreTest.RSA_KEY_SIZE , KeyStore.FLAG_ENCRYPTED , null ) ) ; assertTrue ( mKeyStore.contains ( android.security.KeyStoreTest.TEST_KEYNAME ) ) ; final byte [ ] signature = mKeyStore.sign ( android.security.KeyStoreTest.TEST_KEYNAME , android.security.KeyStoreTest.TEST_DATA ) ; assertNotNull ( "Signature should not be null" , signature ) ; }
Source:
public void testAesGcm96Tcp6 ( ) throws java.lang.Exception { android.net.IpSecAlgorithm authCrypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_CRYPT_AES_GCM , android.net.cts.IpSecManagerTest.getKey ( 288 ) , 96 ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IpSecManagerTest.IPV6_LOOPBACK , null , null , authCrypt , false , 1 , false ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IpSecManagerTest.IPV6_LOOPBACK , null , null , authCrypt , false , 1 , true ) ; }

Target:
public void testAesCbcHmacSha384Tcp4UdpEncap ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , android.net.cts.IpSecManagerTest.CRYPT_KEY ) ; android.net.IpSecAlgorithm auth = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_HMAC_SHA384 , getAuthKey ( 384 ) , 192 ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , true , 1 , false ) ; }
Source:
public void testNewInstanceString_NoArgConstructor ( ) { runTestNewInstanceString ( "()V" , new org.apache.harmony.jpda.tests.jdwp.ClassType.NewInstanceStringTest.ConstructorArgumentsProvider ( ) { @ java.lang.Override public void provideConstructorArguments ( java.util.List < org.apache.harmony.jpda.tests.framework.jdwp.Value > constructorArguments ) { } } ) ; }

Target:
public void testNewInstanceString_ByteArrayArgConstructor ( ) { runTestNewInstanceString ( "([B)V" , new org.apache.harmony.jpda.tests.jdwp.ClassType.ConstructorArgumentsProvider ( ) { @ java.lang.Override public void provideConstructorArguments ( java.util.List < org.apache.harmony.jpda.tests.framework.jdwp.Value > constructorArguments ) { long debuggeeClassId = getClassIDBySignature ( getDebuggeeClassSignature ( ) ) ; org.apache.harmony.jpda.tests.framework.jdwp.Value byteArrayValue = getStaticFieldValue ( debuggeeClassId , "BYTE_ARRAY" ) ; constructorArguments.add ( byteArrayValue ) ; } } ) ; }
Source:
public void unregisterListener ( android.os.storage.IMountServiceListener listener ) { synchronized ( mListeners ) { for ( com.android.server.MountService.MountServiceBinderListener bl : mListeners ) { if ( ( bl.mListener ) == listener ) { mListeners.remove ( mListeners.indexOf ( bl ) ) ; return ; } } } }

Target:
public void unregisterListener ( android.os.storage.IMountServiceListener listener ) { synchronized ( mListeners ) { for ( com.android.server.MountService.MountServiceBinderListener bl : mListeners ) { if ( ( bl.mListener ) == listener ) { mListeners.remove ( mListeners.indexOf ( bl ) ) ; listener.asBinder ( ) . unlinkToDeath ( bl , 0 ) ; return ; } } } }
Source:
public void onAlarm ( ) { if ( com.android.server.wifi.scanner.SupplicantWifiScannerImpl.DBG ) android.util.Log.d ( com.android.server.wifi.scanner.SupplicantWifiScannerImpl.TAG , ( "PNO timer expired, expected state " + ( mExpectedPnoState ) ) ) ; if ( ! ( updatePnoState ( mExpectedPnoState ) ) ) { if ( ( mListener ) != null ) { mListener.onPnoScanFailed ( ) ; } } mWaitForTimer = false ; }

Target:
public void onAlarm ( ) { if ( com.android.server.wifi.scanner.SupplicantWifiScannerImpl.DBG ) android.util.Log.d ( com.android.server.wifi.scanner.SupplicantWifiScannerImpl.TAG , ( "PNO timer expired, expected state " + ( mExpectedPnoState ) ) ) ; if ( mExpectedPnoState ) { if ( ! ( startPnoScanInternal ( ) ) ) { if ( ( mListener ) != null ) { mListener.onPnoScanFailed ( ) ; } } } else { stopPnoScanInternal ( ) ; } mWaitForTimer = false ; }
Source:
com.android.sched.vfs.WriteZipFS.ZipVFile createVFile ( @ javax.annotation.Nonnull com.android.sched.vfs.WriteZipFS.ZipVDir parent , @ javax.annotation.Nonnull java.lang.String name ) { assert ! ( isClosed ( ) ) ; return new com.android.sched.vfs.WriteZipFS.ZipVFile ( this , new java.util.zip.ZipEntry ( ( ( parent.getZipEntry ( ) . getName ( ) ) + name ) ) , name ) ; }

Target:
com.android.sched.vfs.WriteZipFS.ZipVFile createVFile ( @ javax.annotation.Nonnull com.android.sched.vfs.WriteZipFS.ZipVDir parent , @ javax.annotation.Nonnull java.lang.String name ) { assert ! ( isClosed ( ) ) ; com.android.sched.vfs.WriteZipFS.ZipVFile vFile = new com.android.sched.vfs.WriteZipFS.ZipVFile ( this , new java.util.zip.ZipEntry ( ( ( parent.getZipEntry ( ) . getName ( ) ) + name ) ) , name ) ; com.android.sched.util.log.Tracer tracer = getTracer ( ) ; if ( tracer != null ) { tracer.getStatistic ( com.android.sched.vfs.WriteZipFS.CREATED_ZIP_ENTRIES ) . incValue ( ) ; } return vFile ; }
Source:
void stopScan ( com.android.bluetooth.gatt.ScanClient client ) { enforceAdminPermission ( ) ; int scanQueueSize = ( mScanManager.getBatchScanQueue ( ) . size ( ) ) + ( mScanManager.getRegularScanQueue ( ) . size ( ) ) ; if ( com.android.bluetooth.gatt.GattService.DBG ) android.util.Log.d ( com.android.bluetooth.gatt.GattService.TAG , ( "stopScan() - queue size =" + scanQueueSize ) ) ; mClientMap.getScanStatsById ( client.clientIf ) . recordScanStop ( ) ; mScanManager.stopScan ( client ) ; }

Target:
void stopScan ( com.android.bluetooth.gatt.ScanClient client ) { enforceAdminPermission ( ) ; int scanQueueSize = ( mScanManager.getBatchScanQueue ( ) . size ( ) ) + ( mScanManager.getRegularScanQueue ( ) . size ( ) ) ; if ( com.android.bluetooth.gatt.GattService.DBG ) android.util.Log.d ( com.android.bluetooth.gatt.GattService.TAG , ( "stopScan() - queue size =" + scanQueueSize ) ) ; mClientMap.getAppScanStatsById ( client.clientIf ) . recordScanStop ( ) ; mScanManager.stopScan ( client ) ; }
Source:
private boolean tryMapReg ( com.android.dx.ssa.back.RegisterSpec ssaSpec , int ropReg , int maxAllowedCategory ) { if ( ( ( ( ssaSpec.getCategory ( ) ) <= maxAllowedCategory ) && ( ! ( ssaRegsMapped.get ( ssaSpec.getReg ( ) ) ) ) ) && ( canMapReg ( ssaSpec , ropReg ) ) ) { addMapping ( ssaSpec , ropReg ) ; return true ; } return false ; }

Target:
private boolean tryMapReg ( com.android.dx.rop.code.RegisterSpec ssaSpec , int ropReg , int maxAllowedCategory ) { if ( ( ( ( ssaSpec.getCategory ( ) ) <= maxAllowedCategory ) && ( ! ( ssaRegsMapped.get ( ssaSpec.getReg ( ) ) ) ) ) && ( canMapReg ( ssaSpec , ropReg ) ) ) { addMapping ( ssaSpec , ropReg ) ; return true ; } return false ; }
Source:
public void testNoiseReductionModeControl ( ) throws java.lang.Exception { for ( java.lang.String id : mCameraIds ) { try { openDevice ( id ) ; if ( ! ( mStaticInfo.isNoiseReductionModeControlSupported ( ) ) ) { android.util.Log.i ( android.hardware.camera2.cts.CaptureRequestTest.TAG , ( ( "Camera " + id ) + " doesn't support noise reduction mode, skipping test" ) ) ; continue ; } noiseReductionModeTestByCamera ( ) ; } finally { closeDevice ( ) ; } } }

Target:
public void testNoiseReductionModeControl ( ) throws java.lang.Exception { for ( java.lang.String id : mCameraIds ) { try { openDevice ( id ) ; if ( ! ( mStaticInfo.isNoiseReductionModeControlSupported ( ) ) ) { android.util.Log.i ( android.hardware.camera2.cts.CaptureRequestTest.TAG , ( ( "Camera " + id ) + " doesn't support noise reduction mode, skipping test" ) ) ; continue ; } java.util.List < android.util.Range < java.lang.Integer > > fpsRanges = getTargetFpsRangesUpTo30 ( mStaticInfo ) ; noiseReductionModeTestByCamera ( fpsRanges ) ; } finally { closeDevice ( ) ; } } }
Source:
public void testPackageOverrideNone ( ) { com.android.builder.AndroidBuilder builder = new com.android.builder.AndroidBuilder ( new com.android.builder.DefaultSdkParser ( "" ) , new com.android.utils.StdLogger ( StdLogger.Level.ERROR ) , false ) ; builder.setBuildVariant ( mMain , mFlavor , mDebug ) ; assertNull ( builder.getPackageOverride ( "" ) ) ; }

Target:
public void testPackageOverrideNone ( ) { com.android.builder.AndroidBuilder builder = new com.android.builder.AndroidBuilderTest.AndroidBuilderMock ( new com.android.builder.DefaultSdkParser ( "" ) , new com.android.utils.StdLogger ( StdLogger.Level.ERROR ) , false ) ; builder.setBuildVariant ( mMain , mDebug ) ; builder.addProductFlavor ( mFlavor ) ; assertNull ( builder.getPackageOverride ( "" ) ) ; }
Source:
public void testOnTearDownRestoreFailed ( ) throws java.lang.Exception { mCmdUtil.mCmdSuccess = false ; try { mPreparer.tearDown ( mDevice , mBuildInfo , null ) ; } catch ( java.lang.RuntimeException e ) { org.junit.Assert.assertEquals ( "HAL restore failed." , e.getMessage ( ) ) ; return ; } org.junit.Assert.fail ( ) ; }

Target:
public void testOnTearDownRestoreFailed ( ) throws java.lang.Exception { mCmdUtil.mCmdSuccess = false ; try { mPreparer.setCmdUtil ( mCmdUtil ) ; mPreparer.addCommand ( "one" ) ; mPreparer.tearDown ( mDevice , mBuildInfo , null ) ; } catch ( java.lang.AssertionError | com.android.tradefed.device.DeviceNotAvailableException e ) { org.junit.Assert.assertEquals ( "HAL restore failed." , e.getMessage ( ) ) ; return ; } org.junit.Assert.fail ( ) ; }
Source:
private void handleVoicePrivacyClickRequest ( boolean value ) { mPhone.enableEnhancedVoicePrivacy ( value , android.os.Message.obtain ( mSetOptionComplete , com.android.phone.CallFeaturesSetting.EVENT_ENHANCED_VP_EXECUTED ) ) ; }

Target:
public java.lang.String onGetDefaultNumber ( com.android.phone.EditPhoneNumberPreference preference ) { if ( preference == ( mSubMenuVoicemailSettings ) ) { if ( com.android.phone.CallFeaturesSetting.DBG ) com.android.phone.CallFeaturesSetting.log ( "updating default for voicemail dialog" ) ; updateVoiceNumberField ( ) ; return null ; } java.lang.String vmDisplay = mPhone.getVoiceMailNumber ( ) ; if ( android.text.TextUtils.isEmpty ( vmDisplay ) ) { return null ; } if ( com.android.phone.CallFeaturesSetting.DBG ) com.android.phone.CallFeaturesSetting.log ( "updating default for call forwarding dialogs" ) ; return ( ( getString ( R.string.voicemail_abbreviated ) ) + " " ) + vmDisplay ; }