auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void matchProviderWithAnqpCacheMissed ( ) throws java.lang.Exception { addTestProvider ( ) ; org.mockito.Mockito.when ( mAnqpCache.getEntry ( com.android.server.wifi.hotspot2.PasspointManagerTest.TEST_ANQP_KEY ) ) . thenReturn ( null ) ; java.util.List < android.util.Pair < com.android.server.wifi.hotspot2.PasspointProvider , com.android.server.wifi.hotspot2.PasspointMatch > > result = mManager.matchProvider ( createTestScanResult ( ) ) ; org.mockito.Mockito.verify ( mAnqpRequestManager ) . requestANQPElements ( org.mockito.Mockito.eq ( com.android.server.wifi.hotspot2.PasspointManagerTest.TEST_BSSID ) , org.mockito.Mockito.any ( com.android.server.wifi.hotspot2.ANQPNetworkKey.class ) , org.mockito.Mockito.anyBoolean ( ) , org.mockito.Mockito.anyBoolean ( ) ) ; org.junit.Assert.assertTrue ( result.isEmpty ( ) ) ; }

Target:
public void matchProviderWithAnqpCacheMissed ( ) throws java.lang.Exception { addTestProvider ( ) ; org.mockito.Mockito.when ( mAnqpCache.getEntry ( com.android.server.wifi.hotspot2.PasspointManagerTest.TEST_ANQP_KEY ) ) . thenReturn ( null ) ; org.junit.Assert.assertNull ( mManager.matchProvider ( createTestScanResult ( ) ) ) ; org.mockito.Mockito.verify ( mAnqpRequestManager ) . requestANQPElements ( org.mockito.Mockito.eq ( com.android.server.wifi.hotspot2.PasspointManagerTest.TEST_BSSID ) , org.mockito.Mockito.any ( com.android.server.wifi.hotspot2.ANQPNetworkKey.class ) , org.mockito.Mockito.anyBoolean ( ) , org.mockito.Mockito.anyBoolean ( ) ) ; }
Source:
protected int computeSerializedSize ( ) { int size = 0 ; int unknownFieldCount = ( ( unknownFieldData ) == null ) ? 0 : unknownFieldData.size ( ) ; for ( int i = 0 ; i < unknownFieldCount ; i ++ ) { com.google.protobuf.nano.UnknownFieldData unknownField = unknownFieldData.get ( i ) ; size += com.google.protobuf.nano.CodedOutputByteBufferNano.computeRawVarint32Size ( unknownField.tag ) ; size += unknownField.bytes.length ; } return size ; }

Target:
protected int computeSerializedSize ( ) { int size = 0 ; if ( ( unknownFieldData ) != null ) { for ( int i = 0 ; i < ( unknownFieldData.size ( ) ) ; i ++ ) { com.google.protobuf.nano.FieldData field = unknownFieldData.dataAt ( i ) ; size += field.computeSerializedSize ( ) ; } } return size ; }
Source:
public int getPhase2Method ( ) { java.lang.String phase2Method = mFields.get ( android.net.wifi.WifiEnterpriseConfig.PHASE2_KEY ) ; return getStringIndex ( android.net.wifi.WifiEnterpriseConfig.Phase2.strings , phase2Method , android.net.wifi.WifiEnterpriseConfig.Phase2.NONE ) ; }

Target:
public int getPhase2Method ( ) { java.lang.String phase2Method = removeDoubleQuotes ( mFields.get ( android.net.wifi.WifiEnterpriseConfig.PHASE2_KEY ) ) ; if ( phase2Method.startsWith ( android.net.wifi.WifiEnterpriseConfig.Phase2.PREFIX ) ) { phase2Method = phase2Method.substring ( android.net.wifi.WifiEnterpriseConfig.Phase2.PREFIX.length ( ) ) ; } return getStringIndex ( android.net.wifi.WifiEnterpriseConfig.Phase2.strings , phase2Method , android.net.wifi.WifiEnterpriseConfig.Phase2.NONE ) ; }
Source:
public void run ( ) { synchronizer.sendMessage ( JPDADebuggeeSynchronizer.SGNL_READY ) ; logWriter.println ( "--> Debuggee: SourceDebugExtensionDebuggee..." ) ; synchronizer.receiveMessage ( JPDADebuggeeSynchronizer.SGNL_CONTINUE ) ; }

Target:
public void run ( ) { java.lang.Class < ? > klass = null ; try { klass = java.lang.Class.forName ( org.apache.harmony.jpda.tests.jdwp.ReferenceType.SourceDebugExtensionDebuggee.classWithSourceDebugExtension ) ; } catch ( java.lang.ClassNotFoundException e ) { logWriter.println ( ( "--> Debuggee: Could not find class " + ( org.apache.harmony.jpda.tests.jdwp.ReferenceType.SourceDebugExtensionDebuggee.classWithSourceDebugExtension ) ) ) ; } synchronizer.sendMessage ( JPDADebuggeeSynchronizer.SGNL_READY ) ; logWriter.println ( "--> Debuggee: SourceDebugExtensionDebuggee..." ) ; synchronizer.receiveMessage ( JPDADebuggeeSynchronizer.SGNL_CONTINUE ) ; }
Source:
private void checkRange ( int index ) { if ( index < 0 ) throw new java.lang.IndexOutOfBoundsException ( ( "index < 0:" + index ) ) ; if ( index >= ( mySize ) ) throw new java.lang.IndexOutOfBoundsException ( ( ( ( "index: " + index ) + " >= mySize: " ) + ( mySize ) ) ) ; }

Target:
private void checkRange ( int index ) { if ( index < 0 ) throw new java.lang.IndexOutOfBoundsException ( ( ( "index is " + index ) + " which is less then zero" ) ) ; if ( index >= ( mySize ) ) throw new java.lang.IndexOutOfBoundsException ( ( ( ( "index is " + index ) + " and set size is " ) + ( mySize ) ) ) ; }
Source:
public void setMsisdnNumber ( java.lang.String alphaTag , java.lang.String number , android.os.Message onComplete ) { msisdn = number ; msisdnTag = alphaTag ; if ( com.android.internal.telephony.uicc.SIMRecords.DBG ) log ( ( ( ( "Set MSISDN: " + ( msisdnTag ) ) + " " ) + "xxxxxxx" ) ) ; com.android.internal.telephony.uicc.AdnRecord adn = new com.android.internal.telephony.uicc.AdnRecord ( msisdnTag , msisdn ) ; new com.android.internal.telephony.uicc.AdnRecordLoader ( mFh ) . updateEF ( adn , com.android.internal.telephony.uicc.EF_MSISDN , com.android.internal.telephony.uicc.EF_EXT1 , 1 , null , obtainMessage ( com.android.internal.telephony.uicc.SIMRecords.EVENT_SET_MSISDN_DONE , onComplete ) ) ; }

Target:
public void dispose ( ) { if ( DBG ) log ( ( "Disposing SIMRecords this=" + ( this ) ) ) ; mCi.unregisterForIccRefresh ( this ) ; mCi.unSetOnSmsOnSim ( this ) ; mParentApp.unregisterForReady ( this ) ; mParentApp.unregisterForLocked ( this ) ; resetRecords ( ) ; super . dispose ( ) ; }
Source:
public void testWriteAndReadBlob ( ) throws java.lang.Exception { com.android.ide.common.res2.ResourceMerger merger = com.android.ide.common.res2.ResourceMergerTest.getResourceMerger ( false ) ; java.io.File folder = com.google.common.io.Files.createTempDir ( ) ; merger.writeBlobTo ( folder , new com.android.ide.common.res2.MergedResourceWriter ( com.google.common.io.Files.createTempDir ( ) , mPngCruncher , false , false , null ) ) ; com.android.ide.common.res2.ResourceMerger loadedMerger = new com.android.ide.common.res2.ResourceMerger ( ) ; assertTrue ( loadedMerger.loadFromBlob ( folder , true ) ) ; }

Target:
public void testWriteAndReadBlob ( ) throws java.lang.Exception { com.android.ide.common.res2.ResourceMerger merger = com.android.ide.common.res2.ResourceMergerTest.getResourceMerger ( false ) ; java.io.File folder = com.google.common.io.Files.createTempDir ( ) ; merger.writeBlobTo ( folder , getConsumer ( ) ) ; com.android.ide.common.res2.ResourceMerger loadedMerger = new com.android.ide.common.res2.ResourceMerger ( ) ; assertTrue ( loadedMerger.loadFromBlob ( folder , true ) ) ; }
Source:
public void setApplicationRestrictions ( @ android.annotation.Nullable android.content.ComponentName admin , java.lang.String packageName , android.os.Bundle settings ) { throwIfParentInstance ( "setApplicationRestrictions" ) ; if ( ( mService ) != null ) { try { mService.setApplicationRestrictions ( admin , packageName , settings ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } } }

Target:
public java.util.List < java.lang.String > getDelegatedScopes ( @ android.annotation.Nullable android.content.ComponentName admin , @ android.annotation.NonNull java.lang.String delegatedPackage ) { throwIfParentInstance ( "getDelegatedScopes" ) ; if ( ( mService ) != null ) { try { return mService.getDelegatedScopes ( admin , delegatedPackage ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } } return null ; }
Source:
protected final java.security.AlgorithmParameters engineGetParameters ( ) { try { java.security.AlgorithmParameters result = java.security.AlgorithmParameters.getInstance ( "PSS" ) ; result.init ( new java.security.spec.PSSParameterSpec ( contentDigestAlgorithm , org.conscrypt.OpenSSLSignature.RSAPSSPadding.MGF1_ALGORITHM_NAME , new java.security.spec.MGF1ParameterSpec ( mgf1DigestAlgorithm ) , saltSizeBytes , org.conscrypt.OpenSSLSignature.RSAPSSPadding.TRAILER_FIELD_BC_ID ) ) ; return result ; } catch ( java.security.NoSuchAlgorithmException | java.security.spec.InvalidParameterSpecException e ) { throw new java.security.ProviderException ( "Failed to create PSS AlgorithmParameters" , e ) ; } }

Target:
protected final java.security.AlgorithmParameters engineGetParameters ( ) { try { java.security.AlgorithmParameters result = java.security.AlgorithmParameters.getInstance ( "PSS" ) ; result.init ( new java.security.spec.PSSParameterSpec ( contentDigestAlgorithm , EvpMdRef.MGF1_ALGORITHM_NAME , new java.security.spec.MGF1ParameterSpec ( mgf1DigestAlgorithm ) , saltSizeBytes , org.conscrypt.OpenSSLSignature.RSAPSSPadding.TRAILER_FIELD_BC_ID ) ) ; return result ; } catch ( java.security.NoSuchAlgorithmException | java.security.spec.InvalidParameterSpecException e ) { throw new java.security.ProviderException ( "Failed to create PSS AlgorithmParameters" , e ) ; } }
Source:
public void reportConnectionFailureIsIgnoredWithoutVerboseMode ( ) { final boolean verbosityToggle = false ; mWifiDiagnostics.startLogging ( verbosityToggle ) ; mWifiDiagnostics.reportConnectionEvent ( WifiDiagnostics.CONNECTION_EVENT_FAILED ) ; org.mockito.Mockito.verify ( mWifiNative ) . getTxPktFates ( org.mockito.Mockito.anyObject ( ) ) ; org.mockito.Mockito.verify ( mWifiNative ) . getRxPktFates ( org.mockito.Mockito.anyObject ( ) ) ; }

Target:
public void reportConnectionFailureIsIgnoredWithoutVerboseMode ( ) { final boolean verbosityToggle = false ; mWifiDiagnostics.startLogging ( verbosityToggle ) ; mWifiDiagnostics.reportConnectionEvent ( com.android.server.wifi.WifiDiagnosticsTest.FAKE_CONNECTION_ID , WifiDiagnostics.CONNECTION_EVENT_FAILED ) ; org.mockito.Mockito.verify ( mWifiNative ) . getTxPktFates ( org.mockito.Mockito.anyObject ( ) ) ; org.mockito.Mockito.verify ( mWifiNative ) . getRxPktFates ( org.mockito.Mockito.anyObject ( ) ) ; }
Source:
public static java.lang.String getPackageVersionName ( android.content.Context context ) { java.lang.String msg = "versionName not available" ; try { android.content.pm.PackageManager pm = context.getPackageManager ( ) ; android.content.pm.PackageInfo pi = pm.getPackageInfo ( context.getPackageName ( ) , 0 ) ; msg = "" ; if ( ( pi.versionName ) != null ) { msg = pi.versionName ; } } catch ( android.content.pm.PackageManager.NameNotFoundException e ) { android.util.Log.d ( org.chromium.base.BuildInfo.TAG , msg ) ; } return msg ; }

Target:
public static java.lang.String getPackageVersionName ( android.content.Context context ) { java.lang.String msg = "versionName not available" ; try { android.content.pm.PackageManager pm = context.getPackageManager ( ) ; android.content.pm.PackageInfo pi = pm.getPackageInfo ( context.getPackageName ( ) , 0 ) ; msg = "" ; if ( ( pi.versionName ) != null ) { msg = pi.versionName ; } } catch ( android.content.pm.PackageManager.NameNotFoundException e ) { org.chromium.base.Log.d ( org.chromium.base.BuildInfo.TAG , msg ) ; } return msg ; }
Source:
public boolean isInboundDone ( ) { if ( ( sslNativePointer ) == 0 ) { synchronized ( stateLock ) { return ( ( engineState ) == ( org.conscrypt.OpenSSLEngineImpl.EngineState.CLOSED ) ) || ( ( engineState ) == ( org.conscrypt.OpenSSLEngineImpl.EngineState.CLOSED_INBOUND ) ) ; } } return ( ( org.conscrypt.NativeCrypto.SSL_get_shutdown ( sslNativePointer ) ) & ( NativeConstants.SSL_RECEIVED_SHUTDOWN ) ) != 0 ; }

Target:
public boolean isOutboundDone ( ) { if ( ( sslNativePointer ) == 0 ) { synchronized ( stateLock ) { return ( ( engineState ) == ( org.conscrypt.OpenSSLEngineImpl.EngineState.CLOSED ) ) || ( ( engineState ) == ( org.conscrypt.OpenSSLEngineImpl.EngineState.CLOSED_OUTBOUND ) ) ; } } return ( ( org.conscrypt.NativeCrypto.SSL_get_shutdown ( sslNativePointer ) ) & ( org.conscrypt.NativeConstants.SSL_SENT_SHUTDOWN ) ) != 0 ; }
Source:
public static long sendfile ( java.io.FileDescriptor outFd , java.io.FileDescriptor inFd , android.system.Int64Ref inOffset , long byteCount ) throws android.system.ErrnoException { if ( inOffset == null ) { return Libcore.os.sendfile ( outFd , inFd , null , byteCount ) ; } else { android.util.MutableLong internalInOffset = new android.util.MutableLong ( inOffset.value ) ; try { return Libcore.os.sendfile ( outFd , inFd , internalInOffset , byteCount ) ; } finally { inOffset.value = internalInOffset.value ; } } }

Target:
public static long sendfile ( java.io.FileDescriptor outFd , java.io.FileDescriptor inFd , android.system.Int64Ref inOffset , long byteCount ) throws android.system.ErrnoException { if ( inOffset == null ) { return Libcore.os.sendfile ( outFd , inFd , null , byteCount ) ; } else { android.system.MutableLong internalInOffset = new android.system.MutableLong ( inOffset.value ) ; try { return Libcore.os.sendfile ( outFd , inFd , internalInOffset , byteCount ) ; } finally { inOffset.value = internalInOffset.value ; } } }
Source:
private static void assertRedirectErrorStream ( boolean doRedirect , java.lang.String expectedOut , java.lang.String expectedErr ) throws java.lang.Exception { java.lang.ProcessBuilder pb = new java.lang.ProcessBuilder ( libcore.java.lang.ProcessBuilderTest.shell ( ) , "-c" , "echo out; echo err 1>&2" ) ; pb.redirectErrorStream ( doRedirect ) ; tests.support.Support_Exec.execAndCheckOutput ( pb , expectedOut , expectedErr ) ; }

Target:
private static void assertRedirectErrorStream ( boolean doRedirect , java.lang.String expectedOut , java.lang.String expectedErr ) throws java.lang.Exception { java.lang.ProcessBuilder pb = new java.lang.ProcessBuilder ( libcore.java.lang.ProcessBuilderTest.shell ( ) , "-c" , "echo out; echo err 1>&2" ) ; pb.redirectErrorStream ( doRedirect ) ; libcore.java.lang.ProcessBuilderTest.checkProcessExecution ( pb , libcore.java.lang.ProcessBuilderTest.ResultCodes.ZERO , "" , expectedOut , expectedErr ) ; }
Source:
protected java.util.List < com.android.tv.dvr.ScheduledRecording > getRecordingsWithState ( int ... states ) { java.util.ArrayList < com.android.tv.dvr.ScheduledRecording > result = new java.util.ArrayList < > ( ) ; for ( com.android.tv.dvr.ScheduledRecording r : mScheduledRecordings.values ( ) ) { for ( int state : states ) { if ( ( r.getState ( ) ) == state ) { result.add ( r ) ; break ; } } } return result ; }

Target:
protected java.util.List < com.android.tv.dvr.data.ScheduledRecording > getRecordingsWithState ( int ... states ) { java.util.ArrayList < com.android.tv.dvr.data.ScheduledRecording > result = new java.util.ArrayList < > ( ) ; for ( com.android.tv.dvr.data.ScheduledRecording r : mScheduledRecordings.values ( ) ) { for ( int state : states ) { if ( ( r.getState ( ) ) == state ) { result.add ( r ) ; break ; } } } return result ; }
Source:
native void rsnAllocationElementData1D ( long con , long id , int xoff , int mip , int compIdx , byte [ ] d , int sizeBytes ) ;

Target:
synchronized void nAllocationElementData ( long id , int xoff , int yoff , int zoff , int mip , int compIdx , byte [ ] d , int sizeBytes ) { validate ( ) ; rsnAllocationElementData ( mContext , id , xoff , yoff , zoff , mip , compIdx , d , sizeBytes ) ; }
Source:
private void unregisterUiccCardEvents ( ) { if ( ( mUiccCard ) != null ) mUiccCard.unregisterForCarrierPrivilegeRulesLoaded ( this ) ; if ( ( mUiccApplication ) != null ) { mUiccApplication.unregisterForReady ( this ) ; } if ( ( mIccRecords ) != null ) { mIccRecords.unregisterForRecordsLoaded ( this ) ; mIccRecords.unregisterForLockedRecordsLoaded ( this ) ; mIccRecords.unregisterForNetworkLockedRecordsLoaded ( this ) ; mIccRecords.unregisterForRecordsEvents ( this ) ; } }

Target:
private boolean areAllApplicationsReady ( ) { for ( com.android.internal.telephony.uicc.UiccCardApplication app : mUiccApplications ) { if ( ( ( app != null ) && ( isSupportedApplication ( app ) ) ) && ( ! ( app.isReady ( ) ) ) ) { return false ; } } return ( mUiccApplications [ 0 ] ) != null ; }
Source:
public void writeNodes ( @ javax.annotation.Nonnull java.util.List < ? extends com.android.jack.jayce.v0002.NNode > list ) throws java.io.IOException { writeOpen ( ) ; writeTrimmedInt ( list.size ( ) ) ; for ( java.util.Iterator < ? extends com.android.jack.jayce.v0002.NNode > iterator = list.iterator ( ) ; iterator.hasNext ( ) ; ) { writeNode ( iterator.next ( ) ) ; } writeClose ( ) ; }

Target:
public void writeNodes ( @ javax.annotation.Nonnull java.util.Collection < ? extends com.android.jack.jayce.v0002.NNode > nodes ) throws java.io.IOException { writeOpen ( ) ; writeTrimmedInt ( nodes.size ( ) ) ; for ( java.util.Iterator < ? extends com.android.jack.jayce.v0002.NNode > iterator = nodes.iterator ( ) ; iterator.hasNext ( ) ; ) { writeNode ( iterator.next ( ) ) ; } writeClose ( ) ; }
Source:
public java.lang.String createNetworkSpecifier ( @ android.net.wifi.aware.WifiAwareManager.DataPathRole int role , @ android.annotation.Nullable android.net.wifi.aware.WifiAwareManager.PeerHandle peerHandle , @ android.annotation.Nullable byte [ ] token ) { if ( mTerminated ) { android.util.Log.w ( android.net.wifi.aware.WifiAwareDiscoveryBaseSession.TAG , "createNetworkSpecifier: called on terminated session" ) ; return null ; } else { android.net.wifi.aware.WifiAwareManager mgr = mMgr.get ( ) ; if ( mgr == null ) { android.util.Log.w ( android.net.wifi.aware.WifiAwareDiscoveryBaseSession.TAG , "createNetworkSpecifier: called post GC on WifiAwareManager" ) ; return null ; } return mgr.createNetworkSpecifier ( mClientId , role , mSessionId , peerHandle , token ) ; } }

Target:
public java.lang.String createNetworkSpecifier ( @ android.annotation.Nullable android.net.wifi.aware.WifiAwareManager.PeerHandle peerHandle , @ android.annotation.Nullable byte [ ] token ) { if ( mTerminated ) { android.util.Log.w ( android.net.wifi.aware.WifiAwareDiscoveryBaseSession.TAG , "createNetworkSpecifier: called on terminated session" ) ; return null ; } else { android.net.wifi.aware.WifiAwareManager mgr = mMgr.get ( ) ; if ( mgr == null ) { android.util.Log.w ( android.net.wifi.aware.WifiAwareDiscoveryBaseSession.TAG , "createNetworkSpecifier: called post GC on WifiAwareManager" ) ; return null ; } int role = ( ( this ) instanceof android.net.wifi.aware.WifiAwareSubscribeDiscoverySession ) ? WifiAwareManager.WIFI_AWARE_DATA_PATH_ROLE_INITIATOR : WifiAwareManager.WIFI_AWARE_DATA_PATH_ROLE_RESPONDER ; return mgr.createNetworkSpecifier ( mClientId , role , mSessionId , peerHandle , token ) ; } }
Source:
public void onServiceConnected ( int profile , android.bluetooth.BluetoothProfile proxy ) { if ( com.android.tv.settings.accessories.BluetoothInputDeviceConnector.DEBUG ) { android.util.Log.d ( com.android.tv.settings.accessories.BluetoothInputDeviceConnector.TAG , "Connection made to bluetooth proxy." ) ; } mInputProxy = ( ( android.bluetooth.BluetoothInputDevice ) ( proxy ) ) ; if ( ( mTarget ) != null ) { registerInputMethodMonitor ( ) ; if ( com.android.tv.settings.accessories.BluetoothInputDeviceConnector.DEBUG ) { android.util.Log.d ( com.android.tv.settings.accessories.BluetoothInputDeviceConnector.TAG , ( "Connecting to target: " + ( mTarget.getAddress ( ) ) ) ) ; } mInputProxy.connect ( mTarget ) ; mInputProxy.setPriority ( mTarget , BluetoothProfile.PRIORITY_AUTO_CONNECT ) ; } }

Target:
public void onServiceConnected ( int profile , android.bluetooth.BluetoothProfile proxy ) { if ( com.android.tv.settings.accessories.BluetoothInputDeviceConnector.DEBUG ) { android.util.Log.d ( com.android.tv.settings.accessories.BluetoothInputDeviceConnector.TAG , "Connection made to bluetooth proxy." ) ; } mInputProxy = ( ( android.bluetooth.BluetoothHidHost ) ( proxy ) ) ; if ( ( mTarget ) != null ) { registerInputMethodMonitor ( ) ; if ( com.android.tv.settings.accessories.BluetoothInputDeviceConnector.DEBUG ) { android.util.Log.d ( com.android.tv.settings.accessories.BluetoothInputDeviceConnector.TAG , ( "Connecting to target: " + ( mTarget.getAddress ( ) ) ) ) ; } mInputProxy.connect ( mTarget ) ; mInputProxy.setPriority ( mTarget , BluetoothProfile.PRIORITY_AUTO_CONNECT ) ; } }
Source:
public boolean shouldRun ( org.junit.runner.Description description ) { if ( description.isTest ( ) ) { return ( ( description.getAnnotation ( mAnnotationClass ) ) != null ) || ( description.getTestClass ( ) . isAnnotationPresent ( mAnnotationClass ) ) ; } else { return true ; } }

Target:
public boolean shouldRun ( org.junit.runner.Description description ) { if ( description.isTest ( ) ) { return ( ( description.getAnnotation ( mAnnotationClass ) ) != null ) || ( description.getTestClass ( ) . isAnnotationPresent ( mAnnotationClass ) ) ; } else { for ( org.junit.runner.Description child : description.getChildren ( ) ) { if ( shouldRun ( child ) ) { return true ; } } return false ; } }
Source:
private int findAttribute ( int attributesCount , proguard.classfile.editor.Attribute [ ] attributes , java.lang.String attributeName ) { for ( int index = 0 ; index < attributesCount ; index ++ ) { if ( attributes [ index ] . getAttributeName ( targetClass ) . equals ( attributeName ) ) { return index ; } } return - 1 ; }

Target:
private int findAttributeIndex ( int attributesCount , proguard.classfile.editor.Attribute [ ] attributes , java.lang.String attributeName ) { for ( int index = 0 ; index < attributesCount ; index ++ ) { proguard.classfile.editor.Attribute attribute = attributes [ index ] ; if ( attribute.getAttributeName ( targetClass ) . equals ( attributeName ) ) { return index ; } } return - 1 ; }
Source:
public boolean requestChildRectangleOnScreen ( final android.view.View child , final android.graphics.Rect rect , final boolean immediate ) { mFactory.startYourEngines ( false ) ; if ( checkNeedsPost ( ) ) { boolean ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean call ( ) { return requestChildRectangleOnScreen ( child , rect , immediate ) ; } } ) ; return ret ; } return mAwContents.requestChildRectangleOnScreen ( child , rect , immediate ) ; }

Target:
public int computeHorizontalScrollRange ( ) { mFactory.startYourEngines ( false ) ; if ( checkNeedsPost ( ) ) { int ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < java.lang.Integer > ( ) { @ java.lang.Override public java.lang.Integer call ( ) { return computeHorizontalScrollRange ( ) ; } } ) ; return ret ; } return mAwContents.computeHorizontalScrollRange ( ) ; }
Source:
public final int startActivity ( android.app.IApplicationThread caller , android.content.Intent intent , java.lang.String resolvedType , android.net.Uri [ ] grantedUriPermissions , int grantedMode , android.os.IBinder resultTo , java.lang.String resultWho , int requestCode , boolean onlyIfNeeded , boolean debug ) { return startActivityMayWait ( caller , intent , resolvedType , grantedUriPermissions , grantedMode , resultTo , resultWho , requestCode , onlyIfNeeded , debug , null , null ) ; }

Target:
void grantUriPermissionFromIntentLocked ( int callingUid , java.lang.String targetPkg , android.content.Intent intent , com.android.server.am.UriPermissionOwner owner ) { int targetUid = checkGrantUriPermissionFromIntentLocked ( callingUid , targetPkg , intent ) ; if ( targetUid < 0 ) { return ; } grantUriPermissionUncheckedFromIntentLocked ( targetUid , targetPkg , intent , owner ) ; }
Source:
public void sendRttModifyRequest ( ) { logi ( "sendRttModifyRequest" ) ; synchronized ( mLockObj ) { if ( ( mSession ) == null ) { loge ( "sendRttModifyRequest::no session" ) ; } if ( mCallProfile.mMediaProfile.isRttCall ( ) ) { logi ( "sendRttModifyRequest::Already RTT call, ignoring." ) ; return ; } android.os.Parcel p = android.os.Parcel.obtain ( ) ; mCallProfile.writeToParcel ( p , 0 ) ; com.android.ims.ImsCallProfile requestedProfile = new com.android.ims.ImsCallProfile ( p ) ; requestedProfile.mMediaProfile.setRttMode ( ImsStreamMediaProfile.RTT_MODE_FULL ) ; mSession.sendRttModifyRequest ( requestedProfile ) ; } }

Target:
public void sendRttModifyRequest ( ) { logi ( "sendRttModifyRequest" ) ; synchronized ( mLockObj ) { if ( ( mSession ) == null ) { loge ( "sendRttModifyRequest::no session" ) ; } if ( mCallProfile.mMediaProfile.isRttCall ( ) ) { logi ( "sendRttModifyRequest::Already RTT call, ignoring." ) ; return ; } android.os.Parcel p = android.os.Parcel.obtain ( ) ; mCallProfile.writeToParcel ( p , 0 ) ; android.telephony.ims.ImsCallProfile requestedProfile = new android.telephony.ims.ImsCallProfile ( p ) ; requestedProfile.mMediaProfile.setRttMode ( ImsStreamMediaProfile.RTT_MODE_FULL ) ; mSession.sendRttModifyRequest ( requestedProfile ) ; } }
Source:
protected void applyMutation ( dexfuzz.program.Mutation uncastMutation ) { dexfuzz.program.mutators.InvokeChanger.AssociatedMutation mutation = ( ( dexfuzz.program.mutators.InvokeChanger.AssociatedMutation ) ( uncastMutation ) ) ; dexfuzz.program.MutatableCode mutatableCode = mutation.mutatableCode ; generateCachedinvokeCallInsns ( mutatableCode ) ; dexfuzz.program.MInsn invokeInsn = invokeCallInsns.get ( mutation.invokeCallInsnIdx ) ; java.lang.String oldInsnString = invokeInsn.toString ( ) ; dexfuzz.rawdex.Opcode newOpcode = isInvokeCalIInst ( invokeInsn ) ; invokeInsn.insn.info = dexfuzz.rawdex.Instruction.getOpcodeInfo ( newOpcode ) ; dexfuzz.Log.info ( ( ( ( "Changed " + oldInsnString ) + " to " ) + invokeInsn ) ) ; stats.incrementStat ( "Changed invoke call instruction" ) ; invokeCallInsns = null ; }

Target:
protected void applyMutation ( dexfuzz.program.Mutation uncastMutation ) { dexfuzz.program.mutators.InvokeChanger.AssociatedMutation mutation = ( ( dexfuzz.program.mutators.InvokeChanger.AssociatedMutation ) ( uncastMutation ) ) ; dexfuzz.program.MutatableCode mutatableCode = mutation.mutatableCode ; generateCachedinvokeCallInsns ( mutatableCode ) ; dexfuzz.program.MInsn invokeInsn = invokeCallInsns.get ( mutation.invokeCallInsnIdx ) ; java.lang.String oldInsnString = invokeInsn.toString ( ) ; dexfuzz.rawdex.Opcode newOpcode = getDifferentInvokeCallOpcode ( invokeInsn ) ; invokeInsn.insn.info = dexfuzz.rawdex.Instruction.getOpcodeInfo ( newOpcode ) ; dexfuzz.Log.info ( ( ( ( "Changed " + oldInsnString ) + " to " ) + invokeInsn ) ) ; stats.incrementStat ( "Changed invoke call instruction" ) ; invokeCallInsns = null ; }
Source:
public void iccOpenLogicalChannel ( java.lang.String AID , android.os.Message response ) { loglocal ( ( ( ( ( ( "Open Logical Channel: " + AID ) + " by pid:" ) + ( android.os.Binder.getCallingPid ( ) ) ) + " uid:" ) + ( android.os.Binder.getCallingUid ( ) ) ) ) ; mCi.iccOpenLogicalChannel ( AID , mHandler.obtainMessage ( com.android.internal.telephony.uicc.UiccCard.EVENT_OPEN_LOGICAL_CHANNEL_DONE , response ) ) ; }

Target:
public void iccOpenLogicalChannel ( java.lang.String AID , int p2 , android.os.Message response ) { loglocal ( ( ( ( ( ( ( ( "Open Logical Channel: " + AID ) + " , " ) + p2 ) + " by pid:" ) + ( android.os.Binder.getCallingPid ( ) ) ) + " uid:" ) + ( android.os.Binder.getCallingUid ( ) ) ) ) ; mCi.iccOpenLogicalChannel ( AID , p2 , mHandler.obtainMessage ( com.android.internal.telephony.uicc.UiccCard.EVENT_OPEN_LOGICAL_CHANNEL_DONE , response ) ) ; }
Source:
public void incrementRssiPollRssiCount ( int rssi ) { if ( ! ( ( rssi >= ( com.android.server.wifi.WifiMetrics.MIN_RSSI_POLL ) ) && ( rssi <= ( com.android.server.wifi.WifiMetrics.MAX_RSSI_POLL ) ) ) ) { return ; } synchronized ( mLock ) { int count = mRssiPollCounts.get ( rssi ) ; mRssiPollCounts.put ( rssi , ( count + 1 ) ) ; } }

Target:
public void incrementRssiPollRssiCount ( int rssi ) { if ( ! ( ( rssi >= ( com.android.server.wifi.WifiMetrics.MIN_RSSI_POLL ) ) && ( rssi <= ( com.android.server.wifi.WifiMetrics.MAX_RSSI_POLL ) ) ) ) { return ; } synchronized ( mLock ) { int count = mRssiPollCounts.get ( rssi ) ; mRssiPollCounts.put ( rssi , ( count + 1 ) ) ; maybeIncrementRssiDeltaCount ( ( rssi - ( mScanResultRssi ) ) ) ; } }
Source:
public void serializeString ( ) throws java.lang.Exception { java.io.ByteArrayOutputStream baos = new java.io.ByteArrayOutputStream ( ) ; com.android.volley.toolbox.DiskBasedCache.writeString ( baos , "" ) ; com.android.volley.toolbox.DiskBasedCache.writeString ( baos , "This is a string." ) ; com.android.volley.toolbox.DiskBasedCache.writeString ( baos , "ファイカス" ) ; java.io.ByteArrayInputStream bais = new java.io.ByteArrayInputStream ( baos.toByteArray ( ) ) ; assertEquals ( com.android.volley.toolbox.DiskBasedCache.readString ( bais ) , "" ) ; assertEquals ( com.android.volley.toolbox.DiskBasedCache.readString ( bais ) , "This is a string." ) ; assertEquals ( com.android.volley.toolbox.DiskBasedCache.readString ( bais ) , "ファイカス" ) ; }

Target:
public void testInvalidate ( ) { com.android.volley.Cache.Entry entry = randomData ( 32 ) ; entry.softTtl = 8765432L ; entry.ttl = 9876543L ; cache.put ( "key" , entry ) ; cache.invalidate ( "key" , false ) ; entry.softTtl = 0 ; assertThatEntriesAreEqual ( cache.get ( "key" ) , entry ) ; }
Source:
public org.apache.harmony.security.x509.Extension getExtensionByOID ( java.lang.String oid ) { if ( ( extensions ) == null ) { return null ; } java.util.HashMap < java.lang.String , org.apache.harmony.security.x509.Extension > localOidMap = oidMap ; if ( localOidMap == null ) { localOidMap = new java.util.HashMap < java.lang.String , org.apache.harmony.security.x509.Extension > ( ) ; for ( org.apache.harmony.security.x509.Extension extension : extensions ) { localOidMap.put ( extension.getExtnID ( ) , extension ) ; } this . oidMap = localOidMap ; } return localOidMap.get ( oid ) ; }

Target:
public org.apache.harmony.security.x509.Extension getExtensionByOID ( java.lang.String oid ) { if ( ( extensions ) == null ) { return null ; } java.util.HashMap < java.lang.String , org.apache.harmony.security.x509.Extension > localOidMap = oidMap ; if ( localOidMap == null ) { localOidMap = new java.util.HashMap < java.lang.String , org.apache.harmony.security.x509.Extension > ( ) ; for ( org.apache.harmony.security.x509.Extension extension : extensions ) { localOidMap.put ( extension.getId ( ) , extension ) ; } this . oidMap = localOidMap ; } return localOidMap.get ( oid ) ; }
Source:
public void enableLocationUpdates ( ) { enableLocationUpdates ( android.telephony.TelephonyManager.getDefaultSubscription ( ) ) ; }

Target:
public java.lang.String getMeid ( int slotIndex ) { com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony == null ) return null ; try { return telephony.getMeidForSlot ( slotIndex , getOpPackageName ( ) ) ; } catch ( android.os.RemoteException ex ) { return null ; } catch ( java.lang.NullPointerException ex ) { return null ; } }
Source:
private java.lang.Iterable < java.lang.String > getTargetFlags ( ) { ndkHandler.getDefaultGccToolchainPath ( com.android.build.gradle.internal.core.Abi.getByName ( platform.name ) , "-target" , com.android.build.gradle.ndk.internal.ClangNativeToolSpecification.TARGET_TRIPLE [ platform.name ] ) ; }

Target:
private java.lang.Iterable < java.lang.String > getTargetFlags ( ) { return com.google.common.collect.ImmutableList.of ( "-gcc-toolchain" , ndkHandler.getDefaultGccToolchainPath ( com.android.build.gradle.internal.core.Abi.getByName ( platform.getName ( ) ) ) . toString ( ) , "-target" , com.android.build.gradle.ndk.internal.ClangNativeToolSpecification.TARGET_TRIPLE.get ( platform.getName ( ) ) ) ; }
Source:
public void test_getId ( ) { byte [ ] id = clientSession.getId ( ) ; javax.net.ssl.SSLSession sess = clientSslContext.getClientSessionContext ( ) . getSession ( id ) ; assertNotNull ( ( "Could not find session for id " + id ) , sess ) ; assertEquals ( clientSession , sess ) ; }

Target:
public void test_getId ( ) throws java.lang.Exception { byte [ ] id = clientSession.getId ( ) ; javax.net.ssl.SSLSession sess = clientSslContext.getClientSessionContext ( ) . getSession ( id ) ; assertNotNull ( ( "Could not find session for id " + id ) , sess ) ; if ( ( clientSession ) instanceof javax.net.ssl.ExtendedSSLSession ) { assertTrue ( ( sess instanceof javax.net.ssl.ExtendedSSLSession ) ) ; org.apache.harmony.tests.javax.net.ssl.SSLSessionTest.assertExtendedSSLSessionsEqual ( ( ( javax.net.ssl.ExtendedSSLSession ) ( clientSession ) ) , ( ( javax.net.ssl.ExtendedSSLSession ) ( sess ) ) ) ; } else { org.apache.harmony.tests.javax.net.ssl.SSLSessionTest.assertSSLSessionsEqual ( clientSession , sess ) ; } }
Source:
public void testQueryCapabilityConfiguration ( ) throws java.lang.Exception { mFeature.queryConfigurationResult = true ; mFeatureBinder.queryCapabilityConfiguration ( android.telephony.ims.internal.MmTelFeatureTests.TEST_CAPABILITY , android.telephony.ims.internal.MmTelFeatureTests.TEST_RADIO_TECH , mCapabilityCallback ) ; org.mockito.Mockito.verify ( mCapabilityCallback ) . onQueryCapabilityConfiguration ( org.mockito.ArgumentMatchers.eq ( android.telephony.ims.internal.MmTelFeatureTests.TEST_CAPABILITY ) , org.mockito.ArgumentMatchers.eq ( android.telephony.ims.internal.MmTelFeatureTests.TEST_RADIO_TECH ) , org.mockito.ArgumentMatchers.eq ( true ) ) ; }

Target:
public void testQueryCapabilityConfiguration ( ) throws java.lang.Exception { mFeature.queryConfigurationResult = true ; mFeatureBinder.queryCapabilityConfiguration ( android.telephony.ims.MmTelFeatureTests.TEST_CAPABILITY , android.telephony.ims.MmTelFeatureTests.TEST_RADIO_TECH , mCapabilityCallback ) ; org.mockito.Mockito.verify ( mCapabilityCallback ) . onQueryCapabilityConfiguration ( org.mockito.ArgumentMatchers.eq ( android.telephony.ims.MmTelFeatureTests.TEST_CAPABILITY ) , org.mockito.ArgumentMatchers.eq ( android.telephony.ims.MmTelFeatureTests.TEST_RADIO_TECH ) , org.mockito.ArgumentMatchers.eq ( true ) ) ; }
Source:
public void run ( ) { android.renderscript.RenderScript pRS = android.renderscript.RenderScript.create ( mCtx ) ; com.android.rs.unittest.ScriptC_copy_test s = new com.android.rs.unittest.ScriptC_copy_test ( pRS ) ; pRS.setMessageHandler ( mRsMessage ) ; testFloat2 ( pRS , s ) ; testFloat3 ( pRS , s ) ; testFloat4 ( pRS , s ) ; s.invoke_sendResult ( true ) ; pRS.finish ( ) ; s.destroy ( ) ; pRS.destroy ( ) ; }

Target:
public void run ( ) { android.renderscript.RenderScript pRS = createRenderScript ( true ) ; com.android.rs.unittest.ScriptC_copy_test s = new com.android.rs.unittest.ScriptC_copy_test ( pRS ) ; testFloat2 ( pRS , s ) ; testFloat3 ( pRS , s ) ; testFloat4 ( pRS , s ) ; s.invoke_sendResult ( true ) ; pRS.finish ( ) ; s.destroy ( ) ; pRS.destroy ( ) ; }
Source:
public void testCreateSession ( ) throws java.lang.Exception { java.lang.String tag = "test session" ; android.media.session.MediaSession session = new android.media.session.MediaSession ( getContext ( ) , tag ) ; assertNotNull ( session.getSessionToken ( ) ) ; assertFalse ( "New session should not be active" , session.isActive ( ) ) ; android.media.session.MediaController controller = session.getController ( ) ; assertNotNull ( controller ) ; verifyNewSession ( controller , tag ) ; }

Target:
public void testCreateSession ( ) throws java.lang.Exception { assertNotNull ( mSession.getSessionToken ( ) ) ; assertFalse ( "New session should not be active" , mSession.isActive ( ) ) ; android.media.session.MediaController controller = mSession.getController ( ) ; assertNotNull ( controller ) ; verifyNewSession ( controller , android.media.cts.MediaSessionTest.TEST_SESSION_TAG ) ; }
Source:
public void testInstall_withMissingBundleVersionFile ( ) throws java.lang.Exception { libcore.tzdata.update2.TimeZoneBundle bundle = libcore.tzdata.update2.TimeZoneBundleInstallerTest.createValidTimeZoneBundleBuilder ( libcore.tzdata.update2.TimeZoneBundleInstallerTest.NEW_RULES_VERSION , "001" ) . clearVersionForTests ( ) . buildUnvalidated ( ) ; assertFalse ( installer.install ( bundle.getBytes ( ) ) ) ; assertNoContentInstalled ( ) ; }

Target:
public void testInstall_withBadlyFormedRulesVersion ( ) throws java.lang.Exception { libcore.tzdata.update2.BundleVersion validBundleVersion = new libcore.tzdata.update2.BundleVersion ( 1 , 1 , libcore.tzdata.update2.TimeZoneBundleInstallerTest.NEW_RULES_VERSION , 1 ) ; byte [ ] invalidRulesVersionBytes = validBundleVersion.toBytes ( ) ; invalidRulesVersionBytes [ ( ( invalidRulesVersionBytes.length ) - 6 ) ] = 'B' ; libcore.tzdata.update2.TimeZoneBundle bundle = libcore.tzdata.update2.TimeZoneBundleInstallerTest.createTimeZoneBundleWithVersionBytes ( invalidRulesVersionBytes ) ; assertEquals ( TimeZoneBundleInstaller.INSTALL_FAIL_BAD_BUNDLE_STRUCTURE , installer.installWithErrorCode ( bundle.getBytes ( ) ) ) ; assertNoContentInstalled ( ) ; }
Source:
public boolean canGoBack ( ) { 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 canGoBack ( ) ; } } ) ; return ret ; } return mAwContents.canGoBack ( ) ; }

Target:
public boolean canGoBackOrForward ( final int steps ) { 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 canGoBackOrForward ( steps ) ; } } ) ; return ret ; } return mAwContents.canGoBackOrForward ( steps ) ; }
Source:
public static java.lang.String getAdbLocation ( ) { org.eclipse.jface.preference.IPreferenceStore store = com.android.ide.eclipse.pdt.PdtPlugin.sPlugin.getPreferenceStore ( ) ; java.lang.String devTree = store.getString ( PrefPage.PREFS_DEVTREE_DIR ) ; if ( ( devTree.length ( ) ) == 0 ) { devTree = java.lang.System.getenv ( "ANDROID_BUILD_TOP" ) ; } if ( ( devTree != null ) && ( ( devTree.length ( ) ) > 0 ) ) { return ( ( devTree + "/out/host/" ) + ( com.android.ide.eclipse.pdt.PdtPlugin.currentPlatform ( ) ) ) + "/bin/adb" ; } return null ; }

Target:
public static java.lang.String getAdbLocation ( ) { java.lang.String devTree = com.android.ide.eclipse.pdt.PdtPlugin.getDevTree ( ) ; if ( ( devTree != null ) && ( ( devTree.length ( ) ) > 0 ) ) { return ( ( devTree + "/out/host/" ) + ( com.android.ide.eclipse.pdt.PdtPlugin.currentPlatform ( ) ) ) + "/bin/adb" ; } return null ; }
Source:
public void setRingerMode ( int ringerMode ) { if ( ! ( android.media.AudioManager.isValidRingerMode ( ringerMode ) ) ) { return ; } android.media.IAudioService service = android.media.AudioManager.getService ( ) ; try { service.setRingerModeExternal ( ringerMode , mApplicationContext.getOpPackageName ( ) ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.media.AudioManager.TAG , "Dead object in setRingerMode" , e ) ; } }

Target:
public void setRingerMode ( int ringerMode ) { if ( ! ( android.media.AudioManager.isValidRingerMode ( ringerMode ) ) ) { return ; } android.media.IAudioService service = android.media.AudioManager.getService ( ) ; try { service.setRingerModeExternal ( ringerMode , getContext ( ) . getOpPackageName ( ) ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.media.AudioManager.TAG , "Dead object in setRingerMode" , e ) ; } }
Source:
public boolean setPriority ( android.bluetooth.BluetoothDevice device , int priority ) { enforceCallingOrSelfPermission ( com.android.bluetooth.hfp.BLUETOOTH_ADMIN_PERM , "Need BLUETOOTH_ADMIN permission" ) ; Settings.Global.putInt ( getContentResolver ( ) , Settings.Global.getBluetoothHeadsetPriorityKey ( device.getAddress ( ) ) , priority ) ; if ( com.android.bluetooth.hfp.HeadsetService.DBG ) { android.util.Log.d ( com.android.bluetooth.hfp.HeadsetService.TAG , ( ( ( "Saved priority " + device ) + " = " ) + priority ) ) ; } return true ; }

Target:
public static synchronized com.android.bluetooth.hfp.HeadsetService getHeadsetService ( ) { if ( ( com.android.bluetooth.hfp.HeadsetService.sHeadsetService ) == null ) { android.util.Log.w ( com.android.bluetooth.hfp.HeadsetService.TAG , "getHeadsetService(): service is NULL" ) ; return null ; } if ( ! ( com.android.bluetooth.hfp.HeadsetService.sHeadsetService.isAvailable ( ) ) ) { android.util.Log.w ( com.android.bluetooth.hfp.HeadsetService.TAG , "getHeadsetService(): service is not available" ) ; return null ; } com.android.bluetooth.hfp.HeadsetService.logD ( ( "getHeadsetService(): returning " + ( com.android.bluetooth.hfp.HeadsetService.sHeadsetService ) ) ) ; return com.android.bluetooth.hfp.HeadsetService.sHeadsetService ; }
Source:
private void compileJava7Test ( @ javax.annotation.Nonnull java.lang.String name ) throws java.lang.Exception { com.android.jack.test.toolchain.JackBasedToolchain jackBasedToolchain = com.android.jack.test.toolchain.AbstractTestTools.getCandidateToolchain ( com.android.jack.test.toolchain.JackBasedToolchain.class ) ; jackBasedToolchain.setSourceLevel ( SourceLevel.JAVA_7 ) . srcToExe ( com.android.jack.test.toolchain.AbstractTestTools.getClasspathAsString ( jackBasedToolchain.getDefaultBootClasspath ( ) ) , com.android.jack.test.toolchain.AbstractTestTools.createTempDir ( ) , false , new java.io.File ( com.android.jack.test.toolchain.AbstractTestTools.getTestRootDir ( ( "com.android.jack.java7.exceptions." + name ) ) , "jack" ) ) ; }

Target:
private void compileJava7Test ( @ javax.annotation.Nonnull java.lang.String name ) throws java.lang.Exception { com.android.jack.test.toolchain.JackBasedToolchain jackBasedToolchain = com.android.jack.test.toolchain.AbstractTestTools.getCandidateToolchain ( com.android.jack.test.toolchain.JackBasedToolchain.class ) ; jackBasedToolchain.setSourceLevel ( SourceLevel.JAVA_7 ) . addToClasspath ( jackBasedToolchain.getDefaultBootClasspath ( ) ) . srcToExe ( com.android.jack.test.toolchain.AbstractTestTools.createTempDir ( ) , false , new java.io.File ( com.android.jack.test.toolchain.AbstractTestTools.getTestRootDir ( ( "com.android.jack.java7.exceptions." + name ) ) , "jack" ) ) ; }
Source:
public void moveAb ( java.lang.String apkPath , java.lang.String instructionSet , java.lang.String outputPath ) throws com.android.internal.os.InstallerConnection.InstallerException { if ( ! ( checkBeforeRemote ( ) ) ) return ; try { mInstalld.moveAb ( apkPath , instructionSet , outputPath ) ; } catch ( android.os.RemoteException | android.os.ServiceSpecificException e ) { throw new com.android.internal.os.InstallerConnection.InstallerException ( e.getMessage ( ) ) ; } }

Target:
public void moveAb ( java.lang.String apkPath , java.lang.String instructionSet , java.lang.String outputPath ) throws com.android.server.pm.Installer.InstallerException { if ( ! ( checkBeforeRemote ( ) ) ) return ; try { mInstalld.moveAb ( apkPath , instructionSet , outputPath ) ; } catch ( android.os.RemoteException | android.os.ServiceSpecificException e ) { throw com.android.server.pm.Installer.InstallerException.from ( e ) ; } }
Source:
protected void validate ( ) { }

Target:
private com.android.builder.VariantConfiguration getVariantWithManifestPackage ( final java.lang.String packageName ) { com.android.builder.VariantConfiguration variant = new com.android.builder.VariantConfiguration ( mDefaultConfig , new com.android.builder.MockSourceProvider ( "main" ) , mBuildType , new com.android.builder.MockSourceProvider ( "debug" ) , VariantConfiguration.Type.DEFAULT ) { @ java.lang.Override public java.lang.String getPackageFromManifest ( ) { return packageName ; } } ; variant.addProductFlavor ( mFlavorConfig , new com.android.builder.MockSourceProvider ( "custom" ) , "" ) ; return variant ; }
Source:
public java.util.Collection < java.lang.Class < ? extends com.android.jack.api.JackConfig > > getSupportedConfigs ( ) { java.util.List < java.lang.Class < ? extends com.android.jack.api.JackConfig > > result = new java.util.ArrayList < java.lang.Class < ? extends com.android.jack.api.JackConfig > > ( 2 ) ; result.add ( com.android.jack.api.v01.Api01Config.class ) ; result.add ( com.android.jack.api.v01.Cli01Config.class ) ; return result ; }

Target:
public java.util.Collection < java.lang.Class < ? extends com.android.jack.api.JackConfig > > getSupportedConfigs ( ) { return com.android.jack.api.impl.JackProviderImpl.map.keySet ( ) ; }
Source:
public void pullLceData ( android.os.Message response ) { android.hardware.radio.V1_0.IRadio radioProxy = getRadioProxy ( response ) ; if ( radioProxy != null ) { com.android.internal.telephony.RILRequest rr = obtainRequest ( com.android.internal.telephony.RIL_REQUEST_PULL_LCEDATA , response , mRILDefaultWorkSource ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) { riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; } try { radioProxy.pullLceData ( rr.mSerial ) ; } catch ( android.os.RemoteException | java.lang.RuntimeException e ) { handleRadioProxyExceptionForRR ( rr , "pullLceData" , e ) ; } } }

Target:
public void getAllowedCarriers ( android.os.Message result ) { android.hardware.radio.V1_0.IRadio radioProxy = getRadioProxy ( result ) ; if ( radioProxy != null ) { com.android.internal.telephony.RILRequest rr = obtainRequest ( com.android.internal.telephony.RIL_REQUEST_GET_ALLOWED_CARRIERS , result , mRILDefaultWorkSource ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) { riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; } try { radioProxy.getAllowedCarriers ( rr.mSerial ) ; } catch ( android.os.RemoteException | java.lang.RuntimeException e ) { handleRadioProxyExceptionForRR ( rr , "getAllowedCarriers" , e ) ; } } }
Source:
public void test_run_for_LongTest2_with_time_limit_should_not_report_time_out ( ) { java.lang.Class < ? > target = vogar.target.junit3.LongTest2.class ; java.lang.String actionName = "actionName" ; vogar.target.Runner runner = new vogar.target.junit.JUnitRunner ( monitor , actionName , null , target , skipPastReference , testEnvironment , 0 ) ; runner.run ( "" , null , null ) ; org.mockito.Mockito.verify ( monitor , org.mockito.Mockito.times ( 8 ) ) . outcomeFinished ( Result.SUCCESS ) ; }

Target:
public void test_run_for_SimpleTest2_limiting_to_1method_with_both_run_should_perform_test ( ) { java.lang.Class < ? > target = vogar.target.junit3.SimpleTest2.class ; vogar.target.Runner runner = new vogar.target.junit.JUnitRunner ( monitor , "testSimple3" , target , skipPastReference , testEnvironment , 0 ) ; runner.run ( "" , null , new java.lang.String [ ] { "testSimple2" } ) ; org.mockito.Mockito.verify ( monitor ) . outcomeStarted ( vogar.target.junit.JUnitRunner.class , ( ( target.getName ( ) ) + "#testSimple2" ) ) ; org.mockito.Mockito.verify ( monitor ) . outcomeFinished ( Result.SUCCESS ) ; }
Source:
public boolean isSimPinEnabled ( ) { try { com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony != null ) return telephony.isSimPinEnabled ( getOpPackageName ( ) ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.telephony.TelephonyManager.TAG , "Error calling ITelephony#isSimPinEnabled" , e ) ; } return false ; }

Target:
public java.lang.String [ ] getForbiddenPlmns ( int subId , int appType ) { try { com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony == null ) return null ; return telephony.getForbiddenPlmns ( subId , appType ) ; } catch ( android.os.RemoteException ex ) { return null ; } catch ( java.lang.NullPointerException ex ) { return null ; } }
Source:
private void registerBroadcastReceiver ( android.alarmclock.common.Utils.TestcaseType testCaseType ) throws java.lang.Exception { mTestCaseType = testCaseType ; mLatch = new java.util.concurrent.CountDownLatch ( 1 ) ; if ( ( mActivityDoneReceiver ) != null ) { mContext.unregisterReceiver ( mActivityDoneReceiver ) ; } mActivityDoneReceiver = new android.alarmclock.cts.AlarmClockTestBase.ActivityDoneReceiver ( ) ; mContext.registerReceiver ( mActivityDoneReceiver , new android.content.IntentFilter ( ( ( android.alarmclock.common.Utils.BROADCAST_INTENT ) + ( testCaseType.toString ( ) ) ) ) ) ; }

Target:
protected void tearDown ( ) throws java.lang.Exception { if ( ( mActivityDoneReceiver ) != null ) { try { mContext.unregisterReceiver ( mActivityDoneReceiver ) ; } catch ( java.lang.IllegalArgumentException e ) { } mActivityDoneReceiver = null ; } super . tearDown ( ) ; }