auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private void addCall ( com.android.server.telecom.Call call ) { if ( mCalls.contains ( call ) ) { android.telecom.Log.w ( LOG_TAG , "Call TC@%s is being added twice." , call.getId ( ) ) ; return ; } android.telecom.Log.d ( LOG_TAG , "Call added with id TC@%s in state %s" , call.getId ( ) , com.android.server.telecom.CallState.toString ( call.getState ( ) ) ) ; if ( ( mCallStateToCalls.get ( call.getState ( ) ) ) != null ) { mCallStateToCalls.get ( call.getState ( ) ) . add ( call ) ; } updateForegroundCall ( ) ; mCalls.add ( call ) ; onCallEnteringState ( call , call.getState ( ) ) ; }

Target:
private void addCall ( com.android.server.telecom.Call call ) { if ( mCalls.contains ( call ) ) { android.telecom.Log.w ( LOG_TAG , "Call TC@%s is being added twice." , call.getId ( ) ) ; return ; } android.telecom.Log.d ( LOG_TAG , "Call added with id TC@%s in state %s" , call.getId ( ) , com.android.server.telecom.CallState.toString ( call.getState ( ) ) ) ; if ( ( mCallStateToCalls.get ( call.getState ( ) ) ) != null ) { mCallStateToCalls.get ( call.getState ( ) ) . add ( call ) ; } updateForegroundCall ( ) ; mCalls.add ( call ) ; if ( ( mCalls.size ( ) ) == 1 ) { mBluetoothStateReceiver.setIsInCall ( true ) ; } onCallEnteringState ( call , call.getState ( ) ) ; }
Source:
public void test_engineInit_02 ( ) { org.apache.harmony.xnet.tests.support.KeyManagerFactorySpiImpl kmf = new org.apache.harmony.xnet.tests.support.KeyManagerFactorySpiImpl ( ) ; try { kmf.engineInit ( null ) ; fail ( "InvalidAlgorithmParameterException wasn't thrown" ) ; } catch ( java.security.InvalidAlgorithmParameterException iape ) { } catch ( java.lang.Exception e ) { fail ( ( e + " was thrown instead of InvalidAlgorithmParameterException" ) ) ; } try { char [ ] psw = "password" . toCharArray ( ) ; tests.api.javax.net.ssl.KeyManagerFactorySpiTest.Parameters pr = new tests.api.javax.net.ssl.KeyManagerFactorySpiTest.Parameters ( psw ) ; kmf.engineInit ( pr ) ; } catch ( java.lang.Exception e ) { fail ( ( e + " unexpected exception was thrown" ) ) ; } }

Target:
public void test_engineInit_02 ( ) { org.apache.harmony.xnet.tests.support.KeyManagerFactorySpiImpl kmf = new org.apache.harmony.xnet.tests.support.KeyManagerFactorySpiImpl ( ) ; try { kmf.engineInit ( null ) ; fail ( "InvalidAlgorithmParameterException wasn't thrown" ) ; } catch ( java.security.InvalidAlgorithmParameterException iape ) { } catch ( java.lang.Exception e ) { fail ( ( e + " was thrown instead of InvalidAlgorithmParameterException" ) ) ; } try { char [ ] psw = "password" . toCharArray ( ) ; org.apache.harmony.tests.javax.net.ssl.KeyManagerFactorySpiTest.Parameters pr = new org.apache.harmony.tests.javax.net.ssl.KeyManagerFactorySpiTest.Parameters ( psw ) ; kmf.engineInit ( pr ) ; } catch ( java.lang.Exception e ) { fail ( ( e + " unexpected exception was thrown" ) ) ; } }
Source:
public boolean onCreate ( ) { android.util.Log.d ( com.android.providers.telephony.CarrierIdProvider.TAG , "onCreate" ) ; mDbHelper = new com.android.providers.telephony.CarrierIdProvider.CarrierIdDatabaseHelper ( getContext ( ) ) ; mDbHelper.getReadableDatabase ( ) ; updateFromAssetsIfNeeded ( mDbHelper.getWritableDatabase ( ) ) ; return true ; }

Target:
public boolean onCreate ( ) { android.util.Log.d ( com.android.providers.telephony.CarrierIdProvider.TAG , "onCreate" ) ; mDbHelper = new com.android.providers.telephony.CarrierIdProvider.CarrierIdDatabaseHelper ( getContext ( ) ) ; mDbHelper.getReadableDatabase ( ) ; com.android.providers.telephony.CarrierIdProvider.s_urlMatcher.addURI ( com.android.providers.telephony.CarrierIdProvider.AUTHORITY , "update_db" , com.android.providers.telephony.CarrierIdProvider.URL_UPDATE_FROM_PB ) ; initDatabaseFromPb ( mDbHelper.getWritableDatabase ( ) ) ; return true ; }
Source:
boolean matchesDescription ( org.junit.runner.Description description ) { java.lang.String displayName = description.getDisplayName ( ) ; int endIndex = displayName.lastIndexOf ( "(" , ( ( displayName.length ( ) ) - 1 ) ) ; java.lang.String uniqueName = ( endIndex == ( - 1 ) ) ? displayName : displayName.substring ( 0 , endIndex ) ; return uniqueName.equals ( uniqueMethodId ) ; }

Target:
boolean matchesDescription ( org.junit.runner.Description description ) { return ( description.hashCode ( ) ) == ( uniqueMethodId.hashCode ( ) ) ; }
Source:
void startCleaningPackages ( ) { synchronized ( mPackages ) { if ( ! ( isExternalMediaAvailable ( ) ) ) { return ; } if ( mSettings.mPackagesToBeCleaned.isEmpty ( ) ) { return ; } } android.content.Intent intent = new android.content.Intent ( android.content.pm.PackageManager.ACTION_CLEAN_EXTERNAL_STORAGE ) ; intent.setComponent ( com.android.server.pm.PackageManagerService.DEFAULT_CONTAINER_COMPONENT ) ; android.app.IActivityManager am = android.app.ActivityManagerNative.getDefault ( ) ; if ( am != null ) { try { am.startService ( null , intent , null , mContext.getOpPackageName ( ) , UserHandle.USER_OWNER ) ; } catch ( android.os.RemoteException e ) { } } }

Target:
void startCleaningPackages ( ) { if ( ! ( isExternalMediaAvailable ( ) ) ) { return ; } synchronized ( mPackages ) { if ( mSettings.mPackagesToBeCleaned.isEmpty ( ) ) { return ; } } android.content.Intent intent = new android.content.Intent ( android.content.pm.PackageManager.ACTION_CLEAN_EXTERNAL_STORAGE ) ; intent.setComponent ( com.android.server.pm.PackageManagerService.DEFAULT_CONTAINER_COMPONENT ) ; android.app.IActivityManager am = android.app.ActivityManagerNative.getDefault ( ) ; if ( am != null ) { try { am.startService ( null , intent , null , mContext.getOpPackageName ( ) , UserHandle.USER_SYSTEM ) ; } catch ( android.os.RemoteException e ) { } } }
Source:
private com.android.sdklib.IAndroidTarget getRenderingTarget ( ) { com.android.ide.eclipse.adt.internal.sdk.Sdk currentSdk = com.android.ide.eclipse.adt.internal.sdk.Sdk.getCurrent ( ) ; if ( currentSdk == null ) { return null ; } com.android.sdklib.IAndroidTarget renderingTarget = mConfigComposite.getRenderingTarget ( ) ; if ( renderingTarget != null ) { return renderingTarget ; } if ( ( mEditedFile ) != null ) { return currentSdk.getTarget ( mEditedFile.getProject ( ) ) ; } return null ; }

Target:
private com.android.sdklib.IAndroidTarget getRenderingTarget ( ) { com.android.ide.eclipse.adt.internal.sdk.Sdk currentSdk = com.android.ide.eclipse.adt.internal.sdk.Sdk.getCurrent ( ) ; if ( currentSdk == null ) { return null ; } assert ( mConfigComposite.getDisplay ( ) . getThread ( ) ) == ( java.lang.Thread.currentThread ( ) ) ; com.android.sdklib.IAndroidTarget renderingTarget = mConfigComposite.getRenderingTarget ( ) ; if ( renderingTarget != null ) { return renderingTarget ; } if ( ( mEditedFile ) != null ) { return currentSdk.getTarget ( mEditedFile.getProject ( ) ) ; } return null ; }
Source:
private static void assertPartial ( byte [ ] expected , byte [ ] actual ) { for ( int i = 0 ; i < ( expected.length ) ; i ++ ) { if ( ( expected [ i ] ) != ( actual [ i ] ) ) { fail ( ( ( ( "Expected " + ( java.util.Arrays.toString ( expected ) ) ) + " but found " ) + ( java.util.Arrays.toString ( actual ) ) ) ) ; } } }

Target:
private static void assertStartsWith ( byte [ ] expectedContents , byte [ ] container ) { for ( int i = 0 ; i < ( expectedContents.length ) ; i ++ ) { if ( ( expectedContents [ i ] ) != ( container [ i ] ) ) { fail ( ( ( ( "Expected " + ( java.util.Arrays.toString ( expectedContents ) ) ) + " but found " ) + ( java.util.Arrays.toString ( expectedContents ) ) ) ) ; } } }
Source:
private boolean hasOnlyOneDefinition ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JVariable var , @ javax.annotation.Nonnull com.android.jack.cfg.BasicBlock bb ) { com.android.jack.analysis.dfa.reachingdefs.ReachingDefsMarker rdm = bb.getMarker ( com.android.jack.analysis.dfa.reachingdefs.ReachingDefsMarker.class ) ; assert rdm != null ; boolean alreadyDefined = false ; for ( com.android.jack.analysis.DefinitionMarker dm : rdm.getReachingDefs ( ) ) { if ( ( dm.getDefinedVariable ( ) ) == var ) { if ( alreadyDefined ) { return false ; } alreadyDefined = true ; } } return true ; }

Target:
private boolean bbHasOnlyDefinitions ( @ javax.annotation.Nonnull com.android.jack.cfg.BasicBlock bb , @ javax.annotation.Nonnull com.android.jack.ir.ast.JVariable var , @ javax.annotation.Nonnull java.util.List < com.android.jack.analysis.DefinitionMarker > defsToFound ) { int nbDef = 0 ; for ( com.android.jack.analysis.DefinitionMarker def : com.android.jack.util.UseDefHelper.getReachingDefs ( bb ) ) { if ( ( def.getDefinedVariable ( ) ) == var ) { if ( defsToFound.contains ( def ) ) { nbDef ++ ; } else { return false ; } } } return ( defsToFound.size ( ) ) == nbDef ; }
Source:
private android.os.IInterface createImsFeature ( int slotId , int featureType , com.android.ims.internal.IImsFeatureStatusCallback c ) throws android.os.RemoteException { switch ( featureType ) { case android.telephony.ims.feature.ImsFeature.EMERGENCY_MMTEL : { return mIImsServiceController.createEmergencyMMTelFeature ( slotId , c ) ; } case android.telephony.ims.feature.ImsFeature.MMTEL : { return mIImsServiceController.createMMTelFeature ( slotId , c ) ; } case android.telephony.ims.feature.ImsFeature.RCS : { return mIImsServiceController.createRcsFeature ( slotId , c ) ; } default : return null ; } }

Target:
public android.telephony.ims.aidl.IImsConfig getConfig ( int slotId ) throws android.os.RemoteException { synchronized ( mLock ) { return mIImsServiceController.getConfig ( slotId ) ; } }
Source:
public void write ( java.io.OutputStream out ) throws java.io.IOException { @ java.lang.SuppressWarnings ( value = "IOResourceOpenedButNotSafelyClosed" ) java.io.DataOutputStream dataOut = new java.io.DataOutputStream ( out ) ; try { dataOut.writeUTF ( myOldBuild ) ; dataOut.writeUTF ( myNewBuild ) ; dataOut.writeBoolean ( myIsBinary ) ; dataOut.writeBoolean ( myIsStrict ) ; dataOut.writeBoolean ( myIsNormalized ) ; com.intellij.updater.Patch.writeMap ( dataOut , myWarnings ) ; writeActions ( dataOut , myActions ) ; } finally { dataOut.flush ( ) ; } }

Target:
public void write ( java.io.OutputStream out ) throws java.io.IOException { @ java.lang.SuppressWarnings ( value = "IOResourceOpenedButNotSafelyClosed" ) java.io.DataOutputStream dataOut = new java.io.DataOutputStream ( out ) ; try { dataOut.writeUTF ( myOldBuild ) ; dataOut.writeUTF ( myNewBuild ) ; dataOut.writeBoolean ( myIsBinary ) ; dataOut.writeBoolean ( myIsStrict ) ; dataOut.writeBoolean ( myIsNormalized ) ; com.intellij.updater.Patch.writeMap ( dataOut , myWarnings ) ; com.intellij.updater.Patch.writeList ( dataOut , myDeleteFiles ) ; writeActions ( dataOut , myActions ) ; } finally { dataOut.flush ( ) ; } }
Source:
public void writeCharacteristic ( int clientIf , java.lang.String address , int srvcType , int srvcInstanceId , android.os.ParcelUuid srvcId , int charInstanceId , android.os.ParcelUuid charId , int writeType , int authReq , byte [ ] value ) { com.android.bluetooth.gatt.GattService service = getService ( ) ; if ( service == null ) return ; service.writeCharacteristic ( clientIf , address , srvcType , srvcInstanceId , srvcId.getUuid ( ) , charInstanceId , charId.getUuid ( ) , writeType , authReq , value ) ; }

Target:
public void writeCharacteristic ( int clientIf , java.lang.String address , int handle , int writeType , int authReq , byte [ ] value ) { com.android.bluetooth.gatt.GattService service = getService ( ) ; if ( service == null ) return ; service.writeCharacteristic ( clientIf , address , handle , writeType , authReq , value ) ; }
Source:
public void onDestroy ( ) { super . onDestroy ( ) ; cancelNotificationTaskOfSecureTestStartFailure ( ) ; stopAdvertise ( ) ; if ( ( mGattServer ) == null ) { return ; } if ( ( mDevice ) != null ) { mGattServer.cancelConnection ( mDevice ) ; } mGattServer.clearServices ( ) ; mGattServer.close ( ) ; }

Target:
public void onCharacteristicReadRequest ( android.bluetooth.BluetoothDevice device , int requestId , int offset , android.bluetooth.BluetoothGattCharacteristic characteristic ) { if ( ( mGattServer ) == null ) { if ( com.android.cts.verifier.bluetooth.BleServerService.DEBUG ) android.util.Log.d ( com.android.cts.verifier.bluetooth.BleServerService.TAG , "GattServer is null, return" ) ; return ; } if ( com.android.cts.verifier.bluetooth.BleServerService.DEBUG ) android.util.Log.d ( com.android.cts.verifier.bluetooth.BleServerService.TAG , "onCharacteristicReadRequest()" ) ; notifyCharacteristicReadRequest ( ) ; mGattServer.sendResponse ( device , requestId , BluetoothGatt.GATT_SUCCESS , 0 , characteristic.getValue ( ) ) ; }
Source:
public void setNetworkSelectionModeAutomatic ( android.os.Message response ) { com.android.internal.telephony.gsm.GSMPhone.NetworkSelectMessage nsm = new com.android.internal.telephony.gsm.GSMPhone.NetworkSelectMessage ( ) ; nsm.message = response ; nsm.operatorNumeric = "" ; nsm.operatorAlphaLong = "" ; android.os.Message msg = obtainMessage ( com.android.internal.telephony.gsm.EVENT_SET_NETWORK_AUTOMATIC_COMPLETE , nsm ) ; if ( com.android.internal.telephony.gsm.GSMPhone.LOCAL_DEBUG ) android.util.Log.d ( com.android.internal.telephony.gsm.GSMPhone.LOG_TAG , "wrapping and sending message to connect automatically" ) ; mCM.setNetworkSelectionModeAutomatic ( msg ) ; }

Target:
public void setNetworkSelectionModeAutomatic ( android.os.Message response ) { com.android.internal.telephony.gsm.GSMPhone.NetworkSelectMessage nsm = new com.android.internal.telephony.gsm.GSMPhone.NetworkSelectMessage ( ) ; nsm.message = response ; nsm.operatorNumeric = "" ; nsm.operatorAlphaLong = "" ; android.os.Message msg = obtainMessage ( com.android.internal.telephony.gsm.EVENT_SET_NETWORK_AUTOMATIC_COMPLETE , nsm ) ; if ( com.android.internal.telephony.gsm.GSMPhone.LOCAL_DEBUG ) android.telephony.Rlog.d ( com.android.internal.telephony.gsm.GSMPhone.LOG_TAG , "wrapping and sending message to connect automatically" ) ; mCM.setNetworkSelectionModeAutomatic ( msg ) ; }
Source:
private static void reportTypeDef ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.JavaContext context , @ com.android.annotations.NonNull lombok.ast.Node node , boolean flag , @ com.android.annotations.NonNull java.lang.Object [ ] allowedValues ) { java.lang.String values = com.android.tools.lint.checks.SupportAnnotationDetector.listAllowedValues ( allowedValues ) ; java.lang.String message ; if ( flag ) { message = "Must be one or more of: " + values ; } else { message = "Must be one of: " + values ; } context.report ( com.android.tools.lint.checks.SupportAnnotationDetector.TYPE_DEF , node , context.getLocation ( node ) , message ) ; }

Target:
private static void reportTypeDef ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.JavaContext context , @ com.android.annotations.NonNull lombok.ast.Node node , @ com.android.annotations.Nullable lombok.ast.Node errorNode , boolean flag , @ com.android.annotations.NonNull java.lang.Object [ ] allowedValues ) { java.lang.String values = com.android.tools.lint.checks.SupportAnnotationDetector.listAllowedValues ( allowedValues ) ; java.lang.String message ; if ( flag ) { message = "Must be one or more of: " + values ; } else { message = "Must be one of: " + values ; } if ( errorNode == null ) { errorNode = node ; } context.report ( com.android.tools.lint.checks.SupportAnnotationDetector.TYPE_DEF , errorNode , context.getLocation ( errorNode ) , message ) ; }
Source:
public < T extends com.android.jack.ir.ast.JExpression > T cloneExpression ( @ javax.annotation.Nonnull T expr ) { expression = null ; this . accept ( expr ) ; if ( ( expression ) == null ) { throw new java.lang.AssertionError ( ( "Unable to clone expression " + expr ) ) ; } assert ( expression ) != null ; return ( ( T ) ( expression ) ) ; }

Target:
public < T extends com.android.jack.ir.ast.JExpression > T cloneExpression ( @ javax.annotation.Nonnull T expr ) { expression = null ; this . accept ( expr ) ; if ( ( expression ) == null ) { throw new java.lang.AssertionError ( ( "Unable to clone expression " + expr ) ) ; } for ( com.android.sched.marker.Marker m : expr.getAllMarkers ( ) ) { expression.addMarker ( m.cloneIfNeeded ( ) ) ; } assert ( expression ) != null ; return ( ( T ) ( expression ) ) ; }
Source:
private java.util.Map.Entry < K , V2 > transformEntry ( java.util.Map.Entry < K , V1 > entry ) { if ( entry == null ) { return null ; } K key = entry.getKey ( ) ; V2 v2 = transformer.transformEntry ( key , entry.getValue ( ) ) ; return com.google.common.collect.Maps.immutableEntry ( key , v2 ) ; }

Target:
static < V > V safeGet ( java.util.Map < ? , V > map , @ javax.annotation.Nullable java.lang.Object key ) { com.google.common.base.Preconditions.checkNotNull ( map ) ; try { return map.get ( key ) ; } catch ( java.lang.ClassCastException e ) { return null ; } catch ( java.lang.NullPointerException e ) { return null ; } }
Source:
private static void printGetMethod ( java.lang.Class < ? > klass ) { java.lang.reflect.Method m ; try { m = klass.getDeclaredMethod ( "sayHi" ) ; java.lang.System.out.println ( ( "No error thrown for class " + ( klass.toString ( ) ) ) ) ; } catch ( java.lang.NoSuchMethodException e ) { java.lang.System.out.println ( ( "NoSuchMethodException thrown for class " + ( klass.toString ( ) ) ) ) ; } catch ( java.lang.Throwable t ) { java.lang.System.out.println ( ( "Unknown error thrown for class " + ( klass.toString ( ) ) ) ) ; t.printStackTrace ( ) ; } }

Target:
private static void printGetMethod ( java.lang.Class < ? > klass ) { java.lang.reflect.Method m ; try { m = klass.getDeclaredMethod ( "sayHi" ) ; java.lang.System.out.println ( ( "No error thrown for class " + ( klass.toString ( ) ) ) ) ; } catch ( java.lang.NoSuchMethodException e ) { java.lang.System.out.println ( ( "NoSuchMethodException thrown for class " + ( klass.toString ( ) ) ) ) ; } catch ( java.lang.Throwable t ) { java.lang.System.out.println ( ( "Unknown error thrown for class " + ( klass.toString ( ) ) ) ) ; t.printStackTrace ( java.lang.System.out ) ; } }
Source:
public android.bluetooth.BluetoothClass getBluetoothClass ( ) { if ( ( android.bluetooth.BluetoothDevice.sService ) == null ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "BT not enabled. Cannot get Bluetooth Class" ) ; return null ; } try { int classInt = android.bluetooth.BluetoothDevice.sService.getRemoteClass ( this ) ; if ( classInt == ( BluetoothClass.ERROR ) ) return null ; return new android.bluetooth.BluetoothClass ( classInt ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "" , e ) ; } return null ; }

Target:
public android.bluetooth.BluetoothClass getBluetoothClass ( ) { final android.bluetooth.IBluetooth service = android.bluetooth.BluetoothDevice.sService ; if ( service == null ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "BT not enabled. Cannot get Bluetooth Class" ) ; return null ; } try { int classInt = service.getRemoteClass ( this ) ; if ( classInt == ( BluetoothClass.ERROR ) ) return null ; return new android.bluetooth.BluetoothClass ( classInt ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "" , e ) ; } return null ; }
Source:
public boolean isTrue ( ) throws android.support.test.uiautomator.UiObjectNotFoundException { if ( ( api ) == 24 ) { return device.findObject ( new android.support.test.uiautomator.UiSelector ( ) . description ( "Email or phone" ) ) . exists ( ) ; } else { return device.findObject ( new android.support.test.uiautomator.UiSelector ( ) . text ( "Email or phone" ) ) . exists ( ) ; } }

Target:
public boolean isTrue ( ) throws android.support.test.uiautomator.UiObjectNotFoundException { return inputEmailField.exists ( ) ; }
Source:
public void close ( ) throws java.io.IOException { guard.close ( ) ; synchronized ( this ) { if ( ( channel ) != null ) { channel.close ( ) ; } if ( shouldClose ) { libcore.io.IoUtils.close ( fd ) ; } else { fd = new java.io.FileDescriptor ( ) ; } } }

Target:
public void close ( ) throws java.io.IOException { guard.close ( ) ; synchronized ( this ) { if ( ( channel ) != null ) { channel.close ( ) ; } if ( shouldClose ) { libcore.io.IoBridge.closeAndSignalBlockedThreads ( fd ) ; } else { fd = new java.io.FileDescriptor ( ) ; } } }
Source:
public android.net.IpSecTransform.Builder setSpi ( @ android.net.IpSecTransform.TransformDirection int direction , android.net.IpSecManager.SecurityParameterIndex spi ) { mConfig.setSpiResourceId ( direction , spi.getResourceId ( ) ) ; return this ; }

Target:
public android.net.IpSecTransform buildTunnelModeTransform ( @ android.annotation.NonNull java.net.InetAddress sourceAddress , @ android.annotation.NonNull android.net.IpSecManager.SecurityParameterIndex spi ) throws IpSecManager.ResourceUnavailableException , IpSecManager.SpiUnavailableException , java.io.IOException { com.android.internal.util.Preconditions.checkNotNull ( sourceAddress ) ; com.android.internal.util.Preconditions.checkNotNull ( spi ) ; if ( ( spi.getResourceId ( ) ) == ( android.net.IpSecManager.INVALID_RESOURCE_ID ) ) { throw new java.lang.IllegalArgumentException ( "Invalid SecurityParameterIndex" ) ; } mConfig.setMode ( android.net.IpSecTransform.MODE_TUNNEL ) ; mConfig.setSourceAddress ( sourceAddress.getHostAddress ( ) ) ; mConfig.setSpiResourceId ( spi.getResourceId ( ) ) ; return new android.net.IpSecTransform ( mContext , mConfig ) ; }
Source:
public final void testGetDeviceStatus ( ) { assertEquals ( DeviceStatus.EXISTS , dm.getDeviceStatus ( "7in WSVGA (Tablet)" , "Generic" , ( - 1338842870 ) ) ) ; assertEquals ( DeviceStatus.CHANGED , dm.getDeviceStatus ( "7in WSVGA (Tablet)" , "Generic" , 1 ) ) ; assertEquals ( DeviceStatus.EXISTS , dm.getDeviceStatus ( "Nexus One" , "Google" , ( - 1812631727 ) ) ) ; assertEquals ( DeviceStatus.CHANGED , dm.getDeviceStatus ( "Nexus One" , "Google" , 2 ) ) ; assertEquals ( DeviceStatus.MISSING , dm.getDeviceStatus ( "My Device" , "Custom OEM" , 3 ) ) ; }

Target:
public final void testHasHardwarePropHashChanged_Generic ( ) { final com.android.sdklib.devices.Device d1 = dm.getDevice ( "7in WSVGA (Tablet)" , "Generic" ) ; assertEquals ( "MD5:750a657019b49e621c42ce9a20c2cc30" , com.android.sdklib.devices.DeviceManager.hasHardwarePropHashChanged ( d1 , "invalid" ) ) ; assertEquals ( null , com.android.sdklib.devices.DeviceManager.hasHardwarePropHashChanged ( d1 , "MD5:750a657019b49e621c42ce9a20c2cc30" ) ) ; d1.getDefaultHardware ( ) . setNav ( Navigation.TRACKBALL ) ; assertEquals ( "MD5:9c4dd5018987da51f7166f139f4361a2" , com.android.sdklib.devices.DeviceManager.hasHardwarePropHashChanged ( d1 , "MD5:750a657019b49e621c42ce9a20c2cc30" ) ) ; d1.getDefaultHardware ( ) . setNav ( Navigation.NONAV ) ; assertEquals ( null , com.android.sdklib.devices.DeviceManager.hasHardwarePropHashChanged ( d1 , "MD5:750a657019b49e621c42ce9a20c2cc30" ) ) ; }
Source:
public void onSizeChanged ( final int w , final int h , final int ow , final int oh ) { if ( checkNeedsPost ( ) ) { mRunQueue.addTask ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { onSizeChanged ( w , h , ow , oh ) ; } } ) ; return ; } mAwContents.onSizeChanged ( w , h , ow , oh ) ; }

Target:
public void onFocusChanged ( final boolean focused , final int direction , final android.graphics.Rect previouslyFocusedRect ) { if ( checkNeedsPost ( ) ) { mRunQueue.addTask ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { onFocusChanged ( focused , direction , previouslyFocusedRect ) ; } } ) ; return ; } mAwContents.onFocusChanged ( focused , direction , previouslyFocusedRect ) ; }
Source:
private void generateTestManifest ( java.lang.String testPackageName , int minSdkVersion , int targetSdkVersion , java.lang.String testedPackageName , java.lang.String instrumentationRunner , java.lang.String outManifestLocation ) { com.android.builder.internal.TestManifestGenerator generator = new com.android.builder.internal.TestManifestGenerator ( outManifestLocation , testPackageName , minSdkVersion , targetSdkVersion , testedPackageName , instrumentationRunner ) ; try { generator.generate ( ) ; } catch ( java.io.IOException e ) { throw new java.lang.RuntimeException ( e ) ; } }

Target:
private void generateTestManifest ( java.lang.String testPackageName , int minSdkVersion , int targetSdkVersion , java.lang.String testedPackageName , java.lang.String instrumentationRunner , java.lang.Boolean handleProfiling , java.lang.Boolean functionalTest , java.lang.String outManifestLocation ) { com.android.builder.internal.TestManifestGenerator generator = new com.android.builder.internal.TestManifestGenerator ( outManifestLocation , testPackageName , minSdkVersion , targetSdkVersion , testedPackageName , instrumentationRunner , handleProfiling , functionalTest ) ; try { generator.generate ( ) ; } catch ( java.io.IOException e ) { throw new java.lang.RuntimeException ( e ) ; } }
Source:
public android.content.Context createConfigurationContext ( android.content.res.Configuration overrideConfiguration ) { if ( overrideConfiguration == null ) { throw new java.lang.IllegalArgumentException ( "overrideConfiguration must not be null" ) ; } android.app.ContextImpl c = new android.app.ContextImpl ( ) ; c.init ( mPackageInfo , null , mMainThread ) ; c.mResources = mMainThread.getTopLevelResources ( mPackageInfo.getResDir ( ) , getDisplayId ( ) , overrideConfiguration , mResources.getCompatibilityInfo ( ) ) ; return c ; }

Target:
public android.content.Context createDisplayContext ( android.view.Display display ) { if ( display == null ) { throw new java.lang.IllegalArgumentException ( "display must not be null" ) ; } int displayId = display.getDisplayId ( ) ; android.app.ContextImpl context = new android.app.ContextImpl ( ) ; context.init ( mPackageInfo , null , mMainThread ) ; context.mDisplay = display ; android.view.DisplayAdjustments daj = getDisplayAdjustments ( displayId ) ; context.mResources = mResourcesManager.getTopLevelResources ( mPackageInfo.getResDir ( ) , mPackageInfo.getOverlayDirs ( ) , displayId , null , daj.getCompatibilityInfo ( ) , null ) ; return context ; }
Source:
public void onDestroy ( ) { android.util.Log.d ( com.android.bluetooth.hfpclient.connserv.HfpClientConnectionService.TAG , "onDestroy called" ) ; if ( ( mHeadsetProfile ) != null ) { mAdapter.closeProfileProxy ( BluetoothProfile.HEADSET_CLIENT , mHeadsetProfile ) ; } try { unregisterReceiver ( mBroadcastReceiver ) ; } catch ( java.lang.IllegalArgumentException ex ) { android.util.Log.w ( com.android.bluetooth.hfpclient.connserv.HfpClientConnectionService.TAG , "Receiver was not registered." ) ; } synchronized ( this ) { mDevice = null ; if ( ( mDevicePhoneAccount ) != null ) { mTelecomManager.unregisterPhoneAccount ( mDevicePhoneAccount.getAccountHandle ( ) ) ; mDevicePhoneAccount = null ; } } }

Target:
public void onDestroy ( ) { if ( com.android.bluetooth.hfpclient.connserv.HfpClientConnectionService.DBG ) { android.util.Log.d ( com.android.bluetooth.hfpclient.connserv.HfpClientConnectionService.TAG , "onDestroy called" ) ; } if ( ( mHeadsetProfile ) != null ) { mAdapter.closeProfileProxy ( BluetoothProfile.HEADSET_CLIENT , mHeadsetProfile ) ; } try { unregisterReceiver ( mBroadcastReceiver ) ; } catch ( java.lang.IllegalArgumentException ex ) { android.util.Log.w ( com.android.bluetooth.hfpclient.connserv.HfpClientConnectionService.TAG , "Receiver was not registered." ) ; } synchronized ( this ) { mDevice = null ; if ( ( mDevicePhoneAccount ) != null ) { mTelecomManager.unregisterPhoneAccount ( mDevicePhoneAccount.getAccountHandle ( ) ) ; mDevicePhoneAccount = null ; } } }
Source:
public void enter ( ) { if ( com.android.server.connectivity.tethering.TetherInterfaceStateMachine.DBG ) android.util.Log.d ( com.android.server.connectivity.tethering.TetherInterfaceStateMachine.TAG , ( "Tethered " + ( mIfaceName ) ) ) ; sendInterfaceState ( IControlsTethering.STATE_TETHERED ) ; }

Target:
public void enter ( ) { super . enter ( ) ; if ( ( mLastError ) != ( android.net.ConnectivityManager.TETHER_ERROR_NO_ERROR ) ) { transitionTo ( mInitialState ) ; } if ( com.android.server.connectivity.tethering.TetherInterfaceStateMachine.DBG ) android.util.Log.d ( com.android.server.connectivity.tethering.TetherInterfaceStateMachine.TAG , ( "Tethered " + ( mIfaceName ) ) ) ; sendInterfaceState ( IControlsTethering.STATE_TETHERED ) ; }
Source:
public static void checkServerTrusted ( javax.net.ssl.X509TrustManager x509tm , java.security.cert.X509Certificate [ ] chain , java.lang.String authType , java.net.Socket socket ) throws java.security.cert.CertificateException { if ( x509tm instanceof javax.net.ssl.X509ExtendedTrustManager ) { javax.net.ssl.X509ExtendedTrustManager x509etm = ( ( javax.net.ssl.X509ExtendedTrustManager ) ( x509tm ) ) ; x509etm.checkServerTrusted ( chain , authType , socket ) ; } else { x509tm.checkServerTrusted ( chain , authType ) ; } }

Target:
public static void checkServerTrusted ( javax.net.ssl.X509TrustManager x509tm , java.security.cert.X509Certificate [ ] chain , java.lang.String authType , java.lang.String host ) throws java.security.cert.CertificateException { if ( x509tm instanceof org.conscrypt.TrustManagerImpl ) { org.conscrypt.TrustManagerImpl tm = ( ( org.conscrypt.TrustManagerImpl ) ( x509tm ) ) ; tm.checkServerTrusted ( chain , authType , host ) ; } else { x509tm.checkServerTrusted ( chain , authType ) ; } }
Source:
void onUserInitialized ( com.android.server.am.UserState uss , boolean foreground , int oldUserId , int newUserId ) { synchronized ( this ) { if ( foreground ) { moveUserToForeground ( uss , oldUserId , newUserId ) ; } } completeSwitchAndInitialize ( uss , newUserId , true , false ) ; }

Target:
public void resizeDockedStack ( android.graphics.Rect dockedBounds , android.graphics.Rect tempDockedTaskBounds , android.graphics.Rect tempDockedTaskInsetBounds , android.graphics.Rect tempOtherTaskBounds , android.graphics.Rect tempOtherTaskInsetBounds ) { enforceCallingPermission ( android.Manifest.permission.MANAGE_ACTIVITY_STACKS , "resizeDockedStack()" ) ; long ident = android.os.Binder.clearCallingIdentity ( ) ; try { synchronized ( this ) { mStackSupervisor.resizeDockedStackLocked ( dockedBounds , tempDockedTaskBounds , tempDockedTaskInsetBounds , tempOtherTaskBounds , tempOtherTaskInsetBounds , com.android.server.am.ActivityStackSupervisor.PRESERVE_WINDOWS ) ; } } finally { android.os.Binder.restoreCallingIdentity ( ident ) ; } }
Source:
public void trackingEnabled_updateAppConfigMissing ( ) throws java.lang.Exception { configureTrackingEnabled ( ) ; configureReliabilityConfigSettingsOk ( ) ; configureUpdateAppPackageNameMissing ( ) ; configureDataAppPackageOk ( com.android.server.timezone.PackageTrackerTest.DATA_APP_PACKAGE_NAME ) ; try { mPackageTracker.start ( ) ; org.junit.Assert.fail ( ) ; } catch ( java.lang.RuntimeException expected ) { } mFakeIntentHelper.assertNotInitialized ( ) ; mFakeIntentHelper.assertReliabilityTriggeringDisabled ( ) ; }

Target:
public void trackingEnabled_updateAppConfigMissing ( ) throws java.lang.Exception { configureTrackingEnabled ( ) ; configureReliabilityConfigSettingsOk ( ) ; configureUpdateAppPackageNameMissing ( ) ; configureDataAppPackageOk ( com.android.server.timezone.PackageTrackerTest.DATA_APP_PACKAGE_NAME ) ; try { mPackageTracker.start ( ) ; org.junit.Assert.fail ( ) ; } catch ( java.lang.RuntimeException expected ) { } mFakeIntentHelper.assertNotInitialized ( ) ; mFakeIntentHelper.assertReliabilityTriggerNotScheduled ( ) ; }
Source:
public void enter ( ) { super . enter ( ) ; setSpeakerphoneOn ( false ) ; android.telecom.CallAudioState newState = new android.telecom.CallAudioState ( mIsMuted , com.android.server.telecom.CallAudioRouteStateMachine.ROUTE_BLUETOOTH , mAvailableRoutes ) ; setSystemAudioState ( newState ) ; updateInternalCallAudioState ( ) ; }

Target:
public void enter ( ) { super . enter ( ) ; setSpeakerphoneOn ( false ) ; android.telecom.CallAudioState newState = new android.telecom.CallAudioState ( mIsMuted , com.android.server.telecom.CallAudioRouteStateMachine.ROUTE_BLUETOOTH , mAvailableRoutes , mBluetoothRouteManager.getBluetoothAudioConnectedDevice ( ) , mBluetoothRouteManager.getConnectedDevices ( ) ) ; setSystemAudioState ( newState ) ; updateInternalCallAudioState ( ) ; }
Source:
private java.io.File createJackArchiveWithResources ( ) throws java.lang.Exception { java.io.File jackAr = com.android.jack.test.toolchain.AbstractTestTools.createTempFile ( "resourcetestjack" , ".zip" ) ; com.android.jack.test.toolchain.JackBasedToolchain toolchain = com.android.jack.test.toolchain.AbstractTestTools.getCandidateToolchain ( com.android.jack.test.toolchain.JackBasedToolchain.class ) ; toolchain.addResource ( new java.io.File ( com.android.jack.resource.ResourceTests.FILE , "rsc" ) ) ; toolchain.srcToLib ( com.android.jack.test.toolchain.AbstractTestTools.getClasspathAsString ( toolchain.getDefaultBootClasspath ( ) ) , jackAr , true , com.android.jack.resource.ResourceTests.FILE ) ; return jackAr ; }

Target:
private java.io.File createJackArchiveWithResources ( ) throws java.lang.Exception { com.android.jack.test.toolchain.JackBasedToolchain toolchain = com.android.jack.test.toolchain.AbstractTestTools.getCandidateToolchain ( com.android.jack.test.toolchain.JackBasedToolchain.class ) ; java.io.File jackAr = com.android.jack.test.toolchain.AbstractTestTools.createTempFile ( "resourcetestjack" , toolchain.getLibraryExtension ( ) ) ; toolchain.addResource ( new java.io.File ( com.android.jack.resource.ResourceTests.FILE , "rsc" ) ) ; toolchain.srcToLib ( com.android.jack.test.toolchain.AbstractTestTools.getClasspathAsString ( toolchain.getDefaultBootClasspath ( ) ) , jackAr , true , com.android.jack.resource.ResourceTests.FILE ) ; return jackAr ; }
Source:
public void test_isHidden ( ) throws java.io.IOException { org.junit.Assert.assertFalse ( provider.isHidden ( filesSetup.getDataFilePath ( ) ) ) ; java.nio.file.Files.setAttribute ( filesSetup.getDataFilePath ( ) , "dos:hidden" , true ) ; org.junit.Assert.assertFalse ( provider.isHidden ( filesSetup.getDataFilePath ( ) ) ) ; }

Target:
public void test_isHidden ( ) throws java.io.IOException { org.junit.Assert.assertFalse ( provider.isHidden ( filesSetup.getDataFilePath ( ) ) ) ; try { java.nio.file.Files.setAttribute ( filesSetup.getDataFilePath ( ) , "dos:hidden" , true ) ; org.junit.Assert.fail ( ) ; } catch ( java.lang.UnsupportedOperationException expected ) { } org.junit.Assert.assertFalse ( provider.isHidden ( filesSetup.getDataFilePath ( ) ) ) ; }
Source:
public static void appendMessageToFileContent ( @ javax.annotation.Nonnull java.io.File file , @ javax.annotation.Nonnull java.io.File out , @ javax.annotation.Nonnull java.lang.String message ) throws java.io.IOException { java.io.PrintStream fos = new java.io.PrintStream ( new java.io.FileOutputStream ( out ) ) ; java.io.FileInputStream fis = new java.io.FileInputStream ( file ) ; new com.android.sched.util.stream.ByteStreamSucker ( fis , fos , false ) . suck ( ) ; fos.print ( message ) ; fos.close ( ) ; }

Target:
public com.android.jack.test.toolchain.JackApiV03IncrementalToolchain build ( ) { java.io.File jackPrebuilt = ( com.android.jack.test.toolchain.AbstractTestTools.isPrebuiltAvailable ( "jack" ) ) ? com.android.jack.test.toolchain.AbstractTestTools.getPrebuilt ( "jack" ) : null ; return new com.android.jack.test.toolchain.JackApiV03IncrementalToolchain ( jackPrebuilt ) ; }
Source:
public boolean mergeProfiles ( int uid , java.lang.String packageName ) throws com.android.internal.os.InstallerConnection.InstallerException { checkLock ( ) ; try { return mInstalld.mergeProfiles ( uid , packageName ) ; } catch ( android.os.RemoteException | android.os.ServiceSpecificException e ) { throw new com.android.internal.os.InstallerConnection.InstallerException ( e.getMessage ( ) ) ; } }

Target:
public boolean mergeProfiles ( int uid , java.lang.String packageName ) throws com.android.internal.os.InstallerConnection.InstallerException { if ( ! ( checkBeforeRemote ( ) ) ) return false ; try { return mInstalld.mergeProfiles ( uid , packageName ) ; } catch ( android.os.RemoteException | android.os.ServiceSpecificException e ) { throw new com.android.internal.os.InstallerConnection.InstallerException ( e.getMessage ( ) ) ; } }
Source:
private static void onSubscribeTerminated ( int subscribeId , int status ) { if ( com.android.server.wifi.aware.WifiAwareNative.VDBG ) { android.util.Log.v ( com.android.server.wifi.aware.WifiAwareNative.TAG , ( ( ( "onSubscribeTerminated: subscribeId=" + subscribeId ) + ", status=" ) + status ) ) ; } com.android.server.wifi.aware.WifiAwareStateManager.getInstance ( ) . onSessionTerminatedNotification ( subscribeId , ( status == ( com.android.server.wifi.aware.WifiAwareNative.AWARE_STATUS_SUCCESS ) ? android.net.wifi.aware.WifiAwareDiscoverySessionCallback.TERMINATE_REASON_DONE : android.net.wifi.aware.WifiAwareDiscoverySessionCallback.TERMINATE_REASON_FAIL ) , false ) ; }

Target:
private static void onSubscribeTerminated ( int subscribeId , int status ) { if ( com.android.server.wifi.aware.WifiAwareNative.VDBG ) { android.util.Log.v ( com.android.server.wifi.aware.WifiAwareNative.TAG , ( ( ( "onSubscribeTerminated: subscribeId=" + subscribeId ) + ", status=" ) + status ) ) ; } com.android.server.wifi.aware.WifiAwareNative.sWifiAwareStateManager.onSessionTerminatedNotification ( subscribeId , ( status == ( com.android.server.wifi.aware.WifiAwareNative.AWARE_STATUS_SUCCESS ) ? android.net.wifi.aware.DiscoverySessionCallback.TERMINATE_REASON_DONE : android.net.wifi.aware.DiscoverySessionCallback.TERMINATE_REASON_FAIL ) , false ) ; }
Source:
private static java.lang.String decodeUtf16 ( byte [ ] data , int offset , int numFields ) throws com.android.internal.telephony.cdma.sms.BearerData.CodingException { int byteCount = numFields * 2 ; if ( ( byteCount < 0 ) || ( ( byteCount + offset ) > ( data.length ) ) ) { throw new com.android.internal.telephony.cdma.sms.BearerData.CodingException ( "UTF-16 decode failed: offset or length out of range" ) ; } try { return new java.lang.String ( data , offset , byteCount , "utf-16be" ) ; } catch ( java.io.UnsupportedEncodingException ex ) { throw new com.android.internal.telephony.cdma.sms.BearerData.CodingException ( ( "UTF-16 decode failed: " + ex ) ) ; } }

Target:
private static java.lang.String decodeUtf8 ( byte [ ] data , int offset , int numFields ) throws com.android.internal.telephony.cdma.sms.BearerData.CodingException { return com.android.internal.telephony.cdma.sms.BearerData.decodeCharset ( data , offset , numFields , 1 , "UTF-8" ) ; }
Source:
private void loadStackFrame ( ) throws java.io.IOException { long id = readId ( ) ; java.lang.String methodName = mStrings.get ( readId ( ) ) ; java.lang.String methodSignature = mStrings.get ( readId ( ) ) ; java.lang.String sourceFile = mStrings.get ( readId ( ) ) ; int serial = mInput.readInt ( ) ; int lineNumber = mInput.readInt ( ) ; com.android.tools.perflib.heap.StackFrame frame = new com.android.tools.perflib.heap.StackFrame ( id , methodName , methodSignature , sourceFile , serial , lineNumber ) ; mSnapshot.addStackFrame ( frame ) ; }

Target:
private void loadString ( int length ) throws java.io.IOException { long id = readId ( ) ; java.lang.String string = readUTF8 ( length ) ; mStrings.put ( id , string ) ; }
Source:
public static android.icu.impl.SimplePatternFormatter compileMinMaxPlaceholders ( java.lang.CharSequence pattern , int min , int max ) { java.lang.StringBuilder sb = new java.lang.StringBuilder ( ) ; java.lang.String compiledPattern = android.icu.impl.SimplePatternFormatter.compileToStringMinMaxPlaceholders ( pattern , sb , min , max ) ; return new android.icu.impl.SimplePatternFormatter ( compiledPattern ) ; }

Target:
public static java.lang.String formatRawPattern ( java.lang.String pattern , int min , int max , java.lang.CharSequence ... values ) { java.lang.StringBuilder sb = new java.lang.StringBuilder ( ) ; java.lang.String compiledPattern = android.icu.impl.SimpleFormatterImpl.compileToStringMinMaxArguments ( pattern , sb , min , max ) ; sb.setLength ( 0 ) ; return android.icu.impl.SimpleFormatterImpl.formatAndAppend ( compiledPattern , sb , null , values ) . toString ( ) ; }
Source:
public lombok.ast.AstVisitor createJavaVisitor ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.JavaContext context ) { return new com.android.tools.lint.checks.CallSuperDetector.PerformanceVisitor ( context ) ; }

Target:
private static void checkCallSuper ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.JavaContext context , @ com.android.annotations.NonNull lombok.ast.MethodDeclaration declaration , @ com.android.annotations.NonNull com.android.tools.lint.client.api.JavaParser.ResolvedMethod method ) { com.android.tools.lint.client.api.JavaParser.ResolvedMethod superMethod = com.android.tools.lint.checks.CallSuperDetector.getRequiredSuperMethod ( method ) ; if ( superMethod != null ) { if ( ! ( com.android.tools.lint.checks.CallSuperDetector.SuperCallVisitor.callsSuper ( context , declaration , superMethod ) ) ) { java.lang.String methodName = method.getName ( ) ; java.lang.String message = ( "Overriding method should call `super." + methodName ) + "`" ; com.android.tools.lint.detector.api.Location location = context.getLocation ( declaration.astMethodName ( ) ) ; context.report ( com.android.tools.lint.checks.CallSuperDetector.ISSUE , declaration , location , message ) ; } } }
Source:
public void testResourceConfigMerge ( ) { com.android.builder.model.ProductFlavor productflavor = mCustom.mergeOver ( mCustom2 ) ; java.util.Collection < java.lang.String > configs = productflavor.getResourceConfigurations ( ) ; assertEquals ( 2 , configs.size ( ) ) ; assertTrue ( configs.contains ( "hdpi" ) ) ; assertTrue ( configs.contains ( "ldpi" ) ) ; }

Target:
public void testBuildConfigFieldMerge ( ) { com.android.builder.model.ProductFlavor flavor = com.android.builder.core.DefaultProductFlavor.mergeFlavors ( mCustom2 , mCustom ) ; java.util.Map < java.lang.String , com.android.builder.model.ClassField > buildConfigFields = flavor.getBuildConfigFields ( ) ; assertEquals ( 3 , buildConfigFields.size ( ) ) ; assertEquals ( "oneValue" , buildConfigFields.get ( "one" ) . getValue ( ) ) ; assertEquals ( "twoValue" , buildConfigFields.get ( "two" ) . getValue ( ) ) ; assertEquals ( "threeValue" , buildConfigFields.get ( "three" ) . getValue ( ) ) ; }
Source:
public synchronized void acknowledgeIncomingGsmSmsWithPdu ( boolean success , java.lang.String ackPdu , android.os.Message response ) { android.util.Log.d ( com.android.internal.telephony.gsm.UsimDataDownloadCommands.TAG , ( ( ( "acknowledgeLastIncomingGsmSmsWithPdu: success=" + success ) + ", ackPDU= " ) + ackPdu ) ) ; junit.framework.Assert.assertTrue ( "unexpected call to acknowledge SMS" , mExpectingAcknowledgeGsmSms ) ; junit.framework.Assert.assertEquals ( mExpectingAcknowledgeGsmSmsSuccess , success ) ; junit.framework.Assert.assertEquals ( mExpectingAcknowledgeGsmSmsPdu , ackPdu ) ; mExpectingAcknowledgeGsmSms = false ; if ( response != null ) { android.os.AsyncResult.forMessage ( response ) ; response.sendToTarget ( ) ; } notifyAll ( ) ; }

Target:
public synchronized void acknowledgeIncomingGsmSmsWithPdu ( boolean success , java.lang.String ackPdu , android.os.Message response ) { android.telephony.Rlog.d ( com.android.internal.telephony.gsm.UsimDataDownloadCommands.TAG , ( ( ( "acknowledgeLastIncomingGsmSmsWithPdu: success=" + success ) + ", ackPDU= " ) + ackPdu ) ) ; junit.framework.Assert.assertTrue ( "unexpected call to acknowledge SMS" , mExpectingAcknowledgeGsmSms ) ; junit.framework.Assert.assertEquals ( mExpectingAcknowledgeGsmSmsSuccess , success ) ; junit.framework.Assert.assertEquals ( mExpectingAcknowledgeGsmSmsPdu , ackPdu ) ; mExpectingAcknowledgeGsmSms = false ; if ( response != null ) { android.os.AsyncResult.forMessage ( response ) ; response.sendToTarget ( ) ; } notifyAll ( ) ; }
Source:
public void testCaCertificateChangesDetected ( ) { com.android.server.wifi.WifiConfigurationUtilTest.EnterpriseConfig eapConfig = new com.android.server.wifi.WifiConfigurationUtilTest.EnterpriseConfig ( WifiEnterpriseConfig.Eap.TTLS ) . setPhase2 ( WifiEnterpriseConfig.Phase2.MSCHAPV2 ) . setIdentity ( "username" , "password" ) . setCaCerts ( new java.security.cert.X509Certificate [ ] { android.net.wifi.FakeKeys.CA_CERT0 } ) ; com.android.server.wifi.WifiConfigurationUtilTest.EnterpriseConfig eapConfigAddedCert = new com.android.server.wifi.WifiConfigurationUtilTest.EnterpriseConfig ( WifiEnterpriseConfig.Eap.TTLS ) . setPhase2 ( WifiEnterpriseConfig.Phase2.MSCHAPV2 ) . setIdentity ( "username" , "password" ) . setCaCerts ( new java.security.cert.X509Certificate [ ] { android.net.wifi.FakeKeys.CA_CERT0 , android.net.wifi.FakeKeys.CA_CERT1 } ) ; assertTrue ( com.android.server.wifi.WifiConfigurationUtil.hasEnterpriseConfigChanged ( eapConfig.enterpriseConfig , eapConfigAddedCert.enterpriseConfig ) ) ; }

Target:
public void testCaCertificateChangesDetected ( ) { com.android.server.wifi.WifiConfigurationUtilTest.EnterpriseConfig eapConfig = new com.android.server.wifi.WifiConfigurationUtilTest.EnterpriseConfig ( WifiEnterpriseConfig.Eap.TTLS ) . setPhase2 ( WifiEnterpriseConfig.Phase2.MSCHAPV2 ) . setIdentity ( "username" , "password" ) . setCaCerts ( new java.security.cert.X509Certificate [ ] { FakeKeys.CA_CERT0 } ) ; com.android.server.wifi.WifiConfigurationUtilTest.EnterpriseConfig eapConfigAddedCert = new com.android.server.wifi.WifiConfigurationUtilTest.EnterpriseConfig ( WifiEnterpriseConfig.Eap.TTLS ) . setPhase2 ( WifiEnterpriseConfig.Phase2.MSCHAPV2 ) . setIdentity ( "username" , "password" ) . setCaCerts ( new java.security.cert.X509Certificate [ ] { FakeKeys.CA_CERT0 , FakeKeys.CA_CERT1 } ) ; assertTrue ( com.android.server.wifi.WifiConfigurationUtil.hasEnterpriseConfigChanged ( eapConfig.enterpriseConfig , eapConfigAddedCert.enterpriseConfig ) ) ; }
Source:
public org.objectweb.asm.tree.AbstractInsnNode clone ( final java.util.Map < org.objectweb.asm.tree.LabelNode , org.objectweb.asm.tree.LabelNode > labels ) { org.objectweb.asm.tree.LookupSwitchInsnNode clone = new org.objectweb.asm.tree.LookupSwitchInsnNode ( clone ( dflt , labels ) , null , clone ( this . labels , labels ) ) ; clone.keys.addAll ( keys ) ; return clone ; }

Target:
public org.objectweb.asm.tree.AbstractInsnNode clone ( final java.util.Map < org.objectweb.asm.tree.LabelNode , org.objectweb.asm.tree.LabelNode > labels ) { org.objectweb.asm.tree.LookupSwitchInsnNode clone = new org.objectweb.asm.tree.LookupSwitchInsnNode ( clone ( dflt , labels ) , null , clone ( this . labels , labels ) ) ; clone.keys.addAll ( keys ) ; return clone.cloneAnnotations ( this ) ; }
Source:
public void setRingerMode ( int ringerMode ) { if ( mUseFixedVolume ) { return ; } if ( ( ringerMode == ( AudioManager.RINGER_MODE_VIBRATE ) ) && ( ! ( mHasVibrator ) ) ) { ringerMode = AudioManager.RINGER_MODE_SILENT ; } if ( ringerMode != ( getRingerMode ( ) ) ) { setRingerModeInt ( ringerMode , true ) ; broadcastRingerMode ( ringerMode ) ; } }

Target:
public void setRingerMode ( int ringerMode , boolean checkZen ) { if ( ( mUseFixedVolume ) || ( isPlatformTelevision ( ) ) ) { return ; } if ( ( ringerMode == ( AudioManager.RINGER_MODE_VIBRATE ) ) && ( ! ( mHasVibrator ) ) ) { ringerMode = AudioManager.RINGER_MODE_SILENT ; } if ( checkZen ) { checkZen ( ringerMode ) ; } if ( ringerMode != ( getRingerMode ( ) ) ) { setRingerModeInt ( ringerMode , true ) ; broadcastRingerMode ( ringerMode ) ; } }
Source:
private void insertIndy ( java.lang.String name , java.lang.String desc , annotations.CalledByIndy callsite ) { org.objectweb.asm.Handle bsm = buildBootstrapMethodHandle ( callsite ) ; java.lang.Object [ ] bsmArgs = buildBootstrapArguments ( callsite ) ; mv.visitInvokeDynamicInsn ( name , desc , bsm , bsmArgs ) ; }

Target:
private void insertIndy ( java.lang.String name , java.lang.String desc , annotations.CalledByIndy callsite ) { org.objectweb.asm.Handle bsm = buildBootstrapMethodHandle ( callsite.bootstrapMethod ( ) [ 0 ] ) ; java.lang.Object [ ] bsmArgs = buildBootstrapArguments ( callsite.constantArgumentsForBootstrapMethod ( ) ) ; mv.visitInvokeDynamicInsn ( name , desc , bsm , bsmArgs ) ; }