auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void addProviderWithValidSimCredentialWithInvalidIMSI ( ) throws java.lang.Exception { android.net.wifi.hotspot2.PasspointConfiguration config = new android.net.wifi.hotspot2.PasspointConfiguration ( ) ; config.homeSp = new android.net.wifi.hotspot2.pps.HomeSP ( ) ; config.homeSp.fqdn = com.android.server.wifi.hotspot2.PasspointManagerTest.TEST_FQDN ; config.homeSp.friendlyName = com.android.server.wifi.hotspot2.PasspointManagerTest.TEST_FRIENDLY_NAME ; config.credential = new android.net.wifi.hotspot2.pps.Credential ( ) ; config.credential.realm = com.android.server.wifi.hotspot2.PasspointManagerTest.TEST_REALM ; config.credential.simCredential = new android.net.wifi.hotspot2.pps.Credential.SimCredential ( ) ; config.credential.simCredential.imsi = com.android.server.wifi.hotspot2.PasspointManagerTest.TEST_IMSI ; config.credential.simCredential.eapType = android.net.wifi.EAPConstants.EAP_SIM ; org.mockito.Mockito.when ( mSimAccessor.getMatchingImsis ( com.android.server.wifi.hotspot2.PasspointManagerTest.TEST_IMSI_PARAM ) ) . thenReturn ( null ) ; org.junit.Assert.assertFalse ( mManager.addOrUpdateProvider ( config ) ) ; }

Target:
public void addProviderWithInvalidCredential ( ) throws java.lang.Exception { android.net.wifi.hotspot2.PasspointConfiguration config = createTestConfigWithUserCredential ( ) ; config.getCredential ( ) . getUserCredential ( ) . setEapType ( EAPConstants.EAP_TLS ) ; org.junit.Assert.assertFalse ( mManager.addOrUpdateProvider ( config ) ) ; }
Source:
public void dispose ( ) { if ( com.android.internal.telephony.gsm.SIMRecords.DBG ) log ( ( "Disposing SIMRecords " + ( this ) ) ) ; mCi.unregisterForOffOrNotAvailable ( this ) ; mCi.unregisterForIccRefresh ( this ) ; mCi.unSetOnSmsOnSim ( this ) ; super . dispose ( ) ; }

Target:
public void dispose ( ) { if ( com.android.internal.telephony.gsm.SIMRecords.DBG ) log ( ( "Disposing SIMRecords " + ( this ) ) ) ; mCi.unregisterForIccRefresh ( this ) ; mCi.unSetOnSmsOnSim ( this ) ; mParentApp.unregisterForReady ( this ) ; resetRecords ( ) ; super . dispose ( ) ; }
Source:
public void testSetIconWithParamInt ( ) throws java.lang.Throwable { runTestOnUiThread ( new java.lang.Runnable ( ) { public void run ( ) { mDrawable = mContext.getResources ( ) . getDrawable ( R.drawable.btn_check_on ) ; mBuilder = new android.app.AlertDialog.Builder ( mContext ) ; mBuilder.setIcon ( R.drawable.btn_check_on ) ; mDialog = mBuilder.show ( ) ; } } ) ; mInstrumentation.waitForIdleSync ( ) ; }

Target:
public void testSetIconWithParamInt ( ) throws java.lang.Throwable { runTestOnUiThread ( new java.lang.Runnable ( ) { public void run ( ) { mDrawable = mContext.getResources ( ) . getDrawable ( android.R.drawable.btn_default ) ; mBuilder = new android.app.AlertDialog.Builder ( mContext ) ; mBuilder.setIcon ( android.R.drawable.btn_default ) ; mDialog = mBuilder.show ( ) ; } } ) ; mInstrumentation.waitForIdleSync ( ) ; }
Source:
public java.lang.String contactsDisplayPhonePickList ( ) throws org.json.JSONException { java.lang.String phoneNumber = null ; android.content.Intent data = mCommonIntentsFacade.pick ( "content://contacts/phones" ) ; if ( data != null ) { android.net.Uri phoneData = data.getData ( ) ; android.database.Cursor cursor = mService.getContentResolver ( ) . query ( phoneData , null , null , null , null ) ; if ( cursor != null ) { if ( cursor.moveToFirst ( ) ) { phoneNumber = cursor.getString ( cursor.getColumnIndexOrThrow ( ContactsContract.PhoneLookup.NUMBER ) ) ; } cursor.close ( ) ; } } return phoneNumber ; }

Target:
public java.lang.String contactsDisplayPhonePickList ( ) throws org.json.JSONException { java.lang.String phoneNumber = null ; android.content.Intent data = mCommonIntentsFacade.pick ( com.googlecode.android_scripting.facade.ContactsFacade.CONTACTS_URI.toString ( ) ) ; if ( data != null ) { android.net.Uri phoneData = data.getData ( ) ; android.database.Cursor cursor = mService.getContentResolver ( ) . query ( phoneData , null , null , null , null ) ; if ( cursor != null ) { if ( cursor.moveToFirst ( ) ) { phoneNumber = cursor.getString ( cursor.getColumnIndexOrThrow ( ContactsContract.PhoneLookup.NUMBER ) ) ; } cursor.close ( ) ; } } return phoneNumber ; }
Source:
private lombok.ast.MethodDeclaration findSurroundingMethod ( lombok.ast.Node scope ) { while ( scope != null ) { java.lang.Class < ? extends lombok.ast.Node > type = scope.getClass ( ) ; if ( type == ( lombok.ast.MethodDeclaration.class ) ) { return ( ( lombok.ast.MethodDeclaration ) ( scope ) ) ; } scope = scope.getParent ( ) ; } return null ; }

Target:
private lombok.ast.Node findSurroundingMethod ( lombok.ast.Node scope ) { while ( scope != null ) { java.lang.Class < ? extends lombok.ast.Node > type = scope.getClass ( ) ; if ( ( type == ( lombok.ast.MethodDeclaration.class ) ) || ( type == ( lombok.ast.ConstructorDeclaration.class ) ) ) { return scope ; } scope = scope.getParent ( ) ; } return null ; }
Source:
public void run ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JField field ) throws java.lang.Exception { if ( field.isExternal ( ) ) { return ; } com.android.sched.util.log.Tracer tracer = com.android.sched.util.log.TracerFactory.getTracer ( ) ; if ( java.lang.reflect.Modifier.isStatic ( field.getModifier ( ) ) ) { tracer.getStatistic ( com.android.jack.statistics.FieldStats.STATIC_FIELDS_COUNT ) . incValue ( ) ; } else { tracer.getStatistic ( com.android.jack.statistics.FieldStats.INSTANCE_FIELDS_COUNT ) . incValue ( ) ; } }

Target:
public void run ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JField field ) throws java.lang.Exception { if ( ! ( field.getEnclosingType ( ) . isToEmit ( ) ) ) { return ; } com.android.sched.util.log.Tracer tracer = com.android.sched.util.log.TracerFactory.getTracer ( ) ; if ( java.lang.reflect.Modifier.isStatic ( field.getModifier ( ) ) ) { tracer.getStatistic ( com.android.jack.statistics.FieldStats.STATIC_FIELDS_COUNT ) . incValue ( ) ; } else { tracer.getStatistic ( com.android.jack.statistics.FieldStats.INSTANCE_FIELDS_COUNT ) . incValue ( ) ; } }
Source:
protected com.android.ide.common.internal.PngCruncher getCruncher ( ) { com.android.utils.ILogger logger = new com.android.utils.StdLogger ( StdLogger.Level.VERBOSE ) ; com.android.ide.common.internal.CommandLineRunner commandLineRunner = new com.android.ide.common.internal.CommandLineRunner ( logger ) ; java.io.File aapt = new java.io.File ( getSdkDir ( ) , "build-tools/20.0.0/aapt" ) ; assertTrue ( ( "Test requires build-tools 20.0.0 in " + ( aapt.getAbsolutePath ( ) ) ) , aapt.isFile ( ) ) ; return new com.android.ide.common.internal.AaptCruncher ( aapt.getAbsolutePath ( ) , commandLineRunner ) ; }

Target:
protected java.io.File getAapt ( com.android.sdklib.repository.FullRevision fullRevision ) { com.android.utils.ILogger logger = new com.android.utils.StdLogger ( StdLogger.Level.VERBOSE ) ; com.android.sdklib.SdkManager sdkManager = com.android.sdklib.SdkManager.createManager ( getSdkDir ( ) . getAbsolutePath ( ) , logger ) ; assert sdkManager != null ; com.android.sdklib.BuildToolInfo buildToolInfo = sdkManager.getBuildTool ( fullRevision ) ; if ( buildToolInfo == null ) { throw new java.lang.RuntimeException ( "Test requires build-tools 20" ) ; } return new java.io.File ( buildToolInfo.getPath ( BuildToolInfo.PathId.AAPT ) ) ; }
Source:
public static com.google.common.io.OutputSupplier < java.io.FileOutputStream > newOutputStreamSupplier ( final java.io.File file , final boolean append ) { com.google.common.base.Preconditions.checkNotNull ( file ) ; return new com.google.common.io.OutputSupplier < java.io.FileOutputStream > ( ) { @ java.lang.Override public java.io.FileOutputStream getOutput ( ) throws java.io.IOException { return new java.io.FileOutputStream ( file , append ) ; } } ; }

Target:
public static java.util.List < java.lang.String > readLines ( java.io.File file , java.nio.charset.Charset charset ) throws java.io.IOException { return com.google.common.io.Files.readLines ( file , charset , new com.google.common.io.LineProcessor < java.util.List < java.lang.String > > ( ) { final java.util.List < java.lang.String > result = com.google.common.collect.Lists.newArrayList ( ) ; @ java.lang.Override public boolean processLine ( java.lang.String line ) { result.add ( line ) ; return true ; } @ java.lang.Override public java.util.List < java.lang.String > getResult ( ) { return result ; } } ) ; }
Source:
private void writeDescriptor ( java.lang.String writeValue ) { android.bluetooth.BluetoothGattDescriptor descriptor = getDescriptor ( ) ; if ( descriptor == null ) return ; descriptor.setValue ( writeValue.getBytes ( ) ) ; mBluetoothGatt.writeDescriptor ( descriptor ) ; }

Target:
private void setNotification ( android.bluetooth.BluetoothGattCharacteristic characteristic , boolean enable ) { if ( characteristic != null ) { mBluetoothGatt.setCharacteristicNotification ( characteristic , enable ) ; android.bluetooth.BluetoothGattDescriptor descriptor = characteristic.getDescriptor ( com.android.cts.verifier.bluetooth.BleClientService.UPDATE_DESCRIPTOR_UUID ) ; if ( enable ) { if ( characteristic.getUuid ( ) . equals ( com.android.cts.verifier.bluetooth.BleClientService.INDICATE_CHARACTERISTIC_UUID ) ) { descriptor.setValue ( BluetoothGattDescriptor.ENABLE_INDICATION_VALUE ) ; } else { descriptor.setValue ( BluetoothGattDescriptor.ENABLE_NOTIFICATION_VALUE ) ; } } else { descriptor.setValue ( BluetoothGattDescriptor.DISABLE_NOTIFICATION_VALUE ) ; } mBluetoothGatt.writeDescriptor ( descriptor ) ; } }
Source:
public void testCreateFromApnSetting ( ) throws java.lang.Exception { com.android.internal.telephony.dataconnection.DataProfile dp = new com.android.internal.telephony.dataconnection.DataProfile ( mApn1 , false ) ; assertEquals ( mApn1.profileId , dp.profileId ) ; assertEquals ( mApn1.apn , dp.apn ) ; assertEquals ( mApn1.protocol , dp.protocol ) ; assertEquals ( mApn1.authType , dp.authType ) ; assertEquals ( mApn1.user , dp.user ) ; assertEquals ( mApn1.password , dp.password ) ; assertEquals ( 0 , dp.type ) ; assertEquals ( mApn1.maxConnsTime , dp.maxConnsTime ) ; assertEquals ( mApn1.maxConns , dp.maxConns ) ; assertEquals ( mApn1.waitTime , dp.waitTime ) ; assertEquals ( mApn1.carrierEnabled , dp.enabled ) ; }

Target:
public void testCreateFromApnSetting ( ) throws java.lang.Exception { com.android.internal.telephony.dataconnection.DataProfile dp = new com.android.internal.telephony.dataconnection.DataProfile ( mApn1 ) ; assertEquals ( mApn1.profileId , dp.profileId ) ; assertEquals ( mApn1.apn , dp.apn ) ; assertEquals ( mApn1.protocol , dp.protocol ) ; assertEquals ( RILConstants.SETUP_DATA_AUTH_PAP_CHAP , dp.authType ) ; assertEquals ( mApn1.user , dp.user ) ; assertEquals ( mApn1.password , dp.password ) ; assertEquals ( 0 , dp.type ) ; assertEquals ( mApn1.maxConnsTime , dp.maxConnsTime ) ; assertEquals ( mApn1.maxConns , dp.maxConns ) ; assertEquals ( mApn1.waitTime , dp.waitTime ) ; assertEquals ( mApn1.carrierEnabled , dp.enabled ) ; }
Source:
public void init ( org.eclipse.ui.IWorkbench workbench , org.eclipse.jface.viewers.IStructuredSelection selection ) { super . init ( workbench , selection ) ; setWindowTitle ( "New Android App" ) ; mValues = new com.android.ide.eclipse.adt.internal.wizards.templates.NewProjectWizardState ( ) ; mMainPage = new com.android.ide.eclipse.adt.internal.wizards.templates.NewProjectPage ( mValues ) ; mActivityPage = new com.android.ide.eclipse.adt.internal.wizards.templates.ActivityPage ( mValues , true , true ) ; }

Target:
public void init ( org.eclipse.ui.IWorkbench workbench , org.eclipse.jface.viewers.IStructuredSelection selection ) { super . init ( workbench , selection ) ; setWindowTitle ( "New Android Application" ) ; mValues = new com.android.ide.eclipse.adt.internal.wizards.templates.NewProjectWizardState ( ) ; mMainPage = new com.android.ide.eclipse.adt.internal.wizards.templates.NewProjectPage ( mValues ) ; mActivityPage = new com.android.ide.eclipse.adt.internal.wizards.templates.ActivityPage ( mValues , true , true ) ; }
Source:
public void iccTransmitApduLogicalChannel ( int channel , int cla , int instruction , int p1 , int p2 , int p3 , java.lang.String data , android.os.Message response ) { if ( channel <= 0 ) { throw new java.lang.RuntimeException ( ( "Invalid channel in iccTransmitApduLogicalChannel: " + channel ) ) ; } iccTransmitApduHelper ( channel , cla , instruction , p1 , p2 , p3 , data , response ) ; }

Target:
public void iccTransmitApduLogicalChannel ( int channel , int cla , int instruction , int p1 , int p2 , int p3 , java.lang.String data , android.os.Message response ) { if ( channel <= 0 ) { throw new java.lang.RuntimeException ( ( "Invalid channel in iccTransmitApduLogicalChannel: " + channel ) ) ; } iccTransmitApduHelper ( com.android.internal.telephony.RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL , channel , cla , instruction , p1 , p2 , p3 , data , response ) ; }
Source:
private void runFlushSensorTest ( int sensorType , int rateUs , int maxBatchReportLatencySec ) throws java.lang.Throwable { int maxBatchReportLatencyUs = ( ( int ) ( java.util.concurrent.TimeUnit.SECONDS.toMicros ( maxBatchReportLatencySec ) ) ) ; int flushDurationSec = maxBatchReportLatencySec / 2 ; android.hardware.cts.helpers.TestSensorEnvironment environment = new android.hardware.cts.helpers.TestSensorEnvironment ( getContext ( ) , sensorType , shouldEmulateSensorUnderLoad ( ) , rateUs , maxBatchReportLatencyUs ) ; android.hardware.cts.helpers.sensoroperations.TestSensorFlushOperation operation = new android.hardware.cts.helpers.sensoroperations.TestSensorFlushOperation ( environment , flushDurationSec , java.util.concurrent.TimeUnit.SECONDS ) ; executeTest ( environment , operation , true ) ; }

Target:
private void runFlushSensorTest ( int sensorType , int rateUs , int maxBatchReportLatencySec ) throws java.lang.Throwable { int maxBatchReportLatencyUs = ( ( int ) ( java.util.concurrent.TimeUnit.SECONDS.toMicros ( maxBatchReportLatencySec ) ) ) ; int flushDurationSec = maxBatchReportLatencySec / 2 ; android.hardware.cts.helpers.TestSensorEnvironment environment = new android.hardware.cts.helpers.TestSensorEnvironment ( getContext ( ) , sensorType , shouldEmulateSensorUnderLoad ( ) , rateUs , maxBatchReportLatencyUs ) ; android.hardware.cts.helpers.sensoroperations.TestSensorOperation operation = android.hardware.cts.helpers.sensoroperations.TestSensorOperation.createFlushOperation ( environment , flushDurationSec , java.util.concurrent.TimeUnit.SECONDS ) ; executeTest ( environment , operation , true ) ; }
Source:
public void testBasicCycle ( ) { com.android.tools.perflib.heap.Snapshot snapshot = new com.android.tools.perflib.heap.analysis.SnapshotBuilder ( 3 ) . addReference ( 1 , 2 ) . addReference ( 2 , 3 ) . addReference ( 3 , 1 ) . addRoot ( 1 ) . getSnapshot ( ) ; assertEquals ( 6 , snapshot.findReference ( 1 ) . getCompositeSize ( ) ) ; assertEquals ( 6 , snapshot.findReference ( 2 ) . getCompositeSize ( ) ) ; assertEquals ( 6 , snapshot.findReference ( 3 ) . getCompositeSize ( ) ) ; }

Target:
public void testBasicCycle ( ) { com.android.tools.perflib.heap.Snapshot snapshot = new com.android.tools.perflib.heap.analysis.SnapshotBuilder ( 3 ) . addReferences ( 1 , 2 ) . addReferences ( 2 , 3 ) . addReferences ( 3 , 1 ) . addRoot ( 1 ) . getSnapshot ( ) ; assertEquals ( 6 , snapshot.findReference ( 1 ) . getCompositeSize ( ) ) ; assertEquals ( 6 , snapshot.findReference ( 2 ) . getCompositeSize ( ) ) ; assertEquals ( 6 , snapshot.findReference ( 3 ) . getCompositeSize ( ) ) ; }
Source:
public void execute ( java.lang.String programName ) { java.lang.StringBuilder commandBuilder = new java.lang.StringBuilder ( ) ; commandBuilder.append ( "dalvikvm32 " ) ; commandBuilder.append ( "-cp " ) . append ( testLocation ) . append ( "/" ) . append ( programName ) . append ( " " ) ; commandBuilder.append ( executeClass ) ; executionResult = executeOnDevice ( commandBuilder.toString ( ) , true ) ; }

Target:
public void execute ( java.lang.String programName ) { java.lang.StringBuilder commandBuilder = new java.lang.StringBuilder ( ) ; commandBuilder.append ( "dalvikvm32 " ) ; commandBuilder.append ( "-cp " ) . append ( testLocation ) . append ( "/" ) . append ( programName ) . append ( " " ) ; commandBuilder.append ( executeClass ) ; executionResult = executeCommandWithTimeout ( commandBuilder.toString ( ) , true ) ; }
Source:
private void notifyAllFeaturesRemoved ( ) { if ( ( mCallbacks ) == null ) { android.util.Log.w ( com.android.internal.telephony.ims.ImsServiceController.LOG_TAG , "notifyAllFeaturesRemoved called with invalid callbacks." ) ; return ; } synchronized ( mLock ) { for ( android.util.Pair < java.lang.Integer , java.lang.Integer > feature : mImsFeatures ) { mCallbacks.imsServiceFeatureRemoved ( feature.first , feature.second , this ) ; sendImsFeatureRemovedCallback ( feature.first , feature.second ) ; } } }

Target:
private void notifyAllFeaturesRemoved ( ) { if ( ( mCallbacks ) == null ) { android.util.Log.w ( com.android.internal.telephony.ims.ImsServiceController.LOG_TAG , "notifyAllFeaturesRemoved called with invalid callbacks." ) ; return ; } synchronized ( mLock ) { for ( android.telephony.ims.stub.ImsFeatureConfiguration.FeatureSlotPair feature : mImsFeatures ) { mCallbacks.imsServiceFeatureRemoved ( feature.slotId , feature.featureType , this ) ; sendImsFeatureRemovedCallback ( feature.slotId , feature.featureType ) ; } } }
Source:
private static java.lang.String getNexusLabel ( com.android.sdklib.devices.Device d ) { java.lang.String name = d.getName ( ) ; com.android.sdklib.devices.Screen screen = d.getDefaultHardware ( ) . getScreen ( ) ; float length = ( ( float ) ( screen.getDiagonalLength ( ) ) ) ; return java.lang.String.format ( java.util.Locale.US , "%1$s (%3$s\", %2$s)" , name , com.android.ide.eclipse.adt.internal.editors.layout.configuration.DeviceMenuListener.getResolutionString ( d ) , java.lang.Float.toString ( length ) ) ; }

Target:
private static java.lang.String getNexusLabel ( com.android.sdklib.devices.Device d ) { java.lang.String name = d.getName ( ) ; com.android.sdklib.devices.Screen screen = d.getDefaultHardware ( ) . getScreen ( ) ; float length = ( ( float ) ( screen.getDiagonalLength ( ) ) ) ; length = ( java.lang.Math.round ( ( 10 * length ) ) ) / 10.0F ; return java.lang.String.format ( java.util.Locale.US , "%1$s (%3$s\", %2$s)" , name , com.android.ide.eclipse.adt.internal.editors.layout.configuration.DeviceMenuListener.getResolutionString ( d ) , java.lang.Float.toString ( length ) ) ; }
Source:
public boolean disableNdefPush ( ) throws android.os.RemoteException { com.android.nfc.NfcPermissions.enforceAdminPermissions ( mContext ) ; synchronized ( this ) { if ( ! ( mIsNdefPushEnabled ) ) { return true ; } android.util.Log.i ( com.android.nfc.NfcService.TAG , "disabling NDEF Push" ) ; mPrefsEditor.putBoolean ( com.android.nfc.NfcService.PREF_NDEF_PUSH_ON , false ) ; mPrefsEditor.apply ( ) ; mIsNdefPushEnabled = false ; setBeamShareActivityState ( false ) ; if ( isNfcEnabled ( ) ) { mP2pLinkManager.enableDisable ( false , true ) ; } } return true ; }

Target:
public boolean disableNdefPush ( ) throws android.os.RemoteException { com.android.nfc.NfcPermissions.enforceAdminPermissions ( mContext ) ; synchronized ( this ) { if ( ! ( mIsNdefPushEnabled ) ) { return true ; } android.util.Log.i ( com.android.nfc.NfcService.TAG , "disabling NDEF Push" ) ; mPrefsEditor.putBoolean ( com.android.nfc.NfcService.PREF_NDEF_PUSH_ON , false ) ; mPrefsEditor.apply ( ) ; mIsNdefPushEnabled = false ; setBeamShareActivityState ( false ) ; if ( isNfcEnabled ( ) ) { mP2pLinkManager.enableDisable ( false , true ) ; } mBackupManager.dataChanged ( ) ; } return true ; }
Source:
void getUnchecked ( int pos , short [ ] dst , int dstOffset , int length ) { libcore.io.Memory.peekShortArray ( ix ( pos ) , dst , dstOffset , length , ( ! ( nativeByteOrder ) ) ) ; }

Target:
void getUnchecked ( int pos , short [ ] dst , int dstOffset , int length ) { if ( ! ( memoryRef.isAccessible ) ) { throw new java.lang.IllegalStateException ( "buffer is inaccessible" ) ; } libcore.io.Memory.peekShortArray ( ix ( pos ) , dst , dstOffset , length , ( ! ( nativeByteOrder ) ) ) ; }
Source:
final void put ( float [ ] src , int srcOffset , int floatCount ) { int byteCount = checkPutBounds ( SizeOf.FLOAT , src.length , srcOffset , floatCount ) ; this . block.pokeFloatArray ( ( ( offset ) + ( position ) ) , src , srcOffset , floatCount , order.needsSwap ) ; position += byteCount ; }

Target:
final void put ( float [ ] src , int srcOffset , int floatCount ) { checkNotFreed ( ) ; int byteCount = checkPutBounds ( SizeOf.FLOAT , src.length , srcOffset , floatCount ) ; this . block.pokeFloatArray ( ( ( offset ) + ( position ) ) , src , srcOffset , floatCount , order.needsSwap ) ; position += byteCount ; }
Source:
public void addImsFeatureStatusCallback ( com.android.ims.internal.IImsFeatureStatusCallback c ) { if ( c == null ) { return ; } try { c.notifyImsFeatureStatus ( mState ) ; synchronized ( mStatusCallbacks ) { mStatusCallbacks.add ( c ) ; } } catch ( android.os.RemoteException e ) { android.util.Log.w ( android.telephony.ims.feature.ImsFeature.LOG_TAG , ( "Couldn't notify feature state: " + ( e.getMessage ( ) ) ) ) ; } }

Target:
public void onQueryCapabilityConfiguration ( int capability , int radioTech , boolean isEnabled ) { if ( ( mCallback ) == null ) { return ; } try { mCallback.onQueryCapabilityConfiguration ( capability , radioTech , isEnabled ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.telephony.ims.feature.ImsFeature.LOG_TAG , "onQueryCapabilityConfiguration called on dead binder." ) ; } }
Source:
public void testCloseBehavior ( ) throws java.io.IOException { java.io.InputStream is = loadResource ( ) ; try { java.io.InputStream ncis = new com.android.io.NonClosingInputStream ( is ) ; assertEquals ( '1' , parseAndClose ( ncis ) ) ; try { assertEquals ( '2' , parse ( ncis ) ) ; fail ( "Expected: IOException 'stream closed'; Actual: no error." ) ; } catch ( java.io.IOException e ) { assertEquals ( "Stream closed" , e.getMessage ( ) ) ; } } finally { is.close ( ) ; } }

Target:
public void testCloseBehavior ( ) throws java.io.IOException { java.io.InputStream is = loadResource ( ) ; try { java.io.InputStream ncis = new com.android.io.NonClosingInputStream ( is ) ; assertEquals ( '1' , parseAndClose ( ncis ) ) ; try { assertEquals ( '2' , parse ( ncis ) ) ; fail ( "Expected: IOException 'stream closed'; Actual: no error." ) ; } catch ( java.io.IOException e ) { assertEquals ( "stream closed" , e.getMessage ( ) . toLowerCase ( java.util.Locale.US ) ) ; } } finally { if ( is != null ) { is.close ( ) ; } } }
Source:
synchronized long nScriptIntrinsicCreate ( int id , long eid ) { validate ( ) ; return rsnScriptIntrinsicCreate ( mContext , id , eid ) ; }

Target:
synchronized void nScriptSetVarVE ( long id , int slot , byte [ ] val , long e , int [ ] dims , boolean mUseInc ) { validate ( ) ; long curCon = mContext ; if ( mUseInc ) { curCon = mIncCon ; } rsnScriptSetVarVE ( curCon , id , slot , val , e , dims , mUseInc ) ; }
Source:
private com.android.dx.ssa.back.LocalItem getLocalItemForReg ( int ssaReg ) { for ( java.util.Map.Entry < com.android.dx.ssa.back.LocalItem , java.util.ArrayList < com.android.dx.ssa.back.RegisterSpec > > entry : localVariables.entrySet ( ) ) { for ( com.android.dx.ssa.back.RegisterSpec spec : entry.getValue ( ) ) { if ( ( spec.getReg ( ) ) == ssaReg ) { return entry.getKey ( ) ; } } } return null ; }

Target:
private com.android.dx.rop.code.LocalItem getLocalItemForReg ( int ssaReg ) { for ( java.util.Map.Entry < com.android.dx.rop.code.LocalItem , java.util.ArrayList < com.android.dx.rop.code.RegisterSpec > > entry : localVariables.entrySet ( ) ) { for ( com.android.dx.rop.code.RegisterSpec spec : entry.getValue ( ) ) { if ( ( spec.getReg ( ) ) == ssaReg ) { return entry.getKey ( ) ; } } } return null ; }
Source:
public void test_traceMethodCalls ( ) { try { java.lang.Runtime.getRuntime ( ) . traceMethodCalls ( false ) ; java.lang.Runtime.getRuntime ( ) . traceMethodCalls ( true ) ; java.lang.Runtime.getRuntime ( ) . traceMethodCalls ( false ) ; } catch ( java.lang.RuntimeException ex ) { if ( ! ( "file open failed" . equals ( ex.getMessage ( ) ) ) ) { throw ex ; } } }

Target:
public void test_traceMethodCalls ( ) { java.lang.Runtime.getRuntime ( ) . traceMethodCalls ( false ) ; try { java.lang.Runtime.getRuntime ( ) . traceMethodCalls ( true ) ; fail ( ) ; } catch ( java.lang.UnsupportedOperationException expected ) { } }
Source:
private static android.net.Uri getContactUri ( android.database.Cursor cursor ) { long contactId = cursor.getLong ( Projections.PHONE_ID ) ; java.lang.String lookupKey = cursor.getString ( Projections.PHONE_LOOKUP_KEY ) ; return ContactsContract.Contacts.getLookupUri ( contactId , lookupKey ) ; }

Target:
private static android.net.Uri getContactUri ( com.android.dialer.searchfragment.common.SearchCursor cursor ) { long contactId = cursor.getLong ( Projections.PHONE_ID ) ; java.lang.String lookupKey = cursor.getString ( Projections.PHONE_LOOKUP_KEY ) ; return android.provider.ContactsContract.Contacts.getLookupUri ( contactId , lookupKey ) . buildUpon ( ) . appendQueryParameter ( ContactsContract.DIRECTORY_PARAM_KEY , java.lang.String.valueOf ( cursor.getDirectoryId ( ) ) ) . build ( ) ; }
Source:
public int submitRequestList ( java.util.List < android.hardware.camera2.CaptureRequest > request , boolean streaming , android.hardware.camera2.utils.LongParcelable lastFrameNumber ) { if ( android.hardware.camera2.legacy.CameraDeviceUserShim.DEBUG ) { android.util.Log.d ( android.hardware.camera2.legacy.CameraDeviceUserShim.TAG , "submitRequestList called." ) ; } if ( mLegacyDevice.isClosed ( ) ) { android.util.Log.e ( android.hardware.camera2.legacy.CameraDeviceUserShim.TAG , "Cannot submit request list, device has been closed." ) ; return android.hardware.camera2.utils.CameraBinderDecorator.ENODEV ; } synchronized ( mConfigureLock ) { if ( mConfiguring ) { android.util.Log.e ( android.hardware.camera2.legacy.CameraDeviceUserShim.TAG , "Cannot submit request, configuration change in progress." ) ; return android.hardware.camera2.utils.CameraBinderDecorator.INVALID_OPERATION ; } } return mLegacyDevice.submitRequestList ( request , streaming , lastFrameNumber ) ; }

Target:
public int submitRequestList ( java.util.List < android.hardware.camera2.CaptureRequest > request , boolean streaming , android.hardware.camera2.utils.LongParcelable lastFrameNumber ) { if ( android.hardware.camera2.legacy.CameraDeviceUserShim.DEBUG ) { android.util.Log.d ( android.hardware.camera2.legacy.CameraDeviceUserShim.TAG , "submitRequestList called." ) ; } if ( mLegacyDevice.isClosed ( ) ) { android.util.Log.e ( android.hardware.camera2.legacy.CameraDeviceUserShim.TAG , "Cannot submit request list, device has been closed." ) ; return - ( android.system.OsConstants.ENODEV ) ; } synchronized ( mConfigureLock ) { if ( mConfiguring ) { android.util.Log.e ( android.hardware.camera2.legacy.CameraDeviceUserShim.TAG , "Cannot submit request, configuration change in progress." ) ; return android.hardware.camera2.utils.CameraBinderDecorator.INVALID_OPERATION ; } } return mLegacyDevice.submitRequestList ( request , streaming , lastFrameNumber ) ; }
Source:
public java.io.InputStream openStream ( ) throws java.io.IOException { return decodingStream ( encodedSource.openStream ( ) ) ; }

Target:
public void write ( char c ) throws java.io.IOException { if ( ( charsUntilSeparator ) == 0 ) { for ( int i = 0 ; i < ( separator.length ( ) ) ; i ++ ) { delegate.write ( separator.charAt ( i ) ) ; } charsUntilSeparator = afterEveryChars ; } delegate.write ( c ) ; ( charsUntilSeparator ) -- ; }
Source:
public com.android.sdklib.ISystemImage [ ] getSystemImages ( ) { if ( ( mSystemImages ) == null ) { com.android.sdklib.SystemImage si = new com.android.sdklib.SystemImage ( com.android.sdklib.io.FileOp.append ( getLocation ( ) , SdkConstants.OS_IMAGES_FOLDER ) , com.android.sdklib.ISystemImage.LocationType.IN_PLATFORM_LEGACY , com.android.sdklib.SystemImage.DEFAULT_TAG , com.android.SdkConstants.ABI_ARMEABI ) ; mSystemImages = new com.android.sdklib.SystemImage [ ] { si } ; } return mSystemImages ; }

Target:
public com.android.sdklib.ISystemImage [ ] getSystemImages ( ) { if ( ( mSystemImages ) == null ) { com.android.sdklib.SystemImage si = new com.android.sdklib.SystemImage ( com.android.sdklib.io.FileOp.append ( getLocation ( ) , SdkConstants.OS_IMAGES_FOLDER ) , com.android.sdklib.ISystemImage.LocationType.IN_PLATFORM_LEGACY , com.android.sdklib.SystemImage.DEFAULT_TAG , com.android.SdkConstants.ABI_ARMEABI , com.android.sdklib.io.FileOp.EMPTY_FILE_ARRAY ) ; mSystemImages = new com.android.sdklib.SystemImage [ ] { si } ; } return mSystemImages ; }
Source:
public int getNetworkType ( ) { try { com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony != null ) { return telephony.getNetworkType ( ) ; } else { return android.telephony.TelephonyManager.NETWORK_TYPE_UNKNOWN ; } } catch ( android.os.RemoteException ex ) { return android.telephony.TelephonyManager.NETWORK_TYPE_UNKNOWN ; } catch ( java.lang.NullPointerException ex ) { return android.telephony.TelephonyManager.NETWORK_TYPE_UNKNOWN ; } }

Target:
public int getDataNetworkType ( ) { try { com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony != null ) { return telephony.getDataNetworkType ( ) ; } else { return android.telephony.TelephonyManager.NETWORK_TYPE_UNKNOWN ; } } catch ( android.os.RemoteException ex ) { return android.telephony.TelephonyManager.NETWORK_TYPE_UNKNOWN ; } catch ( java.lang.NullPointerException ex ) { return android.telephony.TelephonyManager.NETWORK_TYPE_UNKNOWN ; } }
Source:
public void testTearDownInterfaces ( ) { com.android.server.wifi.WificondControl wificondControl = org.mockito.Mockito.mock ( com.android.server.wifi.WificondControl.class ) ; org.mockito.Mockito.when ( wificondControl.tearDownInterfaces ( ) ) . thenReturn ( true ) ; mWifiNative.setWificondControl ( wificondControl ) ; org.junit.Assert.assertTrue ( mWifiNative.tearDownInterfaces ( ) ) ; org.mockito.Mockito.verify ( wificondControl ) . tearDownInterfaces ( ) ; }

Target:
public void testSetupDriverForSoftApModeError ( ) { com.android.server.wifi.WificondControl wificondControl = org.mockito.Mockito.mock ( com.android.server.wifi.WificondControl.class ) ; android.net.wifi.IWificond wificond = org.mockito.Mockito.mock ( android.net.wifi.IWificond.class ) ; org.mockito.Mockito.when ( wificondControl.setupDriverForSoftApMode ( ) ) . thenReturn ( null ) ; mWifiNative.setWificondControl ( wificondControl ) ; android.net.wifi.IApInterface returnedApInterface = mWifiNative.setupForSoftApMode ( ) ; org.junit.Assert.assertEquals ( null , returnedApInterface ) ; org.mockito.Mockito.verify ( mWifiNative ) . startHal ( org.mockito.Mockito.eq ( false ) ) ; org.mockito.Mockito.verify ( wificondControl ) . setupDriverForSoftApMode ( ) ; }
Source:
boolean rejectIncomingConnect ( android.bluetooth.BluetoothDevice device ) { return false ; }

Target:
boolean startVoiceRecognition ( android.bluetooth.BluetoothDevice device ) { enforceCallingOrSelfPermission ( com.android.bluetooth.hfp.BLUETOOTH_PERM , "Need BLUETOOTH permission" ) ; synchronized ( mStateMachines ) { final com.android.bluetooth.hfp.HeadsetStateMachine stateMachine = mStateMachines.get ( device ) ; if ( stateMachine == null ) { return false ; } int connectionState = stateMachine.getConnectionState ( ) ; if ( ( connectionState != ( android.bluetooth.BluetoothProfile.STATE_CONNECTED ) ) && ( connectionState != ( android.bluetooth.BluetoothProfile.STATE_CONNECTING ) ) ) { return false ; } mVoiceRecognitionStarted = true ; stateMachine.sendMessage ( HeadsetStateMachine.VOICE_RECOGNITION_START , device ) ; } return true ; }
Source:
void addRootType ( java.lang.String type ) { if ( ( mRootTypes ) == null ) { mRootTypes = new java.util.ArrayList < java.lang.String > ( ) ; mRootTypes.add ( type ) ; } else if ( ! ( mRootTypes.contains ( type ) ) ) { mRootTypes.add ( type ) ; } }

Target:
public java.util.Collection < com.android.ahat.heapdump.RootType > getRootTypes ( ) { if ( ! ( isRoot ( ) ) ) { return null ; } java.util.List < com.android.ahat.heapdump.RootType > types = new java.util.ArrayList < com.android.ahat.heapdump.RootType > ( ) ; for ( com.android.ahat.heapdump.RootType type : com.android.ahat.heapdump.RootType.values ( ) ) { if ( ( ( mRootTypes ) & ( type.mask ) ) != 0 ) { types.add ( type ) ; } } return types ; }
Source:
public boolean canHandle ( java.lang.String path , java.lang.String mimeType ) { if ( ( ( null == path ) || ( path.equals ( "" ) ) ) && ( ( null == mimeType ) || ( mimeType.equals ( "" ) ) ) ) { throw new java.lang.IllegalArgumentException ( "Path or the mimetype should be non null" ) ; } else if ( ( getState ( ) ) == ( android.drm.DrmManagerClient.STATE_UNINITIALIZED ) ) { throw new java.lang.IllegalStateException ( "Not Initialized yet" ) ; } return _canHandle ( mUniqueId , path , mimeType ) ; }

Target:
public int getDrmObjectType ( java.lang.String path , java.lang.String mimeType ) { if ( ( ( null == path ) || ( path.equals ( "" ) ) ) && ( ( null == mimeType ) || ( mimeType.equals ( "" ) ) ) ) { throw new java.lang.IllegalArgumentException ( "Path or the mimetype should be non null" ) ; } else if ( ( android.drm.DrmManagerClient.STATE_UNINITIALIZED ) == ( getState ( ) ) ) { throw new java.lang.IllegalStateException ( "Not Initialized yet" ) ; } return _getDrmObjectType ( mUniqueId , path , mimeType ) ; }
Source:
public void onRttModifyResponseReceived ( com.android.ims.ImsCall imsCall , int status ) { com.android.internal.telephony.imsphone.ImsPhoneConnection conn = findConnection ( imsCall ) ; if ( conn != null ) { conn.onRttModifyResponseReceived ( status ) ; if ( status == ( android.telecom.Connection.RttModifyStatus.SESSION_MODIFY_REQUEST_SUCCESS ) ) { conn.startRttTextProcessing ( ) ; } } }

Target:
public void onCallStarted ( com.android.ims.ImsCall imsCall ) { if ( com.android.internal.telephony.imsphone.ImsPhoneCallTracker.DBG ) log ( "mImsUssdListener onCallStarted" ) ; if ( imsCall == ( mUssdSession ) ) { if ( ( mPendingUssd ) != null ) { android.os.AsyncResult.forMessage ( mPendingUssd ) ; mPendingUssd.sendToTarget ( ) ; mPendingUssd = null ; } } }
Source:
private void openIfNecessary ( ) { getControl ( ) . getDisplay ( ) . asyncExec ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { if ( ! ( isProposalPopupOpen ( ) ) ) { openProposalPopup ( ) ; } } } ) ; }

Target:
private void openIfNecessary ( ) { if ( ( ( ( m_textControl ) == null ) || ( m_textControl.isDisposed ( ) ) ) || ( ( m_proposalProvider.getProposals ( m_textControl.getText ( ) , m_textControl.getCaretPosition ( ) ) . length ) == 0 ) ) { return ; } getControl ( ) . getDisplay ( ) . asyncExec ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { if ( ! ( isProposalPopupOpen ( ) ) ) { openProposalPopup ( ) ; } } } ) ; }
Source:
public void removeExtras ( java.lang.String callId , java.util.List < java.lang.String > keys ) { com.android.server.telecom.Log.startSession ( "CSW.rE" ) ; long token = android.os.Binder.clearCallingIdentity ( ) ; try { synchronized ( mLock ) { logIncoming ( "removeExtra %s %s" , callId , keys ) ; com.android.server.telecom.Call call = mCallIdMapper.getCall ( callId ) ; if ( call != null ) { call.removeExtras ( Call.SOURCE_CONNECTION_SERVICE , keys ) ; } } } finally { android.os.Binder.restoreCallingIdentity ( token ) ; com.android.server.telecom.Log.endSession ( ) ; } }

Target:
public void removeExtras ( java.lang.String callId , java.util.List < java.lang.String > keys ) { android.telecom.Log.startSession ( "CSW.rE" ) ; long token = android.os.Binder.clearCallingIdentity ( ) ; try { synchronized ( mLock ) { logIncoming ( "removeExtra %s %s" , callId , keys ) ; com.android.server.telecom.Call call = mCallIdMapper.getCall ( callId ) ; if ( call != null ) { call.removeExtras ( Call.SOURCE_CONNECTION_SERVICE , keys ) ; } } } finally { android.os.Binder.restoreCallingIdentity ( token ) ; android.telecom.Log.endSession ( ) ; } }
Source:
public void onSetupDataCallComplete ( @ android.telephony.data.DataServiceCallback.ResultCode int resultCode , android.telephony.data.DataCallResponse response ) { if ( com.android.internal.telephony.dataconnection.DataServiceManager.DBG ) { log ( ( ( ( "onSetupDataCallComplete. resultCode = " + resultCode ) + ", response = " ) + response ) ) ; } android.os.Message msg = mMessageMap.remove ( this ) ; msg.getData ( ) . putParcelable ( com.android.internal.telephony.dataconnection.DataServiceManager.DATA_CALL_RESPONSE , response ) ; sendCompleteMessage ( msg , resultCode ) ; }

Target:
public void onSetupDataCallComplete ( @ android.telephony.data.DataServiceCallback.ResultCode int resultCode , android.telephony.data.DataCallResponse response ) { if ( com.android.internal.telephony.dataconnection.DataServiceManager.DBG ) { log ( ( ( ( "onSetupDataCallComplete. resultCode = " + resultCode ) + ", response = " ) + response ) ) ; } android.os.Message msg = mMessageMap.remove ( asBinder ( ) ) ; if ( msg != null ) { msg.getData ( ) . putParcelable ( com.android.internal.telephony.dataconnection.DataServiceManager.DATA_CALL_RESPONSE , response ) ; sendCompleteMessage ( msg , resultCode ) ; } else { loge ( "Unable to find the message for setup call response." ) ; } }
Source:
private void verifyAddSingleNetworkAndMatchScanDetailToNetworkAndCache ( android.net.wifi.WifiConfiguration network ) { verifyAddNetworkToWifiConfigManager ( network ) ; com.android.server.wifi.ScanDetail scanDetail = createScanDetailForNetwork ( network ) ; android.net.wifi.ScanResult scanResult = scanDetail.getScanResult ( ) ; android.net.wifi.WifiConfiguration retrievedNetwork = mWifiConfigManager.getSavedNetworkForScanDetailAndCache ( scanDetail ) ; com.android.server.wifi.WifiConfigurationTestUtil.assertConfigurationEqualForConfigManagerAddOrUpdate ( network , retrievedNetwork ) ; com.android.server.wifi.ScanDetailCache retrievedScanDetailCache = mWifiConfigManager.getScanDetailCacheForNetwork ( network.networkId ) ; assertEquals ( 1 , retrievedScanDetailCache.size ( ) ) ; android.net.wifi.ScanResult retrievedScanResult = retrievedScanDetailCache.get ( scanResult.BSSID ) ; com.android.server.wifi.ScanTestUtil.assertScanResultEquals ( scanResult , retrievedScanResult ) ; }

Target:
private void verifyAddSingleNetworkAndMatchScanDetailToNetworkAndCache ( android.net.wifi.WifiConfiguration network ) { verifyAddNetworkToWifiConfigManager ( network ) ; com.android.server.wifi.ScanDetail scanDetail = createScanDetailForNetwork ( network ) ; android.net.wifi.ScanResult scanResult = scanDetail.getScanResult ( ) ; android.net.wifi.WifiConfiguration retrievedNetwork = mWifiConfigManager.getSavedNetworkForScanDetailAndCache ( scanDetail ) ; retrievedNetwork = mWifiConfigManager.getConfiguredNetworkWithPassword ( retrievedNetwork.networkId ) ; com.android.server.wifi.WifiConfigurationTestUtil.assertConfigurationEqualForConfigManagerAddOrUpdate ( network , retrievedNetwork ) ; com.android.server.wifi.ScanDetailCache retrievedScanDetailCache = mWifiConfigManager.getScanDetailCacheForNetwork ( network.networkId ) ; assertEquals ( 1 , retrievedScanDetailCache.size ( ) ) ; android.net.wifi.ScanResult retrievedScanResult = retrievedScanDetailCache.get ( scanResult.BSSID ) ; com.android.server.wifi.ScanTestUtil.assertScanResultEquals ( scanResult , retrievedScanResult ) ; }
Source:
private static char sadShort2ShortAlt ( char [ ] s1 , char [ ] s2 ) { int min_length = java.lang.Math.min ( s1.length , s2.length ) ; char sad = 0 ; for ( int i = 0 ; i < min_length ; i ++ ) { char s = s1 [ i ] ; char p = s2 [ i ] ; sad += ( s >= p ) ? s - p : p - s ; } return sad ; }

Target:
private static char sadChar2CharAlt ( char [ ] s1 , char [ ] s2 ) { int min_length = java.lang.Math.min ( s1.length , s2.length ) ; char sad = 0 ; for ( int i = 0 ; i < min_length ; i ++ ) { char s = s1 [ i ] ; char p = s2 [ i ] ; sad += ( s >= p ) ? s - p : p - s ; } return sad ; }
Source:
public void fetchAttrAndPlayItem ( java.lang.String uid ) { com.android.bluetooth.avrcpcontroller.BrowseTree.BrowseNode currItem = mBrowseTree.findFolderByIDLocked ( uid ) ; com.android.bluetooth.avrcpcontroller.BrowseTree.BrowseNode currFolder = mBrowseTree.getCurrentBrowsedFolder ( ) ; android.util.Log.d ( com.android.bluetooth.avrcpcontroller.AvrcpControllerStateMachine.TAG , ( ( ( "fetchAttrAndPlayItem mediaId=" + uid ) + " node=" ) + currItem ) ) ; if ( currItem != null ) { int scope = ( currFolder.isNowPlaying ( ) ) ? AvrcpControllerService.BROWSE_SCOPE_NOW_PLAYING : AvrcpControllerService.BROWSE_SCOPE_VFS ; android.os.Message msg = obtainMessage ( com.android.bluetooth.avrcpcontroller.AvrcpControllerStateMachine.MESSAGE_FETCH_ATTR_AND_PLAY_ITEM , scope , 0 , currItem.getFolderUID ( ) ) ; sendMessage ( msg ) ; } }

Target:
public void fetchAttrAndPlayItem ( java.lang.String uid ) { com.android.bluetooth.avrcpcontroller.BrowseTree.BrowseNode currItem = mBrowseTree.findFolderByIDLocked ( uid ) ; com.android.bluetooth.avrcpcontroller.BrowseTree.BrowseNode currFolder = mBrowseTree.getCurrentBrowsedFolder ( ) ; if ( com.android.bluetooth.avrcpcontroller.AvrcpControllerStateMachine.DBG ) android.util.Log.d ( com.android.bluetooth.avrcpcontroller.AvrcpControllerStateMachine.TAG , ( ( ( "fetchAttrAndPlayItem mediaId=" + uid ) + " node=" ) + currItem ) ) ; if ( currItem != null ) { int scope = ( currFolder.isNowPlaying ( ) ) ? AvrcpControllerService.BROWSE_SCOPE_NOW_PLAYING : AvrcpControllerService.BROWSE_SCOPE_VFS ; android.os.Message msg = obtainMessage ( com.android.bluetooth.avrcpcontroller.AvrcpControllerStateMachine.MESSAGE_FETCH_ATTR_AND_PLAY_ITEM , scope , 0 , currItem.getFolderUID ( ) ) ; sendMessage ( msg ) ; } }
Source:
public void run ( @ org.jetbrains.annotations.NotNull final com.intellij.openapi.progress.ProgressIndicator indicator ) { indicator.setText ( "Connecting to terminal..." ) ; try { doRun ( ) ; } catch ( final java.lang.Exception e ) { org.jetbrains.plugins.terminal.AbstractTerminalRunner.LOG.warn ( "Error running terminal" , e ) ; com.intellij.util.ui.UIUtil.invokeLaterIfNeeded ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { com.intellij.openapi.ui.Messages.showErrorDialog ( org.jetbrains.plugins.terminal.AbstractTerminalRunner.this . getProject ( ) , e.getMessage ( ) , getTitle ( ) ) ; } } ) ; } }

Target:
public void run ( @ org.jetbrains.annotations.NotNull final com.intellij.openapi.progress.ProgressIndicator indicator ) { indicator.setText ( "Running the terminal..." ) ; try { doRun ( ) ; } catch ( final java.lang.Exception e ) { org.jetbrains.plugins.terminal.AbstractTerminalRunner.LOG.warn ( "Error running terminal" , e ) ; com.intellij.util.ui.UIUtil.invokeLaterIfNeeded ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { com.intellij.openapi.ui.Messages.showErrorDialog ( org.jetbrains.plugins.terminal.AbstractTerminalRunner.this . getProject ( ) , e.getMessage ( ) , getTitle ( ) ) ; } } ) ; } }
Source:
public void testVisibleBehindOtherActivity_OverHome ( ) throws java.lang.Exception { executeShellCommand ( getAmStartCmdOverHome ( android.server.cts.ActivityManagerActivityVisiblityTests.VISIBLE_BEHIND_ACTIVITY ) ) ; executeShellCommand ( getAmStartCmdOverHome ( android.server.cts.ActivityManagerActivityVisiblityTests.TRANSLUCENT_ACTIVITY ) ) ; mAmWmState.computeState ( mDevice , new java.lang.String [ ] { android.server.cts.ActivityManagerActivityVisiblityTests.VISIBLE_BEHIND_ACTIVITY , android.server.cts.ActivityManagerActivityVisiblityTests.TRANSLUCENT_ACTIVITY } ) ; mAmWmState.assertVisibility ( android.server.cts.ActivityManagerActivityVisiblityTests.VISIBLE_BEHIND_ACTIVITY , true ) ; mAmWmState.assertVisibility ( android.server.cts.ActivityManagerActivityVisiblityTests.TRANSLUCENT_ACTIVITY , true ) ; }

Target:
public void testVisibleBehindOtherActivity_OverHome ( ) throws java.lang.Exception { if ( noHomeScreen ( ) ) { return ; } executeShellCommand ( getAmStartCmdOverHome ( android.server.cts.ActivityManagerActivityVisiblityTests.VISIBLE_BEHIND_ACTIVITY ) ) ; executeShellCommand ( getAmStartCmdOverHome ( android.server.cts.ActivityManagerActivityVisiblityTests.TRANSLUCENT_ACTIVITY ) ) ; mAmWmState.computeState ( mDevice , new java.lang.String [ ] { android.server.cts.ActivityManagerActivityVisiblityTests.VISIBLE_BEHIND_ACTIVITY , android.server.cts.ActivityManagerActivityVisiblityTests.TRANSLUCENT_ACTIVITY } ) ; mAmWmState.assertVisibility ( android.server.cts.ActivityManagerActivityVisiblityTests.VISIBLE_BEHIND_ACTIVITY , true ) ; mAmWmState.assertVisibility ( android.server.cts.ActivityManagerActivityVisiblityTests.TRANSLUCENT_ACTIVITY , true ) ; }
Source:
protected void registerPages ( org.eclipse.ui.forms.DetailsPart detailsPart ) { mDetailsPart = detailsPart ; detailsPart.setPageLimit ( 5 ) ; final com.android.ide.eclipse.adt.internal.editors.ui.tree.UiTreeBlock tree = this ; detailsPart.setPageProvider ( new org.eclipse.ui.forms.IDetailsPageProvider ( ) { public org.eclipse.ui.forms.IDetailsPage getPage ( java.lang.Object key ) { if ( key instanceof com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode ) { return new com.android.ide.eclipse.adt.internal.editors.ui.tree.UiElementDetail ( tree ) ; } return null ; } public java.lang.Object getPageKey ( java.lang.Object object ) { return object ; } } ) ; }

Target:
protected void registerPages ( org.eclipse.ui.forms.DetailsPart inDetailsPart ) { mDetailsPart = inDetailsPart ; inDetailsPart.setPageLimit ( 5 ) ; final com.android.ide.eclipse.adt.internal.editors.ui.tree.UiTreeBlock tree = this ; inDetailsPart.setPageProvider ( new org.eclipse.ui.forms.IDetailsPageProvider ( ) { public org.eclipse.ui.forms.IDetailsPage getPage ( java.lang.Object key ) { if ( key instanceof com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode ) { return new com.android.ide.eclipse.adt.internal.editors.ui.tree.UiElementDetail ( tree ) ; } return null ; } public java.lang.Object getPageKey ( java.lang.Object object ) { return object ; } } ) ; }
Source:
public final void createBaseTest ( com.android.rs.imagejb.ImageProcessingActivityJB ipact , android.graphics.Bitmap b , android.graphics.Bitmap b2 , android.graphics.Bitmap outb ) { act = ipact ; mRS = ipact.mRS ; mRS.setMessageHandler ( new com.android.rs.imagejb.TestBase.MessageProcessor ( act ) ) ; mInPixelsAllocation = ipact.mInPixelsAllocation ; mInPixelsAllocation2 = ipact.mInPixelsAllocation2 ; mOutPixelsAllocation = ipact.mOutPixelsAllocation ; createTest ( act.getResources ( ) ) ; }

Target:
public final void createBaseTest ( com.android.rs.imagejb.ImageProcessingActivityJB ipact ) { act = ipact ; mRS = ipact.mProcessor.mRS ; mRS.setMessageHandler ( new com.android.rs.imagejb.TestBase.MessageProcessor ( act ) ) ; mInPixelsAllocation = ipact.mProcessor.mInPixelsAllocation ; mInPixelsAllocation2 = ipact.mProcessor.mInPixelsAllocation2 ; mOutPixelsAllocation = ipact.mProcessor.mOutPixelsAllocation ; createTest ( act.getResources ( ) ) ; }
Source:
public void testSwitchModeWhenSoftApActiveMode ( ) throws java.lang.Exception { enterSoftApActiveMode ( ) ; mWifiStateMachinePrime.enterClientMode ( ) ; mLooper.dispatchNext ( ) ; verify ( mSoftApManager ) . stop ( ) ; verify ( mWificond ) . tearDownInterfaces ( ) ; org.junit.Assert.assertEquals ( "ClientModeState" , mWifiStateMachinePrime.getCurrentMode ( ) ) ; }

Target:
public void testEnterSoftApModeFromDifferentState ( ) throws java.lang.Exception { when ( mWifiInjector.makeWificond ( ) ) . thenReturn ( mWificond ) ; mWifiStateMachinePrime.enterClientMode ( ) ; mLooper.dispatchAll ( ) ; org.junit.Assert.assertEquals ( com.android.server.wifi.WifiStateMachinePrimeTest.CLIENT_MODE_STATE_STRING , mWifiStateMachinePrime.getCurrentMode ( ) ) ; enterSoftApActiveMode ( ) ; }